08-26-2010 12:36 PM
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.
08-27-2010 7:39 AM
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
08-26-2010 1:07 PM
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
08-26-2010 1:48 PM
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
08-26-2010 1:57 PM
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
08-27-2010 6:46 AM
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..?
08-27-2010 6:53 AM
Hi,
The mentioned user exit is right. you can write a piece of code and check it by debugging.
Regards
sridevi S
08-27-2010 6:59 AM
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
08-27-2010 7:19 AM
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
08-27-2010 7:25 AM
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.
08-27-2010 7:39 AM
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
08-27-2010 8:03 AM
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.
08-27-2010 9:32 AM
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