‎2006 Jun 07 12:36 PM
can anybody give me a sample <b>code</b> for populating the <b>extra added fields</b> in a segment of an extended idoc.
points will be rewarded...
‎2006 Jun 07 2:07 PM
Hi biswajit,
IF int_edidd-segnam EQ 'E1XXX'.
MOVE int_edidd-sdata TO wa_E1XXX.
FILL the data for the two fields and then
int_edidd-segnam = The extended segment name.
CLEAR int_edidd-sdata.
MOVE the two field values TO int_edidd-sdata.
APPEND int_edidd.
ENDIF.
try like this.
Hoe this helps u.
regards,
Nagaraj
‎2006 Jun 07 12:44 PM
http://help.sap.com/saphelp_erp2005/helpdata/en/dc/6b7d6243d711d1893e0000e8323c4f/frameset.htm
DATA segnam(27).
segnam = int_edidd-segnam.
CASE segnam.
WHEN 'E1EDP19'.
CLEAR int_edidd. "Clear work area
int_edidd-segnam = 'Z1TEST1'. "Name of customer segment z1test1-continent = 'Europe'.
int_edidd-sdata = z1test1. "Remaining fields from int_edidd
"can be transferred
APPEND int_edidd.
ENDCASE .
REgards,
Ravi
‎2006 Jun 07 1:05 PM
thanq for replying....
can u plz clarify me what is 'E1EDP19' and 'Z1TEST1'.
first one is header and second one is customise child segment??
if so then suppose 'Z1TEST1' contain two fields a,b of A,B table...then how to populate those two fields??
‎2006 Jun 07 1:07 PM
*Unit List
l_z1edp26-qualf = '001'.
l_z1edp26-betrg = itab-kbetr.
l_edidd-segnam = 'Z1EDP26'.
l_edidd-sdata = l_z1edp26.
append l_edidd to it_edidd.
clear l_edidd.
clear l_z1edp26.
*Extended List
l_z1edp26-qualf = '002'.
l_z1edp26-betrg = itab-kwert.
l_edidd-segnam = 'Z1EDP26'.
l_edidd-sdata = l_z1edp26.
append l_edidd to it_edidd.
clear l_edidd........
similarly you should fill the other fields..
Regards
vijay
‎2006 Jun 07 1:15 PM
Hi ,
For populating extra fields of your extended idoc , first you have to find the enhancement and the exit where you can populate this data.
Ex:
If you wanna populate some fields of orders 05 to your own added segement or the segment which doesnot populate with the stadard programs .There is a enhancement called MM06E001 and in this EXIT_SAPLEINM_002 will populate the extra data .
Already our fellow SDN'ers give sample code , that sample code you need to write into the exit.
Now, SAP is providing BAdI's also inplace of EXIT's , you can use them also .
<i>
Hope This Info Helps YOU.</i>
Regards,
Raghav
‎2006 Jun 07 1:23 PM
nice...
but how do i know the particular enhancement of a particular idoc?
<b>plz clarify the above doubts also....</b>
thanx in advance...
‎2006 Jun 07 1:38 PM
Hi Biswajit
Each idoctype will be associated with one function module.
for outbound as well as inbound
for example ORDERS05 has inbound function module
" IDOC_INPUT_ORDERS"
here u can find CALL CUSTOMER FUNCTION 'XXX'.So as per ur requirement u can use the appropriate exit and write ur code.
Hoping this will help u.
Regards,
Nagaraj
‎2006 Jun 07 1:50 PM
ok thats fine ...
now suppose my customise child segment is Z1CHILD under parent segment E1XXX. now Z1CHILD contain two extra fields of a,b of table A,B.
now what should i write for populating those two fields of a,b into the user-exit??
‎2006 Jun 07 2:07 PM
Hi biswajit,
IF int_edidd-segnam EQ 'E1XXX'.
MOVE int_edidd-sdata TO wa_E1XXX.
FILL the data for the two fields and then
int_edidd-segnam = The extended segment name.
CLEAR int_edidd-sdata.
MOVE the two field values TO int_edidd-sdata.
APPEND int_edidd.
ENDIF.
try like this.
Hoe this helps u.
regards,
Nagaraj
‎2006 Jun 08 5:48 AM
thanx a lot...
i will give points to all of u...
thanx once again