Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

same line items in bapi_pr_create

Former Member
0 Likes
864

Hi All,

I Used Bapi u2018BAPI_PR_CREATEu2019 to create PR,

but I found a problem.when uploded data for multiple line items in PR , then I found the created PR in ME53N the items are the same, means Quantity and valuation price field are uploaded same for all line items.

Please help.

Thanks and Regards,

Aman.

3 REPLIES 3
Read only

Former Member
0 Likes
653

Hi,

try to check with your internal table which you are passing to this FM.and also try to pass the value to PRITEMX parameter.

Thanks,

Read only

Former Member
0 Likes
653

Hi,

Try this

{Sample Code}

wa_headerx-pr_type = 'X'.

CALL FUNCTION 'BAPI_PR_CREATE'

EXPORTING

prheader = wa_header " Header Data

prheaderx = wa_headerx "Header data with 'X'

IMPORTING

number = pw_pr_number

TABLES

return = t_return

pritem = t_item

pritemx = t_itemx

pritemsource = t_itemsource

pritemtext = t_itext

EXCEPTIONS

OTHERS = 1.

{Sample Code}

Regards

Krishna

Read only

jaideepsharma
Active Contributor
0 Likes
653

Hi,

Can you please send your code ? Also, try to clear workareas everytime after you append it to internal table.

KR Jaideep,