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_PO_CREATE1 put on hold

0 Likes
1,576

Hi Everyone,

First of all I know there is a bunch of discussions about putting PO on hold using BAPI_PO_CREATE1 but none of them gave me correct answer to my problem.

The problem is I can't put on hold my PO on quite a new system (SAP_APPL 605 SP level 10). Bapi returns errors, for example "please enter tax code" which should not occur because of import parameters:

       ls_poheaderx-memory    = 'X'.

      ls_poheaderx-memorytype = 'X'.

CALL FUNCTION 'BAPI_PO_CREATE1'

       EXPORTING

         poheader               = ls_poheader

         poheaderx             = ls_poheaderx

         TESTRUN              = space

         MEMORY_UNCOMPLETE    = 'X'

         MEMORY_COMPLETE        = space

         NO_PRICE_FROM_PO        = 'X'

       IMPORTING

         exppurchaseorder       = lv_exppurchaseorder

       TABLES

         return                 = lt_return

         poitem                 = lt_poitem

         poitemx                = lt_poitemx

         poschedule             = lt_poschedule

         poschedulex            = lt_poschedulex.

Any suggestions?

Best regards,

Marcin

1 ACCEPTED SOLUTION
Read only

venkateswaran_k
Active Contributor
0 Likes
1,071

For Items


      ls_poheader-memory    = 'X'.
      ls_poheader-memorytype = 'H'.    

For ItemsX


      ls_poheader-memory    = 'X'.
      ls_poheader-memorytype = 'X'.

IF a tax code is mandatory in your scenario,  use the BAPI table BAPIMEPOACCOUNT to fill the tax code 

BAPIMEPOACCOUNT-taxcode

Regards,

Venkat

Hi Everyone,

First of all I know there is a bunch of discussions about putting PO on hold using BAPI_PO_CREATE1 but none of them gave me correct answer to my problem.

The problem is I can't put on hold my PO on quite a new system (SAP_APPL 605 SP level 10). Bapi returns errors, for example "please enter tax code" which should not occur because of import parameters:

       ls_poheaderx-memory    = 'X'.

      ls_poheaderx-memorytype = 'X'.

CALL FUNCTION 'BAPI_PO_CREATE1'

       EXPORTING

         poheader               = ls_poheader

         poheaderx             = ls_poheaderx

         TESTRUN              = space

         MEMORY_UNCOMPLETE    = 'X'

         MEMORY_COMPLETE        = space

         NO_PRICE_FROM_PO        = 'X'

       IMPORTING

         exppurchaseorder       = lv_exppurchaseorder

       TABLES

         return                 = lt_return

         poitem                 = lt_poitem

         poitemx                = lt_poitemx

         poschedule             = lt_poschedule

         poschedulex            = lt_poschedulex.

Any suggestions?

Best regards,

Marcin

4 REPLIES 4
Read only

venkateswaran_k
Active Contributor
0 Likes
1,072

For Items


      ls_poheader-memory    = 'X'.
      ls_poheader-memorytype = 'H'.    

For ItemsX


      ls_poheader-memory    = 'X'.
      ls_poheader-memorytype = 'X'.

IF a tax code is mandatory in your scenario,  use the BAPI table BAPIMEPOACCOUNT to fill the tax code 

BAPIMEPOACCOUNT-taxcode

Regards,

Venkat

Read only

0 Likes
1,071

Yes I did it in that way. But it's still not working.

I do some Notes research and probably it would be this note: 1870776.

EDIT: After implementing note 1870776 it's working now.

Regards,

Marcin

Read only

ravindra_devarapalli
Active Contributor
0 Likes
1,071

Hi,

check Sap note number

354771  , 582221

Read only

venkateswaran_k
Active Contributor
0 Likes
1,071

Dear Marcin

You have to pass 'X' to both of these variable.    Since you are passing MEMORY_COMPLETE as SPACE.. it gives error.  Try passing X to both of it.

It should work

    MEMORY_UNCOMPLETE = 'X'   "held if there is error in data

   MEMORY_COMPLETE      = 'X'      "held even there is  no error in data