ABAP Mapping + IDOC

Hello !
i need to do an aplication to PI that use IDOC and ABAP Mapping.
i'd like to know how can i do to use a IDOC structure in interface "IF_MAPPING" to ABAP Mapping.
Can you help me please?
Thanks a lot!
Patricia
Edited by: Patricia_Sena on Jul 20, 2011 3:49 PM

Hi,
i have a .txt that will be send to SAP.
this archive should be insert in SAP though idoc.
this is the problem and i have to use the abap mapping....
i knew that this could be use with java mapping....but i have have to use abap mapping....
clear?
Tks

Similar Messages

  • Abap mapping - IDoc structure

    Hi,
    I realize an Abap mapping for "IDoc -> XI -> File" and I want to "play" with idoc segments and idoc fields...
    Thus in my coding, I need to define some internal structures which are exactly the same than IDoc segments (e.g E2LFA1M for supplier).
    Such a structure exists in R/3 (cf. tcode SE11), but this one does NOT exist in XI. It seems there is only the table IDXEDSAPPL with the list of all fields for one segment.
    Is is possible to import and use directly this structure (e.g E2LFA1M) from R/3 to XI ?
    or must I define manually in my code the same structure than in R/3 ?
    Regards.
    Mickael

    Hi Mickael,
    I have the same problem.
    How did you solve this problem?
    Regards
    Elsa

  • Idoc  - JMS queue using ABAP Mapping

    Hi all,
    I am doing a idoc to JMS queue scenario using ABAP Mapping. I am new to ABAP
    Basically i want to know how to read the OUTBOUND idoc segments and their field values. I have gone through link : IDOC--XI--IDOC Using ABAP MAPPING(Idoc to Idoc using ABAP Mapping).
    If any body could suggest me how to read idoc->segment->fields or give some sample code, it would be very helpful.
    Thanks in advance&
    Regards,
    Mani

    Hi Mani,
    Maybe it would be easier to use graphical mapping. In ABP mapping you have to parse XML and than create target document. If you want to do it I'd strongly advice you to read it:
    http://help.sap.com/saphelp_nw04/helpdata/en/47/b5413acdb62f70e10000000a114084/frameset.htm
    Regards,
    Wojtek

  • IDOC-XI-FILE Scenario: Error in ABAP Mapping

    Dear All,
    I am working on IDOC-XI-Flat FIle scenario in which I am using ABAP Mapping as per document "How To Convert an IDoc-XML
    structure to a flat file and vice versa in XI 3.0".
    I created one customized Idoc for this. The Idoc is reacing XI but its flat file is not getting created. Its giving me following error:
    <SAP:Stack>Error in mapping program Z_ABAP_MAPPING_PACKING_LIST (type SAP-ABAP, kernel error ID UNCAUGHT_EXCEPTION) An exception with the type CX_SY_REF_IS_INITIAL occurred, but was neither handled locally, nor declared in a RAISING clause Dereferencing of the NULL reference.</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
    I have also gone thru threads posted for the same topic earlier but still I am not been to resolve this error.
    Please help me out in resolving this error.
    Regards,
    N.Jain

    HI,
       Log saying that, u have problem in the mapping program.
      i.e Z_ABAP_MAPPING_PACKING_LIST
       the problem is due declaration of data.
       i hope that, you have some methods.
       those are declared under intialization section in mapping program.
      please use start of selection before the method.
    other wise, it will come under intilization section.
    warm regards
    mahesh.

  • File to IDoc : XML parsing in ABAP mapping

    Hi,
    In ABAP mapping I want to parse all of the incoming XML strings to internal table.Later I add few more fields to this table and transfer them to IDOC adapter in IDOC-XML format.In thsi case how do i get all of the input file data(converted from XML) into internal table using XML parsing in ABAP Mapping?
    Thansk in advance,
    RP

    Hi Amil,
    I insert into table but not immediately,I want all the parsed xml data into internal table and do something before I insert into DB /send it to IDOC.
    I knwo how to get single Xml parsing,but how to get multple records(looping xml parse) to internal table?
    Thanks,
    RP
    Edited by: RP@261 on Jun 3, 2009 2:14 PM

  • Creating multiple idocs in ABAP mapping

    Hi,
    my scenario is source message (JDBC) to target message (idoc).
    There can be multiple idocs (unbounded).
    I am using ABAP mapping to create the Idoc XML structure. For this i use function module IDX_IDOC_TO_XML.
    The idoc is getting created but the problem occurs in case of generating multiple idoc instances.
    I changed the idoc occurence to unbounded & used the new idoc external definition in the interface mapping.
    I also call the IDX_IDOC_TO_XML & create the output stream factory in a loop (per idoc ).
    However only 1 idoc gets generated every time.
    Can someone suggest how to create the multiple idocs.
    Regards
    Prasenjit

    Hi Prasenjit,
    In order to generate multiple idoc first of all you need to change the target structure with multiple occurence...that you have already done...
    Now while generating XML in abap mapping you have to make sure you have element idoc(with its content) repeating for your "N" number of idocs...
    can you please copy paste your final xml generated...
    Nilesh

  • ABAP Mapping - Testing - IDoc - Trouble

    Hi Friends,
    There is one ABAP Mapping used in our system. The outbound interface is based on one message in external definition and inbound interface is IDoc.
    When I try to test this mapping in our PI System using the transaction "SXI_MAPPING_TEST", in the initial screen/input screen in F4 help for the Sender Interface selection, our outbound interface is not displayed. In the Receiver Interface also, it is not display the IDoc.
    What could be the problem ? How to test our Z class in this case with the input XML.
    Could you please help me?
    Kind regards
    Jegathees P.

    Hi,
    don't use SXI_MAPPING_TEST
    use my report which is much better
    XI/PI: Easy ABAP mapping tests - no more SXI_MAPPING_TEST
    BTW
    there is no need to use any HTTP client nor anything to test ABAP mapping - just my report
    Regards,
    Michal Krawczyk

  • IDoc to Flat file scenario - abap mapping

    Hi All,
    I have to do some IDOC to Flat file scenarios. In Order to generate the file in required format I will have to add all segments(Nodes) of Idoc in FCC receiver. We also have other option of doing it through ABAP Mapping which I found in one blog.
    Now my question is : Is it better way of doing it through FCC or ABAP Mapping?
    Ofcourse from development point of view ABAP Mapping looks easier as FCC is very time consuming task.
    Is there and performance issues in either of the approach?
    Thanks and Regards,
    Atul

    Hi VJ and Harald,
    Thanks for your replies.
    I am not having PI7.1 however the given blog was very informative.
    I will try using file port approach as suggested.
    Thanks and Regards,
    Atul

  • Webservice  to Idoc/File using ABAP mapping

    Hi Experts,
    I need your expert advise on below scenario.The flow of the scenario is..
    1)I will get a control record from a webservice(SOAP sender adpater), this initiates the process flow.
    2)based on control record ,The ABAP mapping program will call a program(within the PI sys) to fetch the data from DB table.then the ABAP mapping program will have to create 2 messages for the target. One is IDoc and another one is File.
    Pls suggest the best approach.
    Regards,
    Srini

    Hi Prateek,
    Thanks for quick reply.
    there is a main program which has different classes and methoda to fetch the data from DB tables.I dont want to touch this main program.
    what  i am going to do is, I will this main program from abap mapping by passing the control record information.based on this control record,the main program will fetch data for ABAP mapping.From ABAP mapping, i have to generate 2 messages,one for IDOc and another one is for File.
    Hope you got my requirement.
    Regards,
    Srini

  • Automatic IDOC parse in ABAP Mapping?

    Hi,
    I'm creating a very complex mapping in an IDOC -> PI -> File scenario and I'm using ABAP Mapping to do that.
    I already know how to parse an inbound xml but it's a "heavy" job and the code finishes very "hardcoded".
    As you know, SAP uses the structure EDIDD to send/receive IDOC data generically. So I'm sure that internally SAP has a method/function or something to convert the XML data sent by PI to that EDIDD data structure when you send an Idoc through PI. I can't found that, do you know if it exists?
    Thanks

    You can use function module IDX_XML_TO_IDOC to convert the XML to IDOC type internal tables.
    Check for other function module in function group IDOC_ADAPTER_MB.
    KK

  • IDOC--XI--IDOC Using ABAP MAPPING

    Hi all,
    My requirement is to map source IDOC fields to target IDOC fields using ABAP Mapping.
    few fields in source idoc structure has to be merged into a single field in target idoc structure.
    need help on how to start with as i am not exposed to ABAP Mapping.
    regards,
    Subba

    Hi Subba,
    I suggest you also go through these links:
    https://websmp101.sap-ag.de/~sapdownload/011000358700003082332004E/HowToABAPMapping.pdf
    /people/ravikumar.allampallam/blog/2005/02/10/different-types-of-mapping-in-xi
    /people/r.eijpe/blog
    ABAP Mapping Vs Java Mapping.
    Re: Message Mapping of type ABAP Class not being shown
    Re: Performance of mappings (JAVA, XSLT, ABAP)
    Refer to following SDN Demo which explains the need and how to do the ABAP mapping.
    https://www.sdn.sap.com/irj/sdn/docs?rid=/webcontent/uuid/110ff05d-0501-0010-a19d-958247c9f798#jdi [original link is broken]
    This document will help you to create ABAP Mapping.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e3ead790-0201-0010-64bb-9e4d67a466b4
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/3.0/how%20to%20use%20abap-mapping%20in%20xi%203.0.pdf
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5c46ab90-0201-0010-42bd-9d0302591383
    Regards,
    Abhy
    Message was edited by: Abhy Thomas

  • ABAP mapping - File to Idoc

    Hi All,
    I want help on ABAP mapping to perform File to Idoc posting.
    Kindly provide any sample code / document for this.?
    Thanks.
    Ramiz.

    Hi
    Please do a search before posting.
    This link will provide you all about abap mapping.
    https://www.sdn.sap.com/irj/scn/advancedsearch?query=abap+mapping&cat=sdn_all
    Thanks
    Saiyog

  • ABAP Mapping XML-IDoc to Flat string: missing character of segement header

    Hello folks!
    I'm using an ABAP-Mapping in order to trasform an XML-IDOC to a flat string.
    The implementation of the mapping is in accordance with the "HOW TO convert an IDoc-XML to ..."Basically it works fine except the following:
    The following line shows one Segment of an IDoc. the control record is ok.
    With '380' begins the payload of the segment. The part before includes the segment header,
    which is 63 Bytes long, which is correct.
    What we're missing, is the last character of the segement header:
    ABAP-Mapping:
    E1VDEWBGM                     01000000000325511200000020000000 380   5 (...)
    BusinessConnector:
    E1VDEWBGM                     010000000003255112000000200000001380   5 (...)
    Again: the overall length of the segment is ok, but the '1' of the field hirarchie level is overwritten.
    Any idea?

    In that case you need to extend the trace file in the Visual Admin Console...
    &#61680;     Services
    &#61680;     Log Configurator
    &#61680;     Locations
    &#61680;     Choose the location (Java package) and the tracing level (severity)
    (for example, com.sap.aii.adapter.file)
    &#61680;     Root Location > com > sap > aii > File
    &#61680;     Set the severity and choose Copy Severity to Subtree
    Check the trace file to find the field erroring this way!

  • IDOC conevrsion through ABAP mapping

    Hi,
    I am trying to map to an IDOC MATMAS05 with an extension ZMATMAS05, using ABAP mapping. The source and target structures are external definition formats(xsd) of the IDOC.(I did this because I am using a BPM and used the xsds as abstract interfaces)
    When I run the Map I get an error "Extension ZMATMAS05 Unknown". I have hardcoded the EDI_DC40 values in the map. So I have set CIMTYP to ZMATMAS05.
    I have loaded the metadata using idx2. Still I am getting this error. Would need help on this.
    reagards,
    Saswata

    Hi,
    Have a look into this SAP note- 751839
    Is all the segments of idoc is released ?
    Delete the IDX2 entry and reload it, And reimport into Repository
    Regards,
    moorthy

  • Variable Substitution not working when using ABAP mapping

    Hi all,
    I am doing an IDoc to File scenario.
    Due to some complex mapping requirements, i had to use ABAP mapping for IDoc to File ( IDoc : SHPMNT05)
    There is also one more requirement where in i need to generate the receiver filename dynamically
    i.e the filename is of the form :     
        GW-XYZ-DD/MM/YYYY.csv
    Where
    XYZ is the Shipment number (E1EDT20- TKNUM)
    DD/MM/YYYY is the IDOC creation date in ECC (EDIDC-CREDAT)
    so i used the variable substitution option in receiver file adapter.
    But its not working.
    Is there any limitation for using the variable Substitution, doesnt variable substitution work in case of ABAP mapping?
    Regards,
    Loveena.

    Hi,
      u written ABAP mapping program to get the file name in the required format ,
    is it rt?
    when u test it at message mapping(including ABAP map program)
    u get the the required format of file name in the one of target filed.
    if that was fine, please check the variable substituiton parameters at receiver file adapter.
    i mean, are u maintain variable name and refernece.
    u have to specify the payload information.
    warm regards
    mahesh.

Maybe you are looking for