Application Development 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: 

Populate the values for new segment in E1EDP01

Former Member
0 Kudos

Hi All,

I have a requirement were have to extend the INVOIC02 Idoc and add a segment under the E1EDP01 say z1_cust.

can anyone tell how to populate the values for custom idoc under E1EDP01.

i have the user exit to add the code , but confused in between while writing code.

Waiting for your valuable Reply.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Check the following

1. Have you released the segment in WE31?

2. Have you created an extension?

3. Have you created an entry in WE82 with

message type / basic type / extension and release.

4. Have you assigned the partner profile to the new message type / basic type / extension combination?

Hope it helps.

Sujay

11 REPLIES 11

former_member671009
Participant
0 Kudos

Hi,

hope the following code will help u.


DATA: c_z1_cust  TYPE edidd-segnam VALUE 'z1_cust',
           v_z1_cust  type z1_cust.

Loop at int_edidd(idoc data table which will be available in the user exit FM).
   if int_edidd-segnam = 'E1EDP01'.
v_z1_cust-fld1 = ' '.
v_z1_csut-fld2 = ' '.
int_edidd-segnam = c_z1_cust.
int_edidd-sdata = v_z1_cust.
append int_edidd.
clear v_z1_cust.
endif.
endloop.

Regards

Sridevi S

Former Member
0 Kudos

Hi find the sma eu will get a lot examples how to populate the Zsegment in a Idoc.

u have to use some Exit depending upon the Inbound ou outbound and u have to write code in that exit.

regards

Former Member
0 Kudos

Hi ,

The inbound function Module include for INVOIC02 is IDOC_INPUT_INVOIC_FI.

Check the User exit and BADI inside the Function Module and write your code to modify.

Prabhudas

Former Member
0 Kudos

Hi Sridevi,

I just want to conform user exit where i will writing the code.

User Exit:EXIT_SAPLVEDF_002

Include: ZXEDFU02

the mentioned the user exit is it the right place to code for populating the values for new segment under E1EDP01..?

0 Kudos

Hi,

The mentioned user exit is right. you can write a piece of code and check it by debugging.

Regards

sridevi S

Former Member
0 Kudos

Hi Sridevi,

i had mentioned a break-point in the user exit and activated too. since it was not entering in debug mode, so i got doubt whether am I writing the code in right place.

if possible can u suggest what might be the reason for this .

cheers,

Lalit

0 Kudos

Hi,

Have u done the enhancement assignment in CMOD. If not maintain in CMOD and activate it and check out. Let me know if the problem exist even after that.

Regards

Sridevi S

Former Member
0 Kudos

Hi,

First of all thanks for clearing the following queries.

In CMOD I activated the following user exit which has the code written in include.

but then also facing the same the problem.

one problem is I am not able to see the new segment which i added under the E1EDP01 in WE05 Tcode.

thanks,

Lalit.

Former Member
0 Kudos

Check the following

1. Have you released the segment in WE31?

2. Have you created an extension?

3. Have you created an entry in WE82 with

message type / basic type / extension and release.

4. Have you assigned the partner profile to the new message type / basic type / extension combination?

Hope it helps.

Sujay

Former Member
0 Kudos

Hi Sujay

I have done with the all the things that you mentioned.

I can see the extended Idoc in we05 which has been filled with the respective standard fields.

here the following the code which i added in user exit:

 DATA: lv_z1rbc_e1edp01 TYPE edidd-segnam VALUE 'z1rbc_e1edp01',
      wa_z1rbc_e1edp01 TYPE z1rbc_e1edp01.

LOOP AT int_edidd.
  IF int_edidd-segnam = 'E1EDP01'.
    LOOP AT it_rbc INTO wa_rbc.
      wa_z1rbc_e1edp01-stdat = wa_rbc-stdat.
      wa_z1rbc_e1edp01-enddt = wa_rbc-enddt.
      int_edidd-segnam = lv_z1rbc_e1edp01 .
      int_edidd-sdata = wa_z1rbc_e1edp01 .
      APPEND int_edidd.
      CLEAR wa_z1rbc_e1edp01.
    ENDLOOP.
  ENDIF.
ENDLOOP.

the it_rbc is the internal which has the following values.

please help..

Thanks,

Lalit.

0 Kudos

Hi,

You don't need to loop at the table int_edidd. This exit will get executed for all the segments.

Just check for the segment name and process.

Hope it helps.

Sujay