UNT segment generation in Idoc to EDIFACT mapping

Hi Experts,
I have gone through many blogs and found some of the solution.
1) Mapping through count function, which is not working as per my understanding.
2) Confuguration through seeburger workbench, but since we are having SAP PO 7.4 so seeburger is replaced by B2B Toolkit so this solution cannot be considered.
The mapping is as per the snapshot :-
UNT : 0074 - Number of Segmets in(Quantity of segments in the message) Calculated.
Please suggest the appropriate solution, we are using SAP PO 7.4 so it would be better if we can do anthing in the mapping than configuration part.
Thanks in advance for your valuable inputs.
Thanks,
Nidhi

Hi Dimitri,
I tried doing that but I am not able to get the result as "1" in the output if I am putting constant 1 in the UNT and UNZ segment fields.
Output:-
Have I done the correct settings? Is anything else need to be done?
Please guide.
Thanks,
Nidhi

Similar Messages

  • Mapping iDoc to EDIFACT: Segment Count

    Hi experts,
    I am mapping a DELVRY05 iDoc to an EDIFACT DESADV document. Everythings fine so far, but I'm encountering troubles with filling the EDIFACT UNT Segment with the number of segments in the generated message.
    I am using the OPI2 conversion module and so I get a nice xml structure for the EDIFACT message. Is there a way to count created xml nodes? I think this would solve my issue.
    Thanks for your answers!

    That is an example for the source idoc
    <?xml version="1.0" encoding="UTF-8"?>
    <DELVRY05>
       <IDOC BEGIN="1">
          <EDI_DC40 SEGMENT="1">
             <TABNAM>EDI_DC40</TABNAM>
             <MANDT>100</MANDT>
             <DOCNUM>0000000002603007</DOCNUM>
             <DOCREL>700</DOCREL>
             <STATUS>30</STATUS>
             <DIRECT>1</DIRECT>
             <OUTMOD>2</OUTMOD>
             <IDOCTYP>DELVRY05</IDOCTYP>
             <MESTYP>DESADV</MESTYP>
             <SNDPOR>SAPKTS</SNDPOR>
             <SNDPRT>LS</SNDPRT>
             <SNDPRN>KTS100</SNDPRN>
             <RCVPOR>A000000016</RCVPOR>
             <RCVPRT>KU</RCVPRT>
             <RCVPFC>WE</RCVPFC>
             <RCVPRN>0004088156</RCVPRN>
             <CREDAT>20101123</CREDAT>
             <CRETIM>115322</CRETIM>
             <SERIAL>20101123115321</SERIAL>
          </EDI_DC40>
          <E1EDL20 SEGMENT="1">
             <VBELN>0080775647</VBELN>
             <VSTEL>0132</VSTEL>
             <VKORG>0130</VKORG>
             <LGNUM>132</LGNUM>
             <INCO1>EXW</INCO1>
             <INCO2>Leonding</INCO2>
             <ROUTE>009999</ROUTE>
             <VSBED>25</VSBED>
             <BTGEW>0.500</BTGEW>
             <NTGEW>0.500</NTGEW>
             <GEWEI>KGM</GEWEI>
             <VOLUM>0.000</VOLUM>
             <ANZPK>00000</ANZPK>
             <PODAT>20101123</PODAT>
             <POTIM>115321</POTIM>
             <E1EDL22 SEGMENT="1">
                <VSTEL_BEZ>Neuson Ersatzt.Linz II</VSTEL_BEZ>
                <VKORG_BEZ>Neuson Linz</VKORG_BEZ>
                <LGNUM_BEZ>LVS Neuson Linz Ersat. II</LGNUM_BEZ>
                <INCO1_BEZ>Ab Werk</INCO1_BEZ>
                <ROUTE_BEZ>NK Linz</ROUTE_BEZ>
                <VSBED_BEZ>Spedition</VSBED_BEZ>
             </E1EDL22>
             <E1EDL21 SEGMENT="1">
                <LFART>LF</LFART>
                <EXPKZ>X</EXPKZ>
                <LIFSK>10</LIFSK>
                <LPRIO>00</LPRIO>
                <KDGRP>02</KDGRP>
                <TRAGR>0100</TRAGR>
                <TRSPG>03</TRSPG>
                <E1EDL23 SEGMENT="1">
                   <LFART_BEZ>Auslieferung</LFART_BEZ>
                   <LIFSK_BEZ>zu verpacken</LIFSK_BEZ>
                   <KDGRP_BEZ>Handel</KDGRP_BEZ>
                   <TRAGR_BEZ>Transportgr. NK</TRAGR_BEZ>
                </E1EDL23>
             </E1EDL21>
             <E1EDL18 SEGMENT="1">
                <QUALF>ORI</QUALF>
             </E1EDL18>
             <E1ADRM1 SEGMENT="1">
                <PARTNER_Q>AG</PARTNER_Q>
                <PARTNER_ID>0004088156</PARTNER_ID>
                <LANGUAGE>EN</LANGUAGE>
                <FORMOFADDR>Firma</FORMOFADDR>
                <NAME1>Caterpillar Ltd.</NAME1>
                <STREET1>Peckleton Lane</STREET1>
                <POSTL_COD1>LE9 9JT</POSTL_COD1>
                <CITY1>Leicester</CITY1>
                <TELEPHONE1>14558258-00</TELEPHONE1>
                <COUNTRY1>GB</COUNTRY1>
             </E1ADRM1>
             <E1ADRM1 SEGMENT="1">
                <PARTNER_Q>SP</PARTNER_Q>
                <PARTNER_ID>0006006873</PARTNER_ID>
                <LANGUAGE>DE</LANGUAGE>
                <NAME1>DHL Express</NAME1>
                <STREET1>BleibtreustraÃu0178e 2</STREET1>
                <POSTL_COD1>1110</POSTL_COD1>
                <CITY1>Wien</CITY1>
                <TELEPHONE1>1 76600-3286</TELEPHONE1>
                <TELEFAX>1 76600-3475</TELEFAX>
                <COUNTRY1>AT</COUNTRY1>
                <REGION>W</REGION>
             </E1ADRM1>
             <E1ADRM1 SEGMENT="1">
                <PARTNER_Q>WE</PARTNER_Q>
                <PARTNER_ID>0004088156</PARTNER_ID>
                <LANGUAGE>EN</LANGUAGE>
                <FORMOFADDR>Firma</FORMOFADDR>
                <NAME1>Caterpillar Ltd.</NAME1>
                <STREET1>Peckleton Lane</STREET1>
                <POSTL_COD1>LE9 9JT</POSTL_COD1>
                <CITY1>Leicester</CITY1>
                <TELEPHONE1>14558258-00</TELEPHONE1>
                <COUNTRY1>GB</COUNTRY1>
             </E1ADRM1>
             <E1ADRM1 SEGMENT="1">
                <PARTNER_Q>OSP</PARTNER_Q>
                <PARTNER_ID>0132</PARTNER_ID>
                <LANGUAGE>DE</LANGUAGE>
                <NAME1>Neuson Ersatzt. Linz II</NAME1>
                <COUNTRY1>AT</COUNTRY1>
             </E1ADRM1>
             <E1ADRM1 SEGMENT="1">
                <PARTNER_Q>OSO</PARTNER_Q>
                <PARTNER_ID>0130</PARTNER_ID>
                <LANGUAGE>DE</LANGUAGE>
                <COUNTRY1>AT</COUNTRY1>
             </E1ADRM1>
             <E1EDT13 SEGMENT="1">
                <QUALF>006</QUALF>
                <NTANF>20101123</NTANF>
                <NTANZ>000000</NTANZ>
                <NTEND>20101123</NTEND>
                <NTENZ>000000</NTENZ>
                <ISDD>00000000</ISDD>
                <ISDZ>000000</ISDZ>
                <IEDD>00000000</IEDD>
                <IEDZ>000000</IEDZ>
             </E1EDT13>
             <E1EDT13 SEGMENT="1">
                <QUALF>003</QUALF>
                <NTANF>20101123</NTANF>
                <NTANZ>000000</NTANZ>
                <NTEND>20101123</NTEND>
                <NTENZ>000000</NTENZ>
                <ISDD>00000000</ISDD>
                <ISDZ>000000</ISDZ>
                <IEDD>00000000</IEDD>
                <IEDZ>000000</IEDZ>
             </E1EDT13>
             <E1EDT13 SEGMENT="1">
                <QUALF>001</QUALF>
                <NTANF>20101123</NTANF>
                <NTANZ>000000</NTANZ>
                <NTEND>20101123</NTEND>
                <NTENZ>000000</NTENZ>
                <ISDD>00000000</ISDD>
                <ISDZ>000000</ISDZ>
                <IEDD>00000000</IEDD>
                <IEDZ>000000</IEDZ>
             </E1EDT13>
             <E1EDT13 SEGMENT="1">
                <QUALF>007</QUALF>
                <NTANF>20101123</NTANF>
                <NTANZ>000000</NTANZ>
                <NTEND>20101123</NTEND>
                <NTENZ>000000</NTENZ>
                <ISDD>00000000</ISDD>
                <ISDZ>000000</ISDZ>
                <IEDD>00000000</IEDD>
                <IEDZ>000000</IEDZ>
             </E1EDT13>
             <E1EDT13 SEGMENT="1">
                <QUALF>010</QUALF>
                <NTANF>20101123</NTANF>
                <NTANZ>000000</NTANZ>
                <NTEND>20101123</NTEND>
                <NTENZ>000000</NTENZ>
                <ISDD>00000000</ISDD>
                <ISDZ>000000</ISDZ>
                <IEDD>00000000</IEDD>
                <IEDZ>000000</IEDZ>
             </E1EDT13>
             <E1EDT13 SEGMENT="1">
                <QUALF>015</QUALF>
                <NTANF>20101123</NTANF>
                <NTANZ>000000</NTANZ>
                <NTEND>20101123</NTEND>
                <NTENZ>000000</NTENZ>
                <ISDD>00000000</ISDD>
                <ISDZ>000000</ISDZ>
                <IEDD>00000000</IEDD>
                <IEDZ>000000</IEDZ>
             </E1EDT13>
             <E1EDL33 SEGMENT="1">
                <ALAND>AT</ALAND>
                <EXPVZ>3</EXPVZ>
                <IEVER>3</IEVER>
                <E1EDL34 SEGMENT="1">
                   <EXPVZ_BEZ>StraÃu0178enverkehr</EXPVZ_BEZ>
                   <IEVER_BEZ>StraÃu0178enverkehr</IEVER_BEZ>
                </E1EDL34>
             </E1EDL33>
             <E1EDL28 SEGMENT="1">
                <ROUTE>009999</ROUTE>
                <ROUID>NK LINZ</ROUID>
                <DISTZ>0.000</DISTZ>
                <E1EDL29 SEGMENT="1">
                   <ROUTE_BEZ>NK Linz</ROUTE_BEZ>
                </E1EDL29>
             </E1EDL28>
             <E1EDL24 SEGMENT="1">
                <POSNR>000010</POSNR>
                <MATNR>000000001000248477</MATNR>
                <MATWA>000000001000003928</MATWA>
                <ARKTX>PNEUMATIC SPRING</ARKTX>
                <ORKTX>Gasfeder 350N/L185/Hub64</ORKTX>
                <SUGRD>0001</SUGRD>
                <MATKL>000040900</MATKL>
                <WERKS>0131</WERKS>
                <LGORT>E002</LGORT>
                <LFIMG>1.000</LFIMG>
                <VRKME>ST</VRKME>
                <LGMNG>1.000</LGMNG>
                <MEINS>ST</MEINS>
                <NTGEW>0.500</NTGEW>
                <BRGEW>0.500</BRGEW>
                <GEWEI>KGM</GEWEI>
                <VOLUM>0.000</VOLUM>
                <LADGR>0131</LADGR>
                <TRAGR>0100</TRAGR>
                <VKBUR>0131</VKBUR>
                <VTWEG>02</VTWEG>
                <SPART>01</SPART>
                <GRKOR>000</GRKOR>
                <POSEX>000000</POSEX>
                <VFDAT>00000000</VFDAT>
                <EXPIRY_DATE_EXT>0</EXPIRY_DATE_EXT>
                <VGBEL>0001416863</VGBEL>
                <VGPOS>000020</VGPOS>
                <ORMNG>         1.000</ORMNG>
                <EXPIRY_DATE_EXT_B>0</EXPIRY_DATE_EXT_B>
                <E1EDL25 SEGMENT="1">
                   <LGORT_BEZ>Ersatzteill. 02</LGORT_BEZ>
                   <LADGR_BEZ>Neuson Ersatzteile</LADGR_BEZ>
                   <TRAGR_BEZ>Transportgr. NK</TRAGR_BEZ>
                   <VKBUR_BEZ>Neuson Ersatzteile</VKBUR_BEZ>
                   <VTWEG_BEZ>NK Ersatzteile</VTWEG_BEZ>
                   <SPART_BEZ>Produktsparte 01</SPART_BEZ>
                </E1EDL25>
                <E1EDL26 SEGMENT="1">
                   <PSTYV>ZERS</PSTYV>
                   <MATKL>000040900</MATKL>
                   <PRODH>409</PRODH>
                   <UMVKZ>1</UMVKZ>
                   <UMVKN>1</UMVKN>
                   <UEBTO>0.0</UEBTO>
                   <UNTTO>0.0</UNTTO>
                   <E1EDL27 SEGMENT="1">
                      <PSTYV_BEZ>Normalpos Ersatzteil</PSTYV_BEZ>
                      <MATKL_BEZ>Gasfeder</MATKL_BEZ>
                      <PRODH_BEZ>Gasfeder</PRODH_BEZ>
                      <WERKS_BEZ>Wacker Neuson Linz GmbH ET</WERKS_BEZ>
                   </E1EDL27>
                </E1EDL26>
                <E1EDL35 SEGMENT="1">
                   <STAWN>83024900</STAWN>
                   <EXPRF>10000</EXPRF>
                   <EXART>1</EXART>
                   <HERKL>FR</HERKL>
                   <GRWRT>          0.00</GRWRT>
                   <E1EDL36 SEGMENT="1">
                      <STXT1>Beschläge und ähnliche Waren, aus</STXT1>
                      <STXT2>unedlen Metallen, für anderweit nicht</STXT2>
                      <STXT3>genannte Zwecke (ausg. Scharniere, Lauf-</STXT3>
                      <STXT4>rädchen oder -rollen und Baubeschläge)</STXT4>
                      <EXPRF_BEZ>Ausfuhr o. voran. zollr. Best.</EXPRF_BEZ>
                      <EXART_BEZ>Kauf/Verkauf</EXART_BEZ>
                      <HERKL_BEZ>Frankreich</HERKL_BEZ>
                   </E1EDL36>
                </E1EDL35>
                <E1EDL43 SEGMENT="1">
                   <QUALF>C</QUALF>
                   <BELNR>0001416863</BELNR>
                   <POSNR>000020</POSNR>
                   <DATUM>20101123</DATUM>
                </E1EDL43>
                <E1EDL41 SEGMENT="1">
                   <QUALI>001</QUALI>
                   <BSTNR>TEST FAH</BSTNR>
                   <BSTDT>20101123</BSTDT>
                </E1EDL41>
             </E1EDL24>
          </E1EDL20>
       </IDOC>
    </DELVRY05>
    and thats what for the moment is the output for the EDIFACT before OPI2 conversion module. UNT segment count is hardcoded set to 1.
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:EDIFACTMessage xmlns:ns0="http://cbsgmbh.com/xi/EDIFACT/99A">
       <Header>
          <SenderID>Test_SenderSystem</SenderID>
          <ReceiverID>Test_ReceiverSystem</ReceiverID>
          <MessageType>EDIFACTMessage</MessageType>
       </Header>
       <ListOfDespatchAdvises>
          <DespatchAdvise>
             <HEADING>
                <UNH>
                   <UNH01>0000000002603007</UNH01>
                   <UNH02>
                      <S00901>DESADV</S00901>
                      <S00902>D</S00902>
                      <S00903>98B</S00903>
                      <S00904>UN</S00904>
                   </UNH02>
                </UNH>
                <BGM>
                   <BGM01>
                      <C00201>351</C00201>
                   </BGM01>
                   <BGM02>
                      <C10601>0000000002603007</C10601>
                   </BGM02>
                   <BGM03>9</BGM03>
                </BGM>
                <DTM>
                   <DTM01>
                      <C50701>11</C50701>
                      <C50702>00201011230000</C50702>
                   </DTM01>
                </DTM>
                <DTM>
                   <DTM01>
                      <C50701>132</C50701>
                      <C50702>00201011230000</C50702>
                   </DTM01>
                </DTM>
                <DTM>
                   <DTM01>
                      <C50701>137</C50701>
                      <C50702>00201011230000</C50702>
                   </DTM01>
                </DTM>
                <MEA>
                   <MEA01>PD</MEA01>
                   <MEA02>
                      <C50201>G</C50201>
                   </MEA02>
                   <MEA03>
                      <C17401>KGM</C17401>
                      <C17402>0.500</C17402>
                   </MEA03>
                </MEA>
                <MEA>
                   <MEA01>PD</MEA01>
                   <MEA02>
                      <C50201>N</C50201>
                   </MEA02>
                   <MEA03>
                      <C17401>KGM</C17401>
                      <C17402>0.500</C17402>
                   </MEA03>
                </MEA>
                <MEA>
                   <MEA01>PD</MEA01>
                   <MEA02>
                      <C50201>WT</C50201>
                   </MEA02>
                   <MEA03>
                      <C17401>KGM</C17401>
                      <C17402>0.500</C17402>
                   </MEA03>
                </MEA>
             </HEADING>
             <DETAIL>
                <CPS>
                   <CPS01>1</CPS01>
                   <CPS03>3</CPS03>
                </CPS>
                <SG16>
                   <LIN>
                      <LIN02>000010</LIN02>
                   </LIN>
                   <PIA>
                      <PIA01>1</PIA01>
                      <PIA02>
                         <C21201>0001416863</C21201>
                         <C21202>PO</C21202>
                      </PIA02>
                   </PIA>
                   <PIA>
                      <PIA01>1</PIA01>
                      <PIA02>
                         <C21201>000020</C21201>
                         <C21202>PL</C21202>
                      </PIA02>
                   </PIA>
                   <PIA>
                      <PIA01>1</PIA01>
                      <PIA02>
                         <C21201>TEST FAH</C21201>
                         <C21202>ON</C21202>
                      </PIA02>
                   </PIA>
                </SG16>
             </DETAIL>
             <SUMMARY>
                <UNT>
                   <UNT01>1</UNT01>
                   <UNT02>0000000002603007</UNT02>
                </UNT>
             </SUMMARY>
          </DespatchAdvise>
       </ListOfDespatchAdvises>
    </ns0:EDIFACTMessage>

  • EDI file Mapping.. problem with UNT segment..!!

    Hi all,
    Anyone who worked on EDI files, pls help me..
    Doing Idoc to EDI scenario..
    I done for all the mapping for all the fields except for the UNT segment and field D_0074
    Here i need to provide no of segments in the EDI file...
    like
    *UNBUNOA:393777:ZZ93139:ZZ080108:09080+++1'
    UNH0000016334368DESADV:D:01B:UN:EAN007'
    BGM3510094147783+9'
    DTM+137:200801080934:203'
    DTM+11:200801080934:203'
    DTM+17:200801100000:203'
    ALI++168165'
    RFF+ON:R-08007E'
    DTM+171:20080107:102'
    NADSU377996::92'
    NADST9418GR::92'
    CPS1+5'
    PAC9+09::9'
    MEAPDAAA+KGM:6306.628'
    MEACTNPP+NAR:9' 
    CPS21+3'
    PAC109::9F:CHEP'
    MEAPDAAA+KGM:256.828'
    PCI+33E'
    GINAW393100471000832922'
    LIN1+19310047208023:SRV'
    QTY+12:44'
    DTM+36:20090505:102'
    CNT+2:2'
    UNT240000016334368'
    If you observe the above file which is my resultant file.. I need to count all the segments above UNT and pass the value( here total segments are 24) to D_0074 field .
    Is it any way we can count all the segments.. and pass the value??
    Kindly suggest me ..
    waiting for your replys..
    Regards
    Seema.

    Problem here is ..
    They have created only SCv  Seebutger_EDI_Adpater 
    but they haven't created for Seebutger_GENERIC_EDI ..
    all those mappings will be under Seebutger_GENERIC_EDI .. which they haven;t installed..
    thats the problem..
    If any one has that UDF .. kindly let me know..
    -Seema.

  • DESADV01 E1EDP07 segment per line item causes EDIFACT error

    When a Sales Order has the PO Number + Date populated, the subsequent outbound Delivery IDoc (DESADV01) contains a parent E1EDP07 segment for every child line item segment (E1EDP09).  For a SO without PO Date, the IDoc is created with a single E1EDP07 with multiple child E1EDP09 segments.  This is standard SAP - do you need to code around this?
    The first scenario causes an error in EDIFACT mapping, as a limit of 9 RFF segments is allowed (E1EDP07 is a level 1 segment).  Partner systems reject this.

    Hi,
    Segment field should be optional, so check the posting keys in OB41, check the GL account which hit this posting and check the FIeld status in OBC4 and make the segment field as optional.
    while posting the transactions you can check in more then Profit center and segment details will be updated in the postings.
    try out, this might help. check the new ledger document types also.
    Regards,
    Padma

  • Get the value of a particular field in a segment of an Idoc

    Hi All,
    I have a requirement where I need to write a report which will fetch the value of a particular field in a segment of an idoc.
    I have the idoc number segment and field name as input parameters by which I can fetch Sdata from EDID4 but the confusion is how to find the exact field value from that Sdata. How to Map the SDATA to the segment structure.
    Please advice...

    Hi,
    I have one last doubt that may be you people can help with... The user will be giving the segment name and field name as input. So by following Kesav's code while i can get all the values in the segment structure at runtime please suggest how to display any one field from that structure given that that particular field will come at runtime.
    EX: user gives an idoc number 123 (say belonging to Orders basic type)
                                 segment E1EDK01
                                 field  BELNR.
    So i need to display the value of E1EDK01-BELNR of idoc number 123.
    Please suggest how to achieve this....

  • IDOC-Segment Created a idoc document against Billing document

    Dear All,
    Thanks in  advance.
    Already created a idoc document against Billing document and one of the IDOC segment is not in the IDOC document output segments(WE05) actually it missed the segment.
    so i want to add the segment which it was missed during generation of IDOC document against billing document.
    Example:
    a) IDOC document misses one segment let suppose "Seg1".
    b) In "Seg1" it have only one field let suppose "Field1".
    c) But "Field1" does not have any value while generation of IDOC document so it doesn't create the respective segment in IDOC document.
    d) so here, i want to edit the IDOC document to add the "Seg1" in the IDOC document and reprocessing the IDOC document.
    Please help on this issue.
    Regards,
    Sridhar.

    Hello,
              If your requirement is to have the Segment even with only 1 Field, you'll have to create an Idoc Extension in WE30.
             In order to populate the Custom Segment, Use the Customer Function '002' in the IDOC_OUTPUT_INVOIC which is EXIT_SAPLVEDF_002 where you can actually insert the Segment as a Child Segment of an Appropriate Segment.
            You can go for Custom segment with the IDoc Extension so that you dont have to manually insert the Segment again and again while reprocessing it.
    Thanks and Regards,
    Venkat Phani Prasad Konduri

  • IDoc to RFC Mapping.

    Hi Everyone,
    I have a problem with mapping. My Scneario is Idoc to RFC.
    Eg. Sender: GSVERF03             
       ->IDOC                                    
    E1EDP01 (Occ. 0 to n)                           
            ...Field_A                                               
            ...Field_B
            ...E1EDP02 (Occ 0 to 25)
      ......          Field_C
      ......          Field_D
      ......          Field_E
    Receiver: ZRFC
      ->T_DELVRY
    ... ->item
    ........      Field_1
    ........      Field_2
    ........      Field_3
    Conditions:
    If Field_A = 001, then Field_B = Field_3.
    If Field_A = 001,
        then
        If Field_C = 001, then Field_D = Field_1.
        If Field_C = 001, then Field_E = Field_2.
    As per my business requirement, i wont get more than one E1EDP02 segment.
    How to do this mapping using Graphical mapping.
    Rgds,
    ¬Nav

    Field_3
    +If Field_A = 001, then Field_B = Field_3
    >
    This can be achieved by IfWithoutElse
    Check your condition using If and give Field_B as second parameter
    Field_1
    If Field_A = 001,
    then
    If Field_C = 001, then Field_D = Field_1.
    If Field_C = 001, then Field_E = Field_2.
    >
    here check Field_A condition , 2nd input of this IfWithoutElse check for conditions on FIeld_C
    Similar would be for Field_2
    You will have to check with context. try by setting context of Field_C,Field_D,Field_E to
    E1EDP01

  • IDOC to File Mapping problem.

    Hi all,
    I am working on IDOC to file scenario. Here I need to create CSV file for some fields of the IDOC. Actually flat file should contain around 65 comma separated fields irrespective (independent of the segment presence in the IDOC) of the existence of the corresponding filed in the idoc structure. So could you please tell me how to handle this situation?
    Here file is supposed to be created with 65 fields. But it only contains few of those, as some segments in the IDOC are missing. Is there any dependency between the filed and its header/segment?
    Thanks in advance,
    -Kanth.

    Hi Prasad,
    <i>But it only contains few of those, as some segments in the IDOC are missing. Is there any dependency between the filed and its header/segment?</i> - yes, if your  source IDOC is having some segments missing, then your target will not have those segments, so some of your target data will be lost.......
    To avoid this you can go for a JAVA mapping.....
    Thanks,
    Rajeev Gupta

  • IDoc HRMD_A.HRMD_A07 mapping

    Hi,
    I am doing a File to Idoc mapping using HRMD_A.HRMD_A07 Idoc, I see the Idoc segments as  E1P0001,E1P0002,E1P0003......I see the same fields(personal no, start date,end date etc) repeating in all the above segments.I would like to know which segment I need to use for mapping.
    Thanks

    you might have received the Functional specs or the mapping sheet in which you will have the details of which info type to be filled and sent as an idoc to sap.
    to know segment wise details in case your file structure doesn't have detailed info,  run Tcode We60 -> give the basic type
    HRMD_A07 and read documentation for each info type segment .
    or  download this PDF
    http://help.sap.com/printdocu/core/print46b/en/data/en/pdf/HRINF.pdf
    other useful tcode from sap point of view .
    Pa30 , pa 40 and in se11-> give info type line pa0001 ,pa 0002 etc and check the details of each info type and fields req.
    if a custom info type is there then i think it will have name something like Pa9XXX.
    Best Regards,
    Srinivas

  • Reg: JDBC to IDOC Scenario Message Mapping

    hi Friends
    i am designing a Scenario JDBC - IDOC for accounting document interface using ACC_DOCUMENT03 idoc.
    i need the mapping program for that to map the JDBC fields with the IDOC fields, so can anyone help me the mandatory fields and the constant values for the IDOC which has to be mapped.Along with this can i know why the constants will be assigned to the fields like Begin =1 , MSGFN = 009 etc how these constants are defined.
    Thanks&Regards
    suman.

    Hi,
    for mapping constants in graphical msg mapping, select your target IDOC field..........then you have a constant in the below screen.........click it and then double-click on constant to change the value of the constant field.........then map this constant to your target IDOC field.
    for knowing which are the mandatory fields, ask your functional guys to tell you the mandatory fields in data segment of your IDOC and regarding Control segment EDIDC, you have to map fields which have sender and reciever system details.
    Regards,
    Rajeev Gupta
    Edited by: RAJEEV GUPTA on Feb 2, 2009 7:55 AM

  • Populating the SEGMENT attribute for  IDocs

    When mapping to an IDoc, each IDoc data element has a corresponding SEGMENT attribute, which I assume is the sequential segment number of the segment in the IDoc.
    Does that value need to be set, or does the IDoc adapter take care of it? If I do need to map it, how can I do it, because I would need to find a way of generating a running number either in the mapper, or externally in an XSL mapping file.

    Hi,
    OK thanks for explicitly stating thae answer! I was hoping for that.
    BR,
    Tony.

  • How to include segments to  standard idoc PEXR2002 ..

    How to include the below segments to the standard  idoc PEXR2002 ..
    E2EDK02
    E2EDK12
    I want to map the check number to E2EDK12-BELNR depending on the document number.
    I have a recording in shdb..but my real question is it where to have this logic..
    Any suggestion would be highly appreciated.
    Thanks,

    U will have to create IDoc Extension for this.
    Goto WE30 select the Radio button Extension.
    Link it with the basic Idoc Type.
    Then attach the new segments in the IDoc.

  • Determining new segments for an idoc.

    hi guys,
    i have to map data on an idoc. the problem is that in the idoc there can be header and item segments. using an element referred as Id , i must be able to create a new segment for the idoc.
    can anyone please help me.
    thanks in advance

    Hi,
    You can use CreateIf Node function to create the segments based on the condition.
    <Condition>-CreateIf NodeFuction--<Node of the target segment>.
    The target segment will be created only if the condition is true.
    See the below link for more details.
    http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
    Regards,
    Shweta

  • How to add a custom segment in standard IDoc?

    Hi,
    I want to add a custom segment in stanard IDoc type (eg. MATMAS). I don't want to go for extended idoc (copying stanard idoc into zidoc and adding custom segment).
    Please tell me.

    Hello
    Transaction BD10 uses fm MASTERIDOC_CREATE_REQ_MATMAS which in turn uses MASTERIDOC_CREATE_MATMAS to create and distribute material master IDocs.
    Fm MASTERIDOC_CREATE_MATMAS belongs to function group MV01 in package MGV. Here you will find the user-exit function group XMGV.
    Perhaps EXIT_SAPLMV01_002 might be useful for you.
    Regards
      Uwe

  • Error when Adding a segment to an IDOC

    Hi I have added one segment to an IDOC through one user exit and it is giving the error with status 26.
    Here I am pasting the error details,
    The segment E1IDT02 does not occur at the current level of the basic type PEXR2001 (extension ).
    This error can have several reasons:
    The segment E1IDT02 is assigned to a group whose header segment does not occur.
    The segment E1IDT02 does not exist in the syntax description of the basic type PEXR2001 (extension ).
    The sequence of segments in the group in which the segment appears is incorrect.
    Previous errors ('mandatory' segment or group missing) may be due to this error.
    Can any body help me, and let me know what can I do to avoid this.
    Thanks,
    Deepak.

    Actually in the basic type of IDOC, there is no segment with this name. But I am adding this directly in an user exit. Can you tell me what is the actual procedure to add a new segment to the basic type of IDOC
    Thanks
    ravi

Maybe you are looking for