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: 

IDOC

manubhutani
Active Contributor
0 Kudos
173

Hi

I need to fill data in the idoc , but i have a segment inside a segment.

how can i fill that

can some1 provide me wiwth some code

Thanks

8 REPLIES 8

Former Member
0 Kudos
148

move 'X' to segment1-segment2-field

0 Kudos
148

But there's no field in edidd where i can put this code

can u plzz explain?

0 Kudos
148

Hi Manu,

I think you are using the custom segment??

For that you need to write the code in the respective user exit to fill the segments.

Is it clear??

Hope this will help you.

Regards,

Santosh

0 Kudos
148

IF the segment you want to populate is a standard segment:

then you can just add you code in the corresponding userexit to look for that segment(or the parent segment) and then populate the values.

IF the segment is a custom segment the you have to extend the idoc and then add the userexit code to populate the segment and append it to EDIDD

Former Member
0 Kudos
148

Hi ,

You can check IDOC_INPUT_ORDERS or check for where used list for MASTER_IDOC_DISTRIBUTE .

Please reward if useful.

0 Kudos
148

Thxx for d reply

but i need to post idoc its wud be outound

and idoc_input are for input.

Former Member
0 Kudos
148

Hi Manu

I hope this would be useful.


  wa_e1mbxyh-xblnr = wa_i_mkpf-mblnr.
  wa_e1mbxyh-tcode = wa_i_mkpf-tcode2.  
    CLEAR wa_edidd.

    wa_edidd-docnum = wa_edidc-docnum.
    wa_edidd-segnam = 'E1MBXYH'.
    wa_edidd-sdata = wa_e1mbxyh.
    APPEND wa_edidd TO i_edidd.
 
    wa_e1mbxyi-matnr = wa_i_mseg-matnr.
    wa_e1mbxyi-werks = wa_i_mseg-werks.
    wa_e1mbxyi-lgort = wa_i_mseg-lgort.
    wa_e1mbxyi-charg = wa_i_mseg-charg.
    wa_e1mbxyi-erfmg = wa_i_mseg-erfmg.
    wa_e1mbxyi-erfme = wa_i_mseg-erfme.
    wa_e1mbxyi-bwart = wa_i_mseg-bwart.
 
    CLEAR wa_edidd.
    wa_edidd-docnum = wa_edidc-docnum.
    wa_edidd-segnam = 'E1MBXYI'.
    wa_edidd-sdata = wa_e1mbxyi.
    APPEND wa_edidd TO i_edidd.
 
      wa_zitem-refnum = qmel-qmnum.
      wa_zitem-reascd = qmel-qmart.
 
    CLEAR wa_edidd.
    wa_edidd-docnum = wa_edidc-docnum.
    wa_edidd-segnam = 'ZITEM'.
    wa_edidd-sdata = wa_zitem.
    APPEND wa_edidd TO i_edidd.
 
    wa_zitem_ext-oldrefnum = v_qmnum.
    wa_z1tem_ext-oldreascd = qmel-qmcod.
 
    CLEAR wa_edidd.
    wa_edidd-docnum = wa_edidc-docnum.
    wa_edidd-segnam = 'EXTN'.
    wa_edidd-sdata = wa_extn.
    APPEND wa_edidd TO i_edidd.

Here the Structure is

*E1MBXYH*
                *L E1MBXYI*
                                *L ZITEM*
                                 *L EXTN*

Reward points if useful.

Edited by: Raj on May 12, 2008 7:30 PM

Former Member
0 Kudos
148

hi ,

you will pass the data through the parameter stext in the segment...here you had created a child segment for a parent..so go to the child segment and fill the data in the stext field ..

regards,

venkat