Proxy To file scenario : need the output in hierarchial structure

Hi all,
I am doing a proxy to file scenario. Now I am getting the output as :
<documents>
<document>
<header>
<delivery_number></delivery_number>
<tax_number/>
u2026
</header>
<data>
u2026
</data>
</document>
<document>
<header>
  u2026
</header>
<data>
   u2026
</data>
</document>
u2026
</documents>
But I would like to change the output to below structure.
<documents>
           <document>
     <header>
                             <delivery_number></delivery_number>
                             <tax_number/>
                              u2026
                     </header>
     <data>
                                 u2026
                      </data>
           </document>
           <document>
     <header>
                             u2026
                      </header>
     <data>
                            u2026
                     </data>
             </document>
u2026
</documents>
Can anyone suggest me how can I get this?
Thanks,
Arivarasu S
Edited by: Arivarasu S on Jan 31, 2011 2:54 PM
Edited by: Arivarasu S on Jan 31, 2011 3:00 PM

<documents>
      <document>
            <header>
                       <delivery_number></delivery_number>
                        <tax_number/>
                                  u2026
             </header>
             <data>
                        u2026
              </data>
       </document>
</documents>
I need the output as mentioned above.. pls let me know how can i achieve this..
Thanks,
Arivarasu S
Edited by: Arivarasu S on Jan 31, 2011 6:59 PM

Similar Messages

  • Proxy to File scenario - IDOC as an flat file

    Hi,
    I am working on ABAP Sender Proxy to File scenario. The target structure in the message mapping is SHPMNT05 IDOC and the output of the file needs to be in the text format and then the file will be send to an EDI subsystem.
    Currently, EDI subsystem gets the IDOC from ERP system as a flat file and expects the similar kind of file from XI system
    The requirement is to have all the fields of the IDOC in the target file. If data does not exist for a particular field, then there should be a space for that field in the text file.
    I would like to know if there is any other standard way of executing this scenario apart from using File Content conversion. In case if we have to use FCC, how difficult it would to be implementing the scenario. Please note that the output file needs  all the fields of IDOC in it.
    Regards,
    Sakthi
    Edited by: Sakthi on Sep 26, 2008 11:24 AM

    Hello Sakthi,
             By coding in proxy populate the idoc structure if it is difficult to handle thru Content conversion parameters then create an intermediate structure and populate that structure by concatenating the fields from idoc segments. If the fields are not having the values then add blank spaces as per length of the field.
    You can configure the file channel and content converison parameters for the intermediate structure.
    Hope it will helps to you.
    Cheers
    Veera

  • Issue in Proxy to file scenario

    Hi Folks,
        I'm Currently configuring a Proxy to File scenario in the SAP PI 7.0. when I'm trying to test the proxy class I can find in the SXMB_MONI that the sender service, sender interface & the sender namespace is there but the same for the receiver side is blank. When I'm trying to trigger the proxy program I find the same issue. rather I find that there are 2 items present in the monitor one where the sender details is filled but receiver details is blank & the other is sender details is blank but the receiver details id now filled with the sender data i.e. in the receiver interface field the sender interfaceface is being displayed. I checked my receiver determination it's absolutely correct. Kindly help.
    Regards,
      Santosh

    Hi,
       Thanks for your reply, but i think we cannot paste a screenshot in SDN. Atleast I don't know how to do it here.... Can you pls let me know how to do it..
    Regards,
      Santosh

  • Need  ABAP coding in  Proxy TO File scenario

    Hi friends,
      i need  to do the  Proxy to file scenario.. for this.. i want to retrive the data from R/3 system and  load the data into the class which we defined in SPROXY  (Outbound  class) ..
    so, can any one give me the exact coding... for this.. how can we move the data from our executable program  to  Outbound Class  structure....
    helpful answers will be appriciated..
    Thanks
    Babu

    <i>i want to retrive the data from R/3 system and load the data into the class which we defined in SPROXY (Outbound class) ..</i>
    -->
    data: cproxy type ref to ZCO_MI_MKPROXY2RFC_OUT,
          itab_out type  ZMT_MKPROXY2RFC_OUT,
          itab_in type   ZMT_MKPROXY2RFC_RES.
    TYPES: BEGIN OF values,
             carrid TYPE spfli-carrid,
             connid TYPE spfli-connid,
           END OF values.
    DATA: progname like sy-repid,
          dynnum   like sy-dynnr,
          dynpro_values TYPE TABLE OF dynpread,
          field_value LIKE LINE OF dynpro_values,
          values_tab type table of values.
      progname = sy-repid.
      dynnum   = sy-dynnr.
      CLEAR: field_value, dynpro_values.
    start-of-selection.
    parameter: p_carrid like sflight-carrid  obligatory value check,
                p_connid like sflight-connid.
    CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
           EXPORTING
                tabname     = 'DEMOF4HELP'
                fieldname   = 'carrid'
                dynpprog    = progname
                dynpnr      = dynnum
                dynprofield = 'p_carrid'.
    CALL FUNCTION 'DYNP_VALUES_READ'
      EXPORTING
        DYNAME                         = progname
        DYNUMB                         = dynnum
      TABLES
        DYNPFIELDS                     = dynpro_values
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    read table dynpro_values index 1 into field_value.
    SELECT  carrid connid
        FROM  spfli
        INTO  CORRESPONDING FIELDS OF TABLE values_tab
        WHERE carrid = field_value-fieldvalue.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
      EXPORTING
        RETFIELD               = 'connid'
       DYNPPROG               = progname
       DYNPNR                 = dynnum
       DYNPROFIELD            = 'CONNECTION'
      TABLES
        VALUE_TAB              = values_tab
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
          TRY.
              CREATE OBJECT cproxy.
              itab_out-MT_MKPROXY2RFC_OUT-CARRID = p_carrid.
              itab_out-MT_MKPROXY2RFC_OUT-CONNID = p_connid.
              progname = sy-repid.
              dynnum = sy-dynnr.
              CALL METHOD cproxy->EXECUTE_SYNCHRONOUS
                EXPORTING
                  OUTPUT = itab_out
                IMPORTING
                  INPUT  = itab_in
            CATCH CX_AI_SYSTEM_FAULT .
            write:   itab_in-MT_MKPROXY2RFC_RES-CURRENCY,itab_in-MT_MKPROXY2RFC_RES-FLDATE,
                      itab_in-MT_MKPROXY2RFC_RES-PLANETTYPE,itab_in-MT_MKPROXY2RFC_RES-PRICE,
    above code reads carrid and connid from screen and the same are passed to proxy..
    hope you can relate it to your requirement....
                      itab_in-MT_MKPROXY2RFC_RES-SFATSMAX,itab_in-MT_MKPROXY2RFC_RES-SEATSOCC,
                      itab_in-MT_MKPROXY2RFC_RES-STATUS.

  • Do we need a Inbound Inteface  in a Proxy to File scenario

    Hi,
    In Proxy To File Scenario, please let me know whether we have to create inbound Message Interface or not ?
    1) If it not required to create inbound Message Interface in Proxy To File Scenario, then what is the procedure to pick the Inbound Interface  in Interface Determination?
    Thanks in advance
    Abhishek

    Have a look at this
    Proxy to File
    Dimitris

  • // Code Help need .. in Reading CSV file and display the Output.

    Hi All,
    I am a new Bee in code and started learning code, I have stared with Console application and need your advice and suggestion.
    I want to write a code which read the input from the CSV file and display the output in console application combination of first name and lastname append with the name of the collage in village
    The example of CSV file is 
    Firstname,LastName
    Happy,Coding
    Learn,C#
    I want to display the output as
    HappyCodingXYZCollage
    LearnC#XYXCollage
    The below is the code I have tried so far.
     // .Reading a CSV
                var reader = new StreamReader(File.OpenRead(@"D:\Users\RajaVill\Desktop\C#\input.csv"));
                List<string> listA = new List<string>();
                            while (!reader.EndOfStream)
                    var line = reader.ReadLine();
                    string[] values = line.Split(',');
                    listA.Add(values[0]);
                    listA.Add(values[1]);
                    listA.Add(values[2]);          
                    // listB.Add(values[1]);
                foreach (string str in listA)
                    //StreamWriter writer = new StreamWriter(File.OpenWrite(@"D:\\suman.txt"));
                    Console.WriteLine("the value is {0}", str);
                    Console.ReadLine();
    Kindly advice and let me know, How to read the column header of the CSV file. so I can apply my logic the display combination of firstname,lastname and name of the collage
    Best Regards,
    Raja Village Sync
    Beginer Coder

    Very simple example:
    var column1 = new List<string>();
    var column2 = new List<string>();
    using (var rd = new StreamReader("filename.csv"))
    while (!rd.EndOfStream)
    var splits = rd.ReadLine().Split(';');
    column1.Add(splits[0]);
    column2.Add(splits[1]);
    // print column1
    Console.WriteLine("Column 1:");
    foreach (var element in column1)
    Console.WriteLine(element);
    // print column2
    Console.WriteLine("Column 2:");
    foreach (var element in column2)
    Console.WriteLine(element);
    Mark as answer or vote as helpful if you find it useful | Ammar Zaied [MCP]

  • Proxy to file scenario issue

    Hi,
    I am trying to configure a Proxy to file scenario.
    My sender service is ERP system and the my receiver is PI file system.
    These are the steps I followed:
    1. Created a sender business system for Web AS abap (my ERP system)
    2. Created a receiver business system for third party (my PI system)
    3. I created all the interface objects(datatype, message type, message interface etc) in Integration repository.
    4. In the ERP system , I configured http connection of type h to PI system and also configured lcrsaprfc, sapsldapi connections of type t. I followed this blog: How do you activate ABAP Proxies?
    5. I also configured the ERP system as local integration engine, by setting the role to application system in sxmb_adm (followed the above blog).
    5. Now I generated proxy in sproxy transaction for the outbound interface.
    6. Then I created the communication channel, receiver agreement, interface determination and receiver determination in Integration directory.
    7. I created a abap program to call the execute_asynchronous method.
    Now the issue is, when I execute my report, nothing happens. I can see the success xml message in sxmb_moni in ERP system. No message is seen on the PI's sxmb_moni. The file is not written either to ERP or PI systems.
    Since I am new to PI, I am not sure where to begin with.
    If anybody can help that would be great.
    Thanks
    MLS

    Hi
    Check the following
    1. RFC connection between R/3 and PI
    2. You said Business system of type third party (PI) is receiving it. Try Business system standalone Java. If PI system is already defined in Landscape as Integration server. It will not show any message output.
    3. message is shown in sxmb_moni in your ERP that measn proxy is able to receive all objects and passed it from there.
    4. Check in SMQ2 outbound queue of ERP as well as inbound queue for PI if message exist.
    5. While configuring in ID you dont need a sender agreement. Did you created one.
    Thanks
    Gaurav

  • Outbound Proxy - XI - File scenario. Outbnd proxy not callin XI.

    Hi All,
    I have a requirement where I have to develop a Outbound Asynch Proxy-> XI -> File scenario.
    For this I have crated an Outbound Asynch proxy and called this proxy from a report in ABAP.
    When I execute the report, i am unable to see the message in XI Moni.
    But when I try to emulate the same scenario by passing a message from the RWB Test Page, the message is flowing to the file successfully.
    It seems that the problem is just that the ABAP report is unable to call the XI by executing the outbound proxy method.
    The code for the report is as below:
    *& Report  Z_ASYNCH_PROXY
    REPORT  Z_ASYNCH_PROXY.
    data prxy type ref to ZFUJCO_SI_TEL_NUM_RFC_RESP_ASY.
    data out type ZFUJMT_TEL_NUM.
    out-MT_TEL_NUM-TEL_NUM = 'test_proxy'.
    create object prxy .
    TRY.
    CALL METHOD prxy->si_tel_num_asych_in
      EXPORTING
        output = out
    commit work.
    CATCH cx_ai_system_fault .
       DATA fault TYPE REF TO cx_ai_system_fault .
        CREATE OBJECT fault.
        WRITE :/ fault->errortext.
    ENDTRY.
    Please tel me how to find out that where the message is getting stuck and resove this.
    regards,
    Piyush

    Hi All,
    Thanks a lot for ur inputs.
    i was able to resolve it.
    The pointers are:
    - The message was gettting stuck in the queues XBTS0009 of the Bus system. I chekced it in SXMB_MONI of bus syst.
    - i activated the queues usung SXMB_ADM -> manage queues
    - The HTTP destinatin was not maintained for the connectino to the PI Url. In fact the url was hardcoded in the sicf -> xi-> engine
    I maintained this using
    http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3414900)ID1803326050DB10288658103888810737End?blog=/pub/wlg/3022
    Thanks for all your help.
    regards,
    Piyush

  • Proxy to File Scenario Steps

    Hello everybody-
    I am trying a proxy to File scenario, Its from SRM-XI-File , i have followed the blog
    Learning XI
    but the question i have is, if iam sending a invoice from SRM to XI , what are the configuration steps that i need to do in SRM and in XI, i mean how do i configure proxy in SRM?(in that matter any source system), Can someone tell me the configuration steps that need to be done in SRM and XI to use proxies.

    Venkat
    Instead of using proxies for sending invoice from SRM use IDOC's. There are idocs aviable to do this activity. But if u are going to recive a response then u might think of proixes as idocs supports only asyn interface. for large data voumens make use of proxies.
    Go through SRm master guide that gives you details of Standard Interface available.
    service.sap.com/installation
    and then goto SRM - Master Guide
    also
    SRM, like many other mySAP Business Suite applications, provides standard XI Content. You can download that content from here:
    http://service.sap.com/swdc then
    Support Packages and Patches->SAP Application Components->SAP SRM (WITH SAP EBP)
    Then you go to the specific content version, depending on what SRM release you're on. also u can check with:
    http://service.sap.com/~sapidb/011000358700002897402004E/ServiceProcurementNEW.pdf
    http://service.sap.com/~sapidb/011000358700002897382004E/Plan-DrivenwithSInew.pdf
    http://service.sap.com/~sapidb/011000358700002897342004E/CCMConfig10_01_05.pdf
    http://service.sap.com/~sapidb/011000358700003992672005E/Config_Guide_CCM200_640doc.pdf
    NOTE: There are some preconfigured mappings available for SRM in www.service.sap.com. Check out this thread
    Is there pre-configured message mapping for SRM Content?

  • Proxy to file scenario ( pls gve me some inputs )

    I am Doing proxy to file scenario. i have some quries i want some suggestions regarding this scenario.
    Source  is proxy and Target  is File . i want to generate 6 files with same structure and different different filenames . I guess have to put condition in interface determination? is it correct? if it is correct what condition i have to put plz give me suggestions .
    filenames also generate different different names how it could be done in dynamic configuration? plz give me some inputs regarding this.
    Thanks
    Regards
    Tahir

    Hi,
    >>i want to generate 6 files with same structure and different different filenames
    How the filename is decided? If it is decided in runtime then you can go for single receiver channel and variable substitution.
    You need to make file name in the message mapping itself and assign it to a field of the target (or in any of the available message headers)
    If the filename is always constant (say then have names A, B, C etc with timestamp) . Then there should be a field in source structure which decide what file to be created right? here you can use receiver/interface determination with condition
    Regards
    Suraj

  • Append the file and print the output in a single file in column manner

    Hi All,
    I have 2 files in UNIX.
    File1.txt
    NAME SAL
    Albert $4567
    Monali $7892
    Raj $8521
    File2.txt
    DOB
    12-JUL-1986
    5-Aug-1978
    13-MAR-1958
    so i apped both the file
    cat file1.txt file2.txt>>file3.txt
    The output of file3.txt was:
    NAME SAL
    Albert $4567
    Monali $7892
    Raj $8521
    DOB
    12-JUL-1986
    5-Aug-1978
    13-MAR-1958
    But i need the output below
    NAME SAL DOB
    Albert $4567 12-JUL-1986
    Monali $7892 5-Aug-1978
    Raj $8521 13-MAR-1958
    Could you please help me to resolve
    Edited by: user10069916 on Sep 6, 2012 12:07 AM

    $ man paste
    $ cat file1.txt
    NAME SAL
    Albert $4567
    Monali $7892
    Raj $8521
    $ cat file2.txt
    DOB
    12-JUL-1986
    5-Aug-1978
    13-MAR-1958
    $ paste file1.txt file2.txt >file3.txt
    $ cat file3.txt
    NAME SAL        DOB
    Albert $4567    12-JUL-1986
    Monali $7892    5-Aug-1978
    Raj $8521       13-MAR-1958
    $

  • Error in Proxy to File scenario

    Hello All,
    I m doing Client Proxy,  ABAP proxy to file scenario.
    I hv done all the configurations in IR & ID.
    I hv also created proxy in sender R3 system.
    But messages are not going successfully from R3.
    when i checkin SXMB_MONI of R3 i get following error
    <SAP:Stack>Error when receiving by HTTP (error code: 110, error text: )</SAP:Stack>
    Message is in SYSFAIL status in SMQ2.
    Any clues how it can be solved??
    Thanks in adv.
    Mahi

    Hi Maheshwari,
    Please try as mentioned below
    Option 1: Go to SXMB_ADM->Manage Queues and Deregister all the Queues.Use transaction SMQR or SMQ2 to reset the status of queues
    For this to initiate processing of messages stuck in the queue, make sure to set following IS configuration parameter
    MONITOR QRFC_RESTART_ALLOWED to value 1
    Option 2: Check the user associated with the RFC destination AI_RUNTIME_JCOSERVER in sm59 transaction. It is generally SAPJSF. Might be posisble the user password is expired or locked. Log on to j2ee admin tool on the server side and update the password and then see if it works.
    Thanks
    Amit
    Reward points if answer is helpful

  • Error on PROXY to FILE scenario

    Hi,
    I'm working on a Proxy to FIle Scenario. 1 Proxy is triggered and 7 files should be generated at the target side.
    Now when the proxy is triggered all the 7 files doesn't get generated. Instead randomly some 3-4 files are getting generated.
    Could not see the rest of the entries in MONI also.
    Can someone tell how to monitor this and where exactly to check for the error, as message doesn't reach the MONI and we don't have a sender channel beacuse its Proxy.
    Thanks,
    Vikas

    Vikas,
    Can someone tell how to monitor this and where exactly to check for the error, as message doesn't reach the MONI and we don't have a sender channel beacuse its Proxy.
    > how 7 files will generate ?
    From Proxy level @ ECC it don't seems logical/possible as whole data will be passed as a whole to proxy interface and on some condition basis only you would be creating 7...files . so definitely at SXMB_MONI of XI you can see this .
    Try to increase trace_level parameter to 3 (only in development box , as it will consume the server very fast) for better monitoring .
    Since the no. of files will be created by file adapter only so those many no. of receiver file adapter calls you can see at RWB.
    Regards,

  • Proxy to file scenario

    Hi SDN,
    I have  a query regarding a Proxy to File scenario. Whenever the ABAP proxy populates the structure an d sends the data accross to XI  to genarate a file structure, then how does it confirms that the structure is sent to SAP.XI or to somewhere else? How is the confirmation done? and where is it done at Sender side or at the XI side?
    Thanks,
    Aniruddha

    Hi,
    >>>How is the confirmation done?
    if you do not set ack request it does not do any confirmation - you only see the successful flag in ECC and in PI
    nothing more
    Regards,
    Michal Krawczyk

  • ABAP client proxy to File scenario

    Hi,
    I am doing ABAP client proxy to File scenario.
    I have followed Ravikumar allampallam blog i.e https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1387. [original link is broken] [original link is broken] [original link is broken] [original link is broken]
    My abap proxy has successfully created 4 objects:
    1)ABAP Class ( ZCO_ MIOA_ABAP_PROXY).
    2. Structure for the message type in ABAP Data Dictionary (ZMT_PROXY).
    3. Structure for the data type in ABAP Data Dictionary (ZDT_PROXY_SRC).
    4) Table type (ZSTRING_TAB).
    can u tell me how can i fetch data from database table into structure?

    Hi,
    see first create the data type,msg type, msg interface and go to R3 instance of Xi and use SPROXY transaction , locate your SWCV,namespace, intreface ( outbound) and create the proxy , later give the name starts with z, later in ABAP program create the internal table of type of the Structure for the message type in ABAP Data Dictionary (ZBLOGEMP_PROFILE_MSG )
    so follow the code and explained about each ob, structure of Msg ..
    Regards
    Chilla

Maybe you are looking for