03-31-2011 10:26 AM
i used to bapi_po_create1 to upload purchase order. in purchase order one custom field in item level warranty.
in CI_EKOPODB . I was send custom data in bapi using EXTENSIONN. BUT I GOT
ERROR PLEASE ENTER VALUE IN WARRANTY AND
Error transferring ExtensionIn data for enhancement CI_EKPODB.
IN A FORUM I GOT ANSWER TO IMPLEMENT BADI ME_BAPI_PO_CUST. BUT I AM NOT KNOW HOW TO IMPLEMENT IT PLEASE GUIDE ME.
PRANESH
Edited by: Praneshom on Mar 31, 2011 11:26 AM
Edited by: Praneshom on Mar 31, 2011 11:28 AM
Moderator message: please do not post in all upper case.
Edited by: Thomas Zloch on Mar 31, 2011 11:48 AM
03-31-2011 10:58 AM
Hi,
To implement a BADI do the below steps.
Go to SE18 and provide the BADI name in the box 'Definition name'.
In the menu options 'Implementation', select 'create''.
The another pop will come where you can provide the name of the implementations like Z_BADI*
After implementation you go inside it and the methods will be there where inside you can write your code.
You may use t-code SE19 also to implement a BADI.
03-31-2011 11:02 AM
03-31-2011 11:20 AM
You don't need to do any BADI implementation for filling custom fields in creation of PO through BAPI. Have you added your field in structure BAPI_TE_MEPOITEM and BAPI_TE_MEPOITEMX. Sdata field in bapi-extensionin parameter needs to be filled with the same string just as structure BAPI_TE_MEPOITEM with actual spacings for the field value. So, if your field is at starting at 6th character and ending at 10, then in sdata it should be same case.
regards,
diwakar
03-31-2011 11:23 AM
Hey
In SE18, on top where all the menu is there, there you can see 'Implementation' between 'Utlities and 'Environment'.
Otherwise you may go to SE19 and provide the implementation name like Z_BADI* and create.
03-31-2011 11:39 AM
hi Diwakar.
my warranty field is int4 length 10.
I am already use BAPI_TE_MEPOITEM.
bapi_te_mepoitem-po_item = h_item..
bapi_te_mepoitem-warrenty = '6'.
WRNTY = bapi_te_mepoitem-warrenty.
CONDENSE wrnty.
.
CONCATENATE bapi_te_mepoitem-po_item WRNTY INTO POIT SEPARATED BY SPACE.
MOVE 'BAPI_TE_MEPOITEM' TO i_extensionin-structure.
MOVE POIT TO i_extensionin-valuepart1.
APPEND i_extensionin.
bapi_te_mepoitemx-po_item = h_item.
bapi_te_mepoitemx-warrenty = 'X'. "<--here the "difference"
*
CONCATENATE bapi_te_mepoitemx-po_item bapi_te_mepoitemx-warrenty INTO POITX SEPARATED BY SPACE.
MOVE 'BAPI_TE_MEPOITEMX' TO i_extensionin-structure.
MOVE bapi_te_mepoitemx TO i_extensionin-valuepart1.
MOVE POITX TO i_extensionin-valuepart1.
MOVE bapi_te_mepoitemx-warrenty TO i_extensionin-valuepart2.
APPEND i_extensionin.
Please review this code
Thanks
Pranesh