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

Similar Messages

  • Doubt in fields - message mapping (file 2 idoc scenario)

    while doing message mapping in file 2 idoc scenario, i could not able find the values for some field names
    ( i am following this wiki help
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/2007/05/11/fileToIDOC& )
    cremas04 idoc
    vendorNo LIFNR
    vendor name Name1
    Pur_org   ? ( I could not able locate field with the similar desc in idoc MT side)
    Company code  ?
    Acc_Grp  ?
    Search term MCOD1
    Address ADRNR
    City ORT01
    Pin_code PSLTZ
    could you help me out with this?
    Message was edited by: praba
            praba

    hi,
    I got the answer.

  • Proxy - ABAP mapping - file with content conversion

    Scenario goes from ECC (proxy) to XI then I do ABAP mapping.  I have tested the ABAP mapping with SXI_mapping_test transaction.  My ABAP mapping puts the payload back into XML and then the data goes to a file adapter where I also use content conversion.  If I do not do the content conversion the data comes out correct in XML.  When I change to content conversion I get 20 blank lines.  Is it possible to do content conversion from ABAP mapping?
    Any help would be greatly appreciated.
    Thanks
    Skip Ford

    Hi,
    Have you checked whether the blank lines you got in the XML files are from the blank nodes or elements which you created in ABAP mapping?
    If it is, then just create your elements or nodes whenever there are corresponding values in your ABAP mapping.
    e.g.
    If  l_sender_service is NOT initial.
      elementsender = odocument->create_simple_element(
                                   name = 'SenderService'
                                   value = l_sender_service
                                   parent = msgtype ).
    endif.
    Regards,
    Lim...

  • Mapping file to IDOC "DELVRY03" segment E1ADRM1

    Hi all,
    i have a problem to map a text file to idoc "DELVRY03" using segment E1ADRM1.
    My text file has 2 fields : CUSTOMER_CODE & VENDOR_CODE
    Source mapping : Text File
    Target mapping : IDOC "DELVRY03"
    IDOC should be filled in the following way :
    First entry:
    PARTNER_ID = CUSTOMER_CODE
    PARTNER_Q = AG
    Second entry:
    PARTNER_ID = VENDOR_CODE
    PARTNER_Q = WE
    How can i fill the idoc structure?
    Thanks in advance.
    Regards.
    Dario.

    Hi Harish,thanks for your reply.
    I tried to duplicate segment E1ADRM1 but PI system gets me this error :
    "Target structure has no such path: /DELVRY03/IDOC/E1EDL20/E1ADRM1[1]/PARTNER_ID. Skipping mapping"
    Pls, how can i solve this problem?
    Thanks in advance.
    Dario.

  • Mapping file to idoc ORDERS

    Hello,
    How can I map the file under with the idoc ORDERS
    file :
    N° Sales order, date , posnr, material, qty
    ex:
    0001,20050101,10,mat1,10
    0001,20050101,20,mat2,10
    0001,20050101,30,mat3,10
    0002,20050102,10,mat4,20
    0002,20050102,10,mat5,30
    all the lines contain the N° sales and date
    I must map the header (N° sales and date ) only 1 time in the idoc header corresponding.
    Thanks.
    Message was edited by: JCA

    the give below is more clear form
    idoc
    a1---(0-1)
    a2---(0-1)
      b1--
    a3---(0-1)
      b1---(0-n)
        c1---
      b2---
        c1---
    a3---(0-n)
      b1---
      b2---
    a3---
      b1---
      b2---
    a3
      b1---
      b2---
    Thanks
    ram

  • Abap mapping - pb on SAP example?

    Hi,
    I try to use an Abap mapping for flow "IDoc -> XI -> structured file". For that I have modified the 1st example of SAP (by changing line: "direct = 1").
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/xi-how-to-guides/how to convert between idoc and xml in xi 3.0.pdf
    But when I send an IDoc from R/3, I have this error in Message Monitoring: <i>"Error in mapping program YCL_AM_DE00109 (type R3_ABAP, kernel error ID UNCAUGHT_EXCEPTION)"</i>.
    In fact, it seems that problem is when I get data from field "TABNAM":
    * Control data: segment EDI_DC40
      data: el_element type ref to if_ixml_element.
      el_element = idocument->find_from_name( 'TABNAM' ).
      ls_edidc-tabnam = el_element->get_value( ).  "<<<
    1. Is there the good example for such a flow?
    2. Anybody have an idea to solve that?
    Regards.
    Mickael

    Hello,
    @Stefan: I need this lookup e.g. for outbound processes for some conversions / setting dynamic parameters depending on the RCVPRN inside an IDoc. That means I have a unique key (RCVPRN_<messageType>) and some (4-6) additional information (e.g. mail subject, FTP filename,...) to this key whch I would like to access during mapping runtime. Vice versa, for inbound scenarios, inside a EDI -> IDoc mapping, I need at least a simple "FixValues" translation from some kind of EDI partner id into the corresponding SAP customer number.
    @all: So from my experience value mapping does not realy fit this "translation" needs? There are some disadvantages, for example if both input values "A" and "B" should be translated into "1", this is not possible, as the keys have to be unique in both directions.
    By the way, I have now also implemented the RFC lookup in my mapping as alternative to the JDBC lookup. To me there are at first sight some pros and cons:
    - Pro: You just need a "simple" RFC user within the RFC channel. You do not need to use the PI system user / pw which owns the Z table.
    - Con: If you select more than one field from the table, the RFC lookup function return all fields of the db entry just separated by a delimiter, which is why you need to implement some "parsing" of the fields in a UDF (minor disadvantage).
    Still interesting discussion!
    Thanks,
    Christoph

  • ABAP Mapping error

    Hi,
         My system is running on XI 3.0 SP9, I am using abap mapping for conversion idoc xml structure to flat file structure. But I am getting the error as shown below.
    Appreciate for your response.
      <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Request Message Mapping
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>Application</SAP:Category>
      <SAP:Code area="MAPPING">APPLICATION_PROGRAM_ERROR</SAP:Code>
      <SAP:P1>ZCL_ABAP_MAPPING4X</SAP:P1>
      <SAP:P2>R3_ABAP</SAP:P2>
      <SAP:P3>UNCAUGHT_EXCEPTION</SAP:P3>
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>Error in mapping program ZCL_ABAP_MAPPING4X (type R3_ABAP, kernel error ID UNCAUGHT_EXCEPTION)</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    Regardsm
    Mallikarjun.M

    Have u seen the ABAP mapping guide?
    Refer this series to the ABAP mapping section.https:///people/sravya.talanki2/blog/2006/12/26/aspirant-to-learn-sap-xiyou-won-the-jackpot-if-you-read-this-part-ii
    It will be very handy and useful.

  • File to IDOC With Screenshots

    Hi,
    I am doing FIle to IDOC scenario but have got stuck in ID part what to take care in Receiver COmmunication Channel and Receiver determinaiton etc and donot know how to test after finishing ID part.
    ALso we need to put xml file as input in directory but how we get IDOC activated from, and where to see whether our FIle to Idoc scenario is running fine.?? NOt clear pls help
    Surbhi Bhagat

    Surbhi
    <b>Create Receiver Determination</b>
    Sender Service :File system
    Sender Interface : Outbound Interface.
    Configured Receivers - SAP R/3 system
    <b>Interface Determination</b>
    Sender Service :File system
    Sender Interface : Outbound Interface.
    Inbound Interface : IDOC Interface mapping : File to IDOC Mapping
    <b>Receiver Agreement</b>
    Sender Service  : File System
    Receiver Service : SAP R/3
    Inbound Interface :IDOC
    Receiver comm Channel : IDOC Comm.Channel(Receiver)
    Don't forget to give the Header mapping.
    Give Sender service & Receiver service.
    I hope it helps!!!
    Best regards,
    raj.

  • 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

  • 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

  • ABAP Mapping :: for multi files

    Dear Experts,
    We are doing an Idoc to file interface, using ABAP mapping.
    This is 1:n mapping i.e receiver message interface is 0..unbounded.
    We have achieved the mapping for 1:1. But when I test for multi, i get an error in moni saying
    Parsing error after multi mapping.Expected Message<i> instead of Item
    Item is the name of the node that has to be created multiple times.
    Has anyone done multi mapping in ABAP?? Any idea why this error....may be we are missing something.
    Any idea as to how we can progress???
    Thanks in advance
    Regards
    Shobha

    Hi,
    Surely u can use an ABAP mapping for this.
    Sounds like your problem is your not using correct output structure for multi mapping.
    As with any type of multi mapping your structure should reflect this. Your target payload must thus have the following structure:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
         <ns0:Message1>
              <unboundedPayload/>
         </ns0:Message1>
    </ns0:Messages>
    The <unboundedPayload> element in above should of course be replaced with your actual payload - I believe 'Item' in your case, if that is in fact the root node of your actual payload.
    Regards,
    Daniel

  • 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

  • Setting File Name inside ABAP mapping

    Hello All,
    We have a requirement where we need to send the IDOC in a flat file format to the destination system which we are doing inside an ABAP mapping. Now we need to set the file name depending on a particular field in the IDOC. For this we need to use the DynamicConfigurationKey class inside our ABAP mapping.
    Can anyone throw some light how to access these Adapter-Specific Attributes inside ABAP mapping?
    Thanks
    Abinash

    guess this is the one
    Re: Abap mapping and variable substitution in File adapter

Maybe you are looking for

  • HELP...ipod locked up

    My ipod is locked up. The display is showing the podcast I was listening to and no keys work. Is there any way to manually reset the device (turn it off or something by holding a key down or removing some sort of internal battery)?

  • Accessibility - Language Specification

    Using Adobe Life Cycle Designer how do you add a language specification for forms? It is important to specific a language for accessibility reasons. We know how to do that in Adobe 7 but not in designer. In the past we have has problems editing forms

  • The 'java.lang.InterruptedException' error when the batch  running

    Hello everyone: hope everyone go well in your CC&B project. We have an obstacle we we run some bacth job(not all the time), the log is as following: 03:36:46,060 [DEFAULTWorker:7] ERROR (com.splwg.base.support.batch.GenericCobolBatchProgram) Unexpect

  • Dreamweaver not creating paragraph tags upon return

    All of a sudden my Dreamweaver is not creating a new paragraph when the enter (return) key is pushed.  It has always done so in the past.  Any ideas on what might cause this? Thanks

  • J2EE Application Server Survey

    Folks: Pls take a couple of moments to fill out a brief survey to help us gather requirements for the next generation of J2EE Application Servers. http://see.sun.com/Apps/DCS/mcp?q=ST1WG05TFqfbpsF We will provide respondents with a concise summary of