2010 Jun 11 9:48 AM
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 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
2010 Jun 11 2:51 PM
2010 Jun 11 2:55 PM
oopsi..
what you need is to pass wt_extensionin to EXTENSIONIN
Edited by: Soumyaprakash Mishra on Jun 11, 2010 7:26 PM
2010 Jun 14 2:01 PM
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
2010 Jun 14 2:07 PM
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
2010 Jun 14 2:12 PM
Hi,
I don't use extensionout. i'm using only extensionin.
Regards,
Mehdi
2010 Jun 14 2:25 PM
check the note:
Note 336589 - BAPI_PO_CREATE: Customer enhancements
--
Reddy
2010 Jun 14 2:30 PM
2010 Jun 14 3:51 PM
Hi Reddy,
I did the same thing by it doesn't work.
Do you have any other idea?
thx,
Mehdi
2010 Jun 14 4:51 PM
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
2010 Jun 14 5:11 PM
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
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |