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

populate extended idoc fields

Former Member
0 Likes
1,822

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...

1 ACCEPTED SOLUTION
Read only

former_member404244
Active Contributor
0 Likes
1,230

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

9 REPLIES 9
Read only

Former Member
0 Likes
1,230

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

Read only

0 Likes
1,230

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??

Read only

Former Member
0 Likes
1,230
*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

Read only

Former Member
0 Likes
1,230

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

Read only

0 Likes
1,230

nice...

but how do i know the particular enhancement of a particular idoc?

<b>plz clarify the above doubts also....</b>

thanx in advance...

Read only

former_member404244
Active Contributor
0 Likes
1,230

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

Read only

0 Likes
1,230

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??

Read only

former_member404244
Active Contributor
0 Likes
1,231

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

Read only

0 Likes
1,230

thanx a lot...

i will give points to all of u...

thanx once again