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

Why BAPI BAPI_PR_CREATE the same items?

Former Member
0 Likes
658

Dear All,

I Used Bapi u2018BAPI_PR_CREATEu2019 to create PR,now it can work.but I found a problem.when the data are some lines,then I found the created PR in ME53N the item are the same,Why is that so ?below is my sentence.

LOOP AT IT_UPLOAD.

G_PRHEADER-PR_TYPE = IT_UPLOAD-BSART.

G_PRHEADERX-PR_TYPE = 'X'.

IT_PRITEM-MATERIAL = IT_UPLOAD-MATNR.

IT_PRITEM-QUANTITY = IT_UPLOAD-MENGE.

IT_PRITEM-DELIV_DATE = IT_UPLOAD-LFDAT.

IT_PRITEM-PLANT = IT_UPLOAD-WERKS.

IT_PRITEM-PREQ_PRICE = IT_UPLOAD-PREIS.

APPEND IT_PRITEM.

IT_PRITEMX-MATERIAL = 'X'.

IT_PRITEMX-QUANTITY = 'X'.

IT_PRITEMX-DELIV_DATE = 'X'.

IT_PRITEMX-PLANT = 'X'.

IT_PRITEMX-PREQ_PRICE = 'X'.

APPEND IT_PRITEMX.

ENDLOOP.

CALL FUNCTION 'BAPI_PR_CREATE' DESTINATION Lrfcdest

EXPORTING

PRHEADER = G_PRHEADER

PRHEADERX = G_PRHEADERX

  • TESTRUN =

IMPORTING

NUMBER = G_BANFN

  • PRHEADEREXP =

TABLES

RETURN = IT_RETURN

PRITEM = IT_PRITEM

PRITEMX = IT_PRITEMX

.

Please Help me?

Thanks

Sun

4 REPLIES 4
Read only

Former Member
0 Likes
605

hold

Read only

Former Member
0 Likes
605

Hello.

I have exactly the same problem. If you have found a solution please tell. I would appreciate

Read only

Former Member
0 Likes
605

Did you find the answer? Can you post it ? I have same problem with this BAPI.

Thanks,

Grace

Read only

Former Member
0 Likes
605

Did you find the answer? Can you post it ? I have same problem with this BAPI.

Thanks,

Grace