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

CI_COBLX not generated

Former Member
0 Likes
762

Hello Experts,

I am the unlucky guy who has to implement a PO interface using BAPI in SAP MM though I am usually a CRM expert. I was able to create a PO using BAPI FM "BAPI_PO_CREATE1" but I had some trouble with customer specific fields in CI_COBL structure. I used the "EXTENSIONIN" segment of that FM to enrich the PO with my custom data (just a code snippet):

data: ls_poextin type bapiparex,

        lt_poextin type table of bapiparex,

        ls_bapiaccount type bapi_te_mepoaccounting,

ls_bapiaccount-po_item = '00010'.

ls_bapiaccount-serial_no = '01'.

ls_bapiaccount-zzmarket = 'AIR'.

ls_bapiaccount-zztitleid = 'BKP-18694'.

ls_bapiaccount-zzterri = 'AFR'.

ls_poextin-structure = 'BAPI_TE_MEPOACCOUNTING'.

ls_poextin-valuepart1 = ls_bapiaccount.

insert ls_poextin into table lt_poextin.

Then I passed lt_poextin to the BAPI FM without success. In debugging I noticed that an x-structure for these fields are missing. When I checked e.g. structure "MEPOACCOUNTINGX"  in se11 there was actually an include "CI_COBLX" shown. When I double clicked it system said it does not exist and I created it. I added my custom fields manually there with data type "BAPIUPDATE" (Flag) and everything works fine now.

My question: Is it really the correct way to create this structure manually? Shouldn't this be generated automatically when the coding block is generated in Tx. OXK3?

Thanks for your help in advance

Best regards

Tobias

Hello Experts,

I am the unlucky guy who has to implement a PO interface using BAPI in SAP MM though I am usually a CRM expert. I was able to create a PO using BAPI FM "BAPI_PO_CREATE1" but I had some trouble with customer specific fields in CI_COBL structure. I used the "EXTENSIONIN" segment of that FM to enrich the PO with my custom data (just a code snippet):

data: ls_poextin type bapiparex,

        lt_poextin type table of bapiparex,

        ls_bapiaccount type bapi_te_mepoaccounting,

ls_bapiaccount-po_item = '00010'.

ls_bapiaccount-serial_no = '01'.

ls_bapiaccount-zzmarket = 'AIR'.

ls_bapiaccount-zztitleid = 'BKP-18694'.

ls_bapiaccount-zzterri = 'AFR'.

ls_poextin-structure = 'BAPI_TE_MEPOACCOUNTING'.

ls_poextin-valuepart1 = ls_bapiaccount.

insert ls_poextin into table lt_poextin.

Then I passed lt_poextin to the BAPI FM without success. In debugging I noticed that an x-structure for these fields are missing. When I checked e.g. structure "MEPOACCOUNTINGX"  in se11 there was actually an include "CI_COBLX" shown. When I double clicked it system said it does not exist and I created it. I added my custom fields manually there with data type "BAPIUPDATE" (Flag) and everything works fine now.

My question: Is it really the correct way to create this structure manually? Shouldn't this be generated automatically when the coding block is generated in Tx. OXK3?

Thanks for your help in advance

Best regards

Tobias

1 REPLY 1
Read only

Former Member
0 Likes
624

I forgot to mention that I added the following code snippet after creating the CI_COBLX fields:

  ls_bapiaccountx-po_item = '00010'.

   ls_bapiaccountx-serial_no = '01'.

   ls_bapiaccountx-zzmarket = 'X'.

   ls_bapiaccountx-zztitleid = 'X'.

   ls_bapiaccountx-zzterri = 'X'.

   ls_poextin-structure = 'BAPI_TE_MEPOACCOUNTINGX'.

   ls_poextin-valuepart1 = ls_bapiaccountx.

   insert ls_poextin into table lt_poextin.