08-09-2021 10:34 AM
Hello Everyone,
My query is how do I convert the field parnr (length 12) of ihpa table to field pernr (length 😎 of pa0000 table?
08-09-2021 10:34 AM
Thank you for asking a question in the SAP Community! Your question is very important to us. It would be helpful for you to take the Community Tutorial which provides tips for preparing questions that draw the best responses from our members. Plus, by organizing your Community profile using Profile Tutorial you will encourage more readers to respond to your questions!
Thank you!
08-09-2021 12:24 PM
HI shyam_shukla ,
you can use lpad function in hana query and fetch
Exact syntax is if you want to pass pernr of 8 in length to parnr of length 12 use the LPAD syntax.
Example :
ihpa.parnr = lpad(pa0000.pernr,12,'0')
From the above 12 Denotes the Total length to be formed to match parnr's [12] from its original length of
pernr[8 -> 12].
0 Denotes the no. of Zeros going to get appended in front.
Hope this Helps ..
Thanks .
08-12-2021 4:47 AM
I don't think that this is possible without the loss of data. Are you willing to have inconsistent data ?
08-16-2021 10:49 AM
For pre-hana versions, look at FM such as PM_PARTNER_LENGTH to convert values.