cancel
Showing results for 
Search instead for 
Did you mean: 

Purchase Order item customer fields

Former Member
0 Kudos

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!

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

I had to implement ME_BAPI_PO_CUST method map2i_extensionin.

Thanks!

Former Member
0 Kudos

Hi MM_SRM,

Just want to tell you that its good that you mentioned how your prob got solved as it helped me in solving mine. I was struggling for quite a while.

Regards,

SV

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi Atul,

This line

wa_BAPIPAREX-VALUEPART1 = wa_BAPI_TE_MEPOITEM.

Is getting an error message:

Are not mutually convertible in a Unicode System.

how can I solve this?

Thanks!

Former Member
0 Kudos

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.

Former Member
0 Kudos

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!

Former Member
0 Kudos

Please!!! Any ideas???