on 01-02-2008 12:08 AM
I have the following scenario:
- I need to save some customer fields in Purchase Order item, when it is generated through the Shopping Cart (EBP).
- When EBP will generate a PO in backend (R/3), it calls B470_PO_CREATE function module and inside it calls BAPI_PO_CREATE1 in R/3. This call does not use extensionin parameter.
- I have all the values in PO_ITEMS parameters. (an append structure in bapi_mepoitem).
- Trying to solve this, I think I have to use EXIT_SAPL2012_001 to create the extensionin parameter.
- Anyone else has this problem?
- How can I create the extensionin parameter? Is it only necessary to add 'BAPI_TE_MEPOITEM' and 'BAPI_TE_MEPOITEMX'?
- Do you have an example?
Thank you!
I had to implement ME_BAPI_PO_CUST method map2i_extensionin.
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
You have to extend CI_EKPODBX with the same fieldnames with type BAPIUPDATE (in SE11), and then while passing the EXTENSIONIN to the bapi, you have to flag those. Like the following:
DATA: wa_extensionin TYPE BAPIPAREX,
wa_BAPIPAREX TYPE BAPIPAREX,
wa_BAPI_TE_MEPOITEM TYPE BAPI_TE_MEPOITEM,
wa_BAPI_TE_MEPOITEMX TYPE BAPI_TE_MEPOITEMX.
wa_BAPI_TE_MEPOITEM-po_item = <PO Line No.>.
wa_BAPI_TE_MEPOITEM-ZZZ_FIELD1 = <z-field value>.
wa_BAPIPAREX-STRUCTURE = 'BAPI_TE_MEPOITEM'.
wa_BAPIPAREX-VALUEPART1 = wa_BAPI_TE_MEPOITEM.
APPEND wa_BAPIPAREX TO extensionin.
wa_BAPI_TE_MEPOITEMX-po_item = <PO Line No.>.
wa_BAPI_TE_MEPOITEMX-ZZZ_FIELD1 = 'X'.
wa_BAPIPAREX-STRUCTURE = 'BAPI_TE_MEPOITEMX'.
wa_BAPIPAREX-VALUEPART1 = wa_BAPI_TE_MEPOITEMX.
APPEND wa_BAPIPAREX TO extensionin.
This will work. Please let me know if it does not.
See related links ->
Do let me know.
Regards
- Atul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
In Unicode enabled systems, both the structures should
be identical to move data from one another or we can
move data from a structure or work area to a text
varible if the structure or work area have only fields
of character or numeric data type.
In your stmt,you are assigning a field value to a structure!
BR,
Disha.
Pls reward points for useful answers.
My code in this exit is:
class CL_ABAP_CONTAINER_UTILITIES definition load.
data : txt_960(960) type c.
loop at poitem where delete_ind is initial.
Clear work areas
clear: e_poitem_ext,
e_poitem_extx,
txt_960.
move poitem-po_item to e_poitem_ext-po_item.
move poitem-po_item to e_poitem_extx-po_item.
Moving Y data:
move poitem-yyntransp to e_poitem_ext-yyntransp.
move 'X' to e_poitem_extx-yyntransp.
Moving Y data:
move poitem-yyaprov to e_poitem_ext-yyaprov.
move 'X' to e_poitem_extx-yyaprov.
move poitem-yyncarr to e_poitem_ext-yyncarr.
move 'X' to e_poitem_extx-yyncarr.
extensionin (BAPI_TE_MEPOITEM):
CALL METHOD cl_abap_container_utilities=>fill_container_c
EXPORTING
im_value = e_poitem_ext
IMPORTING
ex_container = txt_960
EXCEPTIONS
illegal_parameter_type = 1
OTHERS = 2.
extensionin-structure = 'BAPI_TE_MEPOITEM'.
extensionin-valuepart1 = txt_960(240).
extensionin-valuepart2 = txt_960+240(240).
extensionin-valuepart3 = txt_960+480(240).
extensionin-valuepart4 = txt_960+720(240).
append extensionin.
extensionin (BAPI_TE_MEPOITEMX):
clear: txt_960.
CALL METHOD cl_abap_container_utilities=>fill_container_c
EXPORTING
im_value = e_poitem_extx
IMPORTING
ex_container = txt_960
EXCEPTIONS
illegal_parameter_type = 1
OTHERS = 2.
extensionin-structure = 'BAPI_TE_MEPOITEMX'.
extensionin-valuepart1 = txt_960(240).
extensionin-valuepart2 = txt_960+240(240).
extensionin-valuepart3 = txt_960+480(240).
extensionin-valuepart4 = txt_960+720(240).
append extensionin.
endloop.
But the PO is generated without our Y data ( they were not saved in EKPO table).
What is wrong?
Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.