cancel
Showing results for 
Search instead for 
Did you mean: 

Add ernam to 2lis_02_itm

Former Member
0 Kudos

Hi all!

I would like to add the field ernam (created by) to 2lis_02_itm.

I checked in tcode LBWE but the field is not available in the communication structure MCEKKO. How can I add this field to the communication structure so that it will be available in tcode LBWE?

Thanks!

Regards,

Linda

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Linda,

here some code to implement, but no warrenty about the correctness, as I wrote it down from memory:

DATA: l_2lis_02_itm type mc02m_0itm,

l_index type sy-tabix,

lt_ekko type standard table of ekko,

wa_ekko type ekko.

IF i_datasource = '2LIS_02_ITM'.

select * into table lt_ekko from ekko for all entries in c_t_data

where ebeln = c_t_data-ebeln.

LOOP AT c_t_data into l_2lis_02_itm.

l_index = sy-tabix.

READ TABLE lt_ekko into wa_ekko

WITH KEY ebeln = l_2lis_02_itm-ebeln.

IF sy-subrc = 0.

l_2lis_02_itm-ernam = wa_ekko-ernam.

ENDIF.

modify c_t_data from l_2lis_02_itm index l_index.

ENDLOOP.

ENDIF.

Add these lines to the include ZXRSAU01.

kind regards

Siggi

Former Member
0 Kudos

Hi Siggy!

Thank you very, very much!!

I will try this code, and if it is not 100% I will get our abap'ers to help me!!

BR,

Linda!

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Linda,

therefore you need to enhance MCEKKO with an customer append to which will add the field. After activating that, you will be able to select the field from mcekko to 2lis_02_itm. After doing this, check out the datasource via rsa3. With some luck the field will already be populated. If not, you need to use the user exit to get the field from the database.

kind regards

Siggi

Former Member
0 Kudos

Hi Siggi,

Thanks for your help.

I have now added the field in mcekko and in 2lis_02_itm.

I checked in rsa3, and the field is not populated.

In need to ask our abap'er for help. Do you know which user exit we should use?

Thanks!

BR,

Linda

Former Member
0 Kudos

Hi Linda,

it is RSAP0001 and in there you need to implement, if not already done, function exit no. 1 for transactional data.

kind regards

Siggi

Former Member
0 Kudos

Hi Siggi!

Thanks again for your help!

None of our abap'ers have time to help me with this, and I'm not experienced with abap at all.

I now have function exit no1 available in RSPA0001. But I do not know what code to write to populate the field.

Do you by any chance have some sample code which I can use?

Thanks!

BR,

Linda