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

BAPI

Former Member
0 Likes
542

Hi All,

I am just learning BAPI's. I wrote a small program to upload a purchase order using FM BAPI_PO_CREATE1. After I execute the program and print the contents of return structure,I get a success messgae along with the PO number.But when I check the database table ekko it doesn't show any Created PO. I do not understand what is happening. Can anyone please help me with this.

Regards,

Varun.

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
527

Please make sure to COMMIT after the call. Use 'BAPI_TRANSACTION_COMMIT'.




  call function 'BAPI_PO_CREATE1'
       exporting
            poheader         = pohead
            poheaderx        = poheadx
            testrun          = ' '
       importing
            exppurchaseorder = ex_po_number
            expheader        = exp_head
       tables
            return           = return
            poitem           = poitem
            poitemx          = poitemx
            poschedule       = posched
            poschedulex      = poschedx.

<b>  call function 'BAPI_TRANSACTION_COMMIT'
       exporting
            wait = 'X'.</b>

Regards,

Rich Heilman

4 REPLIES 4
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
528

Please make sure to COMMIT after the call. Use 'BAPI_TRANSACTION_COMMIT'.




  call function 'BAPI_PO_CREATE1'
       exporting
            poheader         = pohead
            poheaderx        = poheadx
            testrun          = ' '
       importing
            exppurchaseorder = ex_po_number
            expheader        = exp_head
       tables
            return           = return
            poitem           = poitem
            poitemx          = poitemx
            poschedule       = posched
            poschedulex      = poschedx.

<b>  call function 'BAPI_TRANSACTION_COMMIT'
       exporting
            wait = 'X'.</b>

Regards,

Rich Heilman

Read only

0 Likes
527

Hi Rich,

Thank you very much.

Regards,

Varun.

Read only

0 Likes
527

Your quite welcome!

Have a good weekend.

Regards,

Rich Heilman

Read only

0 Likes
527

Hi Rich,

I have a problem with BAPI_PO_CREATE1

list of errors:

1.- Introduce also the parameter of POCONDX interface.

2.- Enter the positions in first place.

3.- The documents have not been created p/enjoy BAPI.

4.- The headers of de purchasing order are still wrong.

5.- Company code doesn't exist.

I have a nice day.

Regards!