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 EXTENSION

Former Member
0 Likes
3,399

Hi experts,

I need some help plz:

I added specific fields to tabke EKKN (ZVBELN, ZVBELP), and i want to insert values in these fields via BAPI_PO_CREATE1.

I also added these fields to structures:

BAPIMEPOACCOUNT

BAPIMEPOACCOUNTX

BAPI_TE_MEPOACCOUNTING

BAPI_TE_MEPOACCOUNTINGX

MEPOACCOUNTING

MEPOACCOUNTINGX

UEKKN

EXKN

This is my code:


ws_extensionin-structure = 'BAPI_TE_MEPOACCOUNTING'.
ws_ext-po_item = '00010'.
ws_ext-serial_no = '01'.
ws_ext-zvbeln = '0005000059'.
ws_ext-zvbelp = '00010'.
MOVE ws_ext TO ws_extensionin-valuepart1.

APPEND ws_extensionin TO wt_extensionin.

CLEAR ws_extensionin.

ws_extensionin-structure = 'BAPI_TE_MEPOACCOUNTINGX'.
ws_extx-po_item = '00010'.
ws_extx-serial_no = '01'.
ws_extx-zvbeln = 'X'.
ws_extx-zvbelp = 'X'.
MOVE ws_extx TO ws_extensionin-valuepart1.

APPEND ws_extensionin TO wt_extensionin.

When i debug BAPI_PO_CREATE1, EXTENSIONOUT is empty, perhaps this is the problem?????

Do you have any idea?

Thx.

Regards,

Mehdi

Hi,

Just use this.

Don't use extension out. Its not required.

CALL FUNCTION 'BAPI_PO_CREATE1'

EXPORTING

poheader = header

poheaderx = headerx

IMPORTING

exppurchaseorder = ebeln

TABLES

return = return

poitem = item

poitemx = itemx.

Regards,

Narendra

10 REPLIES 10
Read only

Former Member
0 Likes
1,581

Any idea????

Read only

Former Member
0 Likes
1,581

oopsi..

what you need is to pass wt_extensionin to EXTENSIONIN

Edited by: Soumyaprakash Mishra on Jun 11, 2010 7:26 PM

Read only

0 Likes
1,581

Hi,

If you mean to do

extensionin = wt_extensionin

CALL FUNCTION 'BAPI_PO_CREATE1'
  EXPORTING
    poheader                     = ws_poheader
   poheaderx                    = ws_poheaderx
   no_price_from_po             = 'X' "
 IMPORTING
   exppurchaseorder             = wv_exppurchaseorder
 TABLES
   return                       = wt_return
   poitem                       = wt_poitem
   poitemx                      = wt_poitemx
*   POSERVICESTEXT               =
   extensionin                  = wt_extensionin
*   extensionout                 = wt_extensionin .

I have already done it.

If not, could you plz explain what do you mean because i don't understand.

Thx.

Regards,

Mehdi

Read only

Former Member
0 Likes
1,581

Hi,

Just use this.

Don't use extension out. Its not required.

CALL FUNCTION 'BAPI_PO_CREATE1'

EXPORTING

poheader = header

poheaderx = headerx

IMPORTING

exppurchaseorder = ebeln

TABLES

return = return

poitem = item

poitemx = itemx.

Regards,

Narendra

Read only

0 Likes
1,581

Hi,

I don't use extensionout. i'm using only extensionin.

Regards,

Mehdi

Read only

0 Likes
1,581

check the note:

Note 336589 - BAPI_PO_CREATE: Customer enhancements

--

Reddy

Read only

0 Likes
1,581

check the thread:

--

Reddy

Read only

0 Likes
1,581

Hi Reddy,

I did the same thing by it doesn't work.

Do you have any other idea?

thx,

Mehdi

Read only

0 Likes
1,581

Hi Mehdi,

Did you define the Data Type as CHAR behind the fields you appended to the various structures you mention in your original post?

Regards,

Phil

Read only

0 Likes
1,581

Hi Phil,

In table EKKN and strcture BAPI_TE_MEPOACCOUNTING , i added 2 fields: the first as char the second as numc:

Field | Data element | Data type | Length

ZVBELN | VBELN | CHAR | 10

ZVBELP | POSNR_VA | NUMC | 6

In Structure BAPI_TE_MEPOACCOUNTINGX:

Field | Data element | Data type | Length

ZVBELN | BAPIUPDATE | CHAR | 10

ZVBELP | BAPIUPDATE | NUMC | 6

Is it correct?

Regards

Mehdi