File to rfc (file has multiple records)

Hi Guys,
I have a filr to rfc scenario..
I created a Z table with ITAB in import tab and field names and then a BAPi using se37...
The BAPI source code is just one line
Modify Ztable from ITAB
I first tried wth input file having one record, and in scenario runs successfully to update the Z table, checked in se 16
Now when the input file has more than one record, but ZBAPI has just 1..1 ITAB tab
Ho can I do multiple inserts using the same rfc/bapi??
Regards,
Teja

Hi,
As Prateek suggested 2 opionts, so I think option 2 is best for your otherwise option 1 can lead into performance issues.
Make sure that you have declard your internal table ITAB as standard table of ztable. e.g.
DATA: ITAB      type standard table of ztable,
       WA_ITAB  type ztable.
if you do like this and import the BAPI in XI then you can see the occurence of target has been changed as 0..unbounded
Finally, when you have multiple records in your internal table then loop on it and update the table. e.g.
Loop at itab into wa_itab.
Modify Ztable from WA_ITAB.
Clear:wa_itab.
Endloop.
Regards,
Sarvesh

Similar Messages

  • Scenario File-XI-RFC-File

    hi,
    I have send a file to a RFC  using XI.The RFC.response is being received by XI correctly in XI Monitor.
    Now,I need to send this RFC.response to Flat file.
    For this,What i need to do? The only way is using BPM?
    ¿all the interfaces should be async?
    Can any body help me step by step in this regard..........
    I'm with XI 3.0 SP9.
    Regards,
    Antonio.

    Hi Antonio,
    In the <b>Integration Repository</b> (Design) :
    1. Create Data type, Message Type for Input file and Output file.
    2. Import the RFC.
    3. Now create Message Interface for both input (outbound type, asynchronus)and output (inbound type, asynchronus) files. Create Abstract Intefaces (asynchronus) for these two files.
    4. Create a synchronus Message interface for the RFC.
    5. Create the request (input file and RFC) and response( RFC.response and output file) Message Mapping.
    6. Create Interface Mapping (between the synchronus inteface created in step 4 and RFC)
    7. Create a <b>BPM</b> (Integration Process)with receive (input file), send (synchronus) and send(asynchronus).
    In <b>Integration Directory</b> (Configuration)
    1.Create new Scenario. Assign the Business System from which RFC is being picked and new Business Service.
    2.Specify three communication channel. One each for input (sender) and output file (receiver) and one for RFC (Receiver).
    3. Create the Integration Process.
    4. Create a sender Agreement (between File Service and RFC(Business System))
    5. Do three Receiver Determination and Corresponding Interface Determination
       a. File Service and BPM
       b. BPM and RFC(Business System)
       c. RFC and File Service
    6. Create two Receiver Agreement
       a. BPM and RFC (Business System)
       b. BPM and File Service.
    Hope this will be helpful.
    Regards
    Suraj

  • Http-xi-RFC synchronous call - multiple records ?

    Hi Gurus,
    Can we have multiple records processing in RFC synchronous call ? for ex, BAPI_COMPANY_GET_DETAIL. I want to feed multiple company ids and get the responses in browser.
    I have changed cardinality in message mapping and interface mapping as <b>o to unbounded.</b> Tested the same which works fine.
    But, <b>when I activated the interface mapping, I get an error</b> which says I can not use multi mapping in synchronous RFC call.
    what is the alternative ? please help.

    HI,
    It is better to use the RFC lookup in mapping and get the multiple records , i men each one for one lookup , so that in your mapping use UDF for RFC lookup.
    see the below link
    Lookup - /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
    Also read thru this to get more idea on lookups - http://help.sap.com/saphelp_nw04/helpdata/en/cf/406642ea59c753e10000000a1550b0
    Lookup’s in XI made simpler - /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
    http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
    /people/prasad.illapani/blog/2006/10/25/how-to-check-jdbc-sql-query-syntax-and-verify-the-query-results-inside-a-user-defined-function-of-the-lookup-api
    Lookups - /people/morten.wittrock/blog/2006/03/30/wrapping-your-mapping-lookup-api-code-in-easy-to-use-java-classes
    Lookups - /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
    Lookups with XSLT - https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8e7daa90-0201-0010-9499-cd347ffbbf72
    Regards
    Chilla

  • Working with an Audio File in Audition which has Multiple Cuts in Premiere

    Hello,
    I am quite new to Audition and am trying to apply noise reduction to tracks from Premiere...
    As I do not want to edit the original audio files and I do not know of a less painstaking method, I have been creating copies of the original audio files (for example a 30m interview), processing the whole file, then essentially re-editing the whole segment by copying/pasting the multiple pieces of processed audio individually in the place of the originals, which is proving to be incredibly time-consuming.
    I am wondering if there is an an easier way of working with sequences with a lot of cuts in Premiere and which are sourced from the same audio file?
    I was planning initially to just copy/paste the files as they are in the Premiere timeline but I guess this would just alter the original file?
    Any thoughts are hugely appreciated...

    You should be able to export the audio as edited in Premiere as a new file to import into Audition for processing. then the matching processed audio file can be imported back into Premiere on a new track with the old one muted.

  • File To RFC Scenario- simply insert records into ztab

    Hi
    i have a requirment, where XI gets a flatfile and needs to map to RFC function module and then inserts records into ztable in SAP system. it doesn't require any response back.
    proble here is:
    i don't want to get RFC 'Response mesage' when i import RFC into XI IR. i require only 'Request message'.
    please help me, how to create a RFC function module with out Response message, and it should contain only Request message.
    i have created RFC in this way:
    RFC doesn't vcontains neither import nor export parameters. and i have defined on table in TABLE tab which refers to a ztable created already.
    Thanks in advance..
    Regards,
    Rajesh

    Thankx Michal,
    I have written ZRFC this way:
    insert ZMM_AUTO_GR from INPUT_TABLE .
      if sy-subrc = 0.
        commit work.
      else.
       rollback work.
    im not using neither import nor export parameters..but using only tables parameters. but when imported in XI im getting same table  structure in both request an response.
    please suggest what changes required in above code to invoke my ZRFC in async way.
    you will not get any response in XI- what chages required in my code to dnt get .reponse in XI.
    appreciate your help.
    Regards,
    Rajesh.

  • FILE-BPM-RFC-FILE ERROR

    I had created the BPM scenario excatly (I believe) as per the BLOG provided by Arpit (very helpful).
    It does pick the input file and gets the response (as seen from the payload) but does not write the output file. Tried several options for last 3 days but could not suceed till date.
    In SXMB_MONI it creates 3 entries and do not see any error even in the workflow
    Sender      Service     Sender Interface     Receiver Service     Receiver Interface     Pipeline     Inbound     Outbound     
    ADR100     FileRequest_OUT_MI     File_RFC_BP     FileRequest_AI     CENTRAL     XIRA     PE     Asynchronous
    File_RFC_BP     FileDetails_Sync_AI     ADR100     BAPI_COMPANY_GETDETAIL     CENTRAL     PE          Synchronous
    ADR100     BAPI_COMPANY_GETDETAIL     File_RFC_BP     FileDetails_Sync_AI     CENTRAL     PE          Synchronous
    Any help will be appreciated
    Thanks

    Hi,
    Please chk the status of your bpm in SXI_CACHE for a return code of 0.If its not then you got error in the process.
    Rectify the errors and reimport the bpm in ID and redo the agreements.Hope this helps.
    Regards
    Priyanka

  • Get MUTLIPLE output files for SINGLE input file with multiple records

    Hi ,
    I have source xml file  which has multiple records in it and  I want to get multiple seperate  flat files for it.
    this is my source structure
    <root>
    <Header1 fld1=1234 fld2="name1" fld3='SAP1"
    fld4='000" fld5=0 fld6="sdn1"></header>...............no line items here
    <Header2 fld1=123 fld2="name" fld3='SAP"
    fld4='00" fld5=0 fld6="sdn" ><line fld7=value1 fld8=value2 fld9=value3 /line><line fld7=value4 fld8=value5 fld9=value6 /line></header>.....two line items here
    <Header3 fld1=123 fld2="name" fld3='SAP"
    fld4='00" fld5=0 fld6="sdn" ><line fld7=value7 fld8=value8 fld9=value9 /line></header>......one line item here
    Header4 fld1=12345 fld2="name2" fld3='SAP2"
    fld4='0006" fld5=01 fld6="sdn2"</header>.......no line items here
    </root>
    I am trying to get flat files as many time the <b>header</b> values occur that many target files should appear in the target.
    like
    file1:
    1234name1SAP10000~sdn1
    file2:
    123nameSAp000~sdn
    value1value2valu3
    valu4value5value6
    file3:
    123namesap000~sdn
    value7valu8value9
    file4:
    12345name2SAP2000601~SDN2
    here I have 4 headers so i need to get 4 output files ,similarly for 'n' headers I need to get 'n'  output flat files. the above mentioned source xml file is just one file,like that I might get somany sourc xml files which has similar structure in it.
    and also it is important to get the line items,if exists to the header, for the corresponding headers.
    how can I achieve this?do I need to use BPM or any mappings other than Graphical? 
    please suggest me.
    thank you.
    Babu
    sorry,output file structure changed
            Babu

    Babu,
    See the Mapping and the logic.
    Make sure your target message occurrence:http://www.flickr.com/photo_zoom.gne?id=1412748793&size=o
    Check out for source and target structure
    http://www.flickr.com/photo_zoom.gne?id=1412748803&size=o
    http://www.flickr.com/photo_zoom.gne?id=1412748809&size=o
    http://www.flickr.com/photo_zoom.gne?id=1412748815&size=o
    http://www.flickr.com/photo_zoom.gne?id=1412748825&size=o
    Results:http://www.flickr.com/photo_zoom.gne?id=1412748799&size=o
    Note:
    While creating Interface determination choose it as Enhanced/Extended
    The Receiver Content conversion - For field separator and line separator give 'nl' , coz we concatenated all of them using ~ in mapping.
    If you find any discrepancy in the above logic , please let me know.
    raj.

  • Posting  multiple records from file to idoc

    Hi Exerts,
       i have done scenario to post one record from file to IDOC, to post multiple records from file to idoc what are the options to be modified in the scenario.
    thanks,
    dhanush

    Hi Dhanush,
      You need to change the occurance of idoc to 0 to unbounded ie need to opt idoc packaging.
      Just download the xsd of you idoc to the desktop and change the occurance tag as "<xsd:element name="IDOC" type="COND_A.COND_A02" maxOccurs="unbounded" />" and then reimport it into External definition and use it in your message mapping and then map it with you source structure.
    Regards,
    Prasanthi.

  • File 2 RFC scenario

    We have a scenario, file 2 RFC, file is picked from FTP.
    File is CSV file and has Invoices in it. After every invoice, there is a bapi call.
    How to handle this.
    Any docs or links or blogs would help me.
    -Naveen.

    Hi Naveen,
    File system will not support Application Acknowledgements. It will support only System Acknowledgements. So inorder to handle this we need to have a BPM.
    Your scenario can be addressed like this..
    File->XI(BPM)->R/3(RFC)
    Please go through these links and see if it helps....
    /people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit
    Scenario File-XI-RFC-File
    http://help.sap.com/saphelp_nw04s/helpdata/en/0d/5ab43b274a960de10000000a114084/frameset.htm
    Hope This is Useful.....:-)
    Regards,
    Abhy

  • ERROR  IN  FILE--XI--RFC SCENARIO.  BAPI  did not UPDATE the DATABASE TABLE

    Hi
    I have created a scenario  FILE -XI- RFC
    File is picked by file adapter  - Its working fine
    I have used BPM
    In RFC side  i used BAPI_INCOMINGINVOICE_CREATE
    Its working fine and return an Invoice Number and Fisical year .
    When i Check this in the R/3 System , in Invoice no Does not Exist .
    Message mapping is ok
    SXMB_MONI all are ok
    Receiver file i got the invoice no and fisical year .
    The Problem is " DATABASE TABLE DID NOT UPDATED "
    So  should i do BAPI_COMMIT seperately ........
    Any solution ................
    VERY VERY URGENT .....
    thanks in advance
    B.Jude

    hi jude,
    Commit Control for Single BAPI Calls
    If you want to use this communication channel to call BAPIs as remote-enabled function modules that change data in the database, set the indicator.
    If executed successfully, the transaction is written to the database by calling the function module BAPI_TRANSACTION_COMMIT explicitly. If an error occurs, the transaction is rolled back by BAPI_TRANSACTION_ROLLBACK.
    The result is determined by the value of the field TYPE in parameter RETURN. If successful, the tables are empty and the values “”, “S”, “I”, and “W” are displayed. All other values are regarded as errors.
    To change this setting, set the indicator BAPI Advanced Mode.
    <b>In the Successful RETURN-TYPE Values table, enter the values that should lead to a successful execution.</b>
    Regards,
    Mandeep Virk

  • File To RFC without BPM

    Dear Friends,
      My scenario is File to RFC , file is picking from third party and that file parameters are updated in ecc  and response is updated in third party system
    using XI.
    For this one I created data types,message types,message interfaces and message mapping for sender , receiver and response.
    In interface mapping I have small doubt i.e how many  interface mappings needed for this scenario.
    In integration directory how many receiver determination and interface determination needed.
    please suggest me.
    Regards,
    Shalini Shah

    Hi Shalini,
    U need to create 2 interfaces at sender side(1 is for file request & 2nd for file response) and one interface at ur receiver side for RFC.
    Refer File to RFC blogs with out BPM u may find lot of stuff to ur requirement.
    Regards,
    Edited by: farook shaik on Sep 20, 2008 7:53 AM
    Edited by: farook shaik on Sep 20, 2008 7:55 AM

  • RFC to JDBC Scenario: Multiple Records insertion

    Hi All,
    I am working with RFC->XI->JDBC to update a single table on an Oracle db.
    When I import RFC I get multiple Records.
    Here is the sender XML Structure:
      <?xml version="1.0" encoding="UTF-8" ?>
    - <rfc:Z_I2_SAP2MDM_VM xmlns:rfc="urn:sap-com:document:sap:rfc:functions">
    + <I_LFA1>
      </I_LFA1>
      <T_XLFAT />
    - <T_XWYT3>
    - <item>
      <MANDT>800</MANDT>
      <LIFNR>0000009962</LIFNR>
      <EKORG>1000</EKORG>
      <LTSNR />
      <WERKS />
      <PARVW>LF</PARVW>
      <PARZA>000</PARZA>
      <ERNAM>ARUCHI</ERNAM>
      <ERDAT>2006-05-26</ERDAT>
      <LIFN2>0000009962</LIFN2>
      <DEFPA />
      <PERNR>00000000</PERNR>
      <PARNR>0000000000</PARNR>
      <KZ>I</KZ>
      </item>
    - <item>
      <MANDT>800</MANDT>
      <LIFNR>0000009962</LIFNR>
      <EKORG>1000</EKORG>
      <LTSNR />
      <WERKS />
      <PARVW>RS</PARVW>
      <PARZA>001</PARZA>
      <ERNAM>ARUCHI</ERNAM>
      <ERDAT>2006-05-26</ERDAT>
      <LIFN2>0000009962</LIFN2>
      <DEFPA />
      <PERNR>00000000</PERNR>
      <PARNR>0000000000</PARNR>
      <KZ>I</KZ>
      </item>
      </T_XWYT3>
      </rfc:Z_I2_SAP2MDM_VM>
    It takes only the first <item> record. How do i take the second record and insert in the oracel DB.
    Seems to me this should be a pretty simple process.
    Regards,
    Ruchi

    Hi ,
    You need to handle  this with the occurence of the Target Structure of the JDBC Adapter..
    Check this help-
    http://help.sap.com/saphelp_nw2004s/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
    DB Datatype structure ?
    Hope this helps,
    Regards,
    Moorthy

  • How to pass multiple records to stored procedure??

    Hi,
    Can a web application call stored procedure (could be JDBC call)with resultset as it's input parameter? I'm sure there has to be some way to deal with this and I will appreciate your feedback. The web page has multiple records in tabular format and submit should save each record. Is it possible to pass all the records at once through resultset instead of calling stored procedure for each one?
    I'm thinking to use cursor variable as a input parameter of a stored procedure. But I'm not sure whether stored procedure can open/fetch this cursor variable into record structure. Here's the sample example of cursor variable definition.
    TYPE EmpRecTyp IS RECORD (
    emp_id NUMBER(4),
    emp_name VARCHAR2(10),
    job_title VARCHAR2(9),
    dept_name VARCHAR2(14),
    dept_loc VARCHAR2(13));
    TYPE EmpCurTyp IS REF CURSOR RETURN EmpRecTyp;
    PROCEDURE save_staff (emp_cv IN EmpCurTyp);
    Thanks for your help.
    Hemal

    You can't pass in a result set, but you can make each parameter a PL/SQL table.
    Since you also can't pass in a PL/SQL table of records, I typically create a parameter for each "field", with each parameter containing one or more elements. You can then use bulk binding to process the tables in one statement.

  • File to RFC with multiple records using BPM Scenario Error...!!!

    Hello Guru's,
      I have done the File to RFC with multiple records using BPM scenario as per the Materiel available in the sdn.sap. This involves BAPI (BAPI_MATERIEL_AVAILABILITY). I have done exactly the same what is their in the materiel. SXI_CACHE is also giving return value " 0 ". File is getting deleted from the source directory, but no file in target directory. SXMB_MONI is also showing no error (black Flag). BPM is also error free. Checked the interfaces also.
    Can any one tell me what mistake would i have done.
    Thanks in advance.

    Hi,
    There is one similar discussion I found,
    FTP TO RFC using BPM
    Thanks
    Swarup

  • Multiple records of table from RFC to XI in single XML file

    Hi
    My Scenario is as following -->
    <b>RFC ---> Sender RFC Adapter ---> XI -
    > Rec SOAP adapter ---> Web Service</b>
    Now we need multiple records from RFC which can be put in single XML file & XI can transport the whole XML file to Web Service. All the configuration in XI, Web Service is complete & I tested my mapping which is able to accept multiple records.
    But when ABAPer is sending the records I am not getting it in XI, I checked that in message payload from RFC.
    He put the table name in TABLE tab of RFC. But not under Import Tab, as whatever he is providing under Import parameter & exporting it through report I am getting in message payload but not the table data.
    Did anyone try such scenario, can you tell me how can we achieve this.
    Pls. provide me your mail ID in case you need an attachment of the current RFC & report code & my mapping snapshot.
    Regards
    - lalit -

    Hi
    We have created the BAPI in which we are just describing the structure of the payload & which I am importing in Integration Repository.
    And we are calling this BAPI from another program using " Call function ... " command & also provinding the data in that program.
    Actually ethically ABAPers are against the idea of provinding the data into program they would like to provide it in BAPI but that won't work, you have to provide data in program which in turn populate the fields of BAPI.
    Let me know with your mail ID in case you need snapshot of function & programs.
    Regards
    - Lalit -

Maybe you are looking for

  • Transfer from old hard drive to new MacBook + Antivirus

    Hi, My trusty iBook G4 finally died on me (Failing to read Logic board) and I am waiting for my replacement MacBook. My question is: Can I remove the hd from my iBook and set it up in an enclosure and then transfer all my data/ preferences over to my

  • HT4367 no signal on the tv despite i restored

    I cannot get signal to my tv from Apple TV. I tried to restore , uptae etc.. no luck.... anyone can help?

  • Wake for network access while on battery?

    I want to wake for network access when my mac is not plugged in to a power source. Is there a command I can run in terminal to do this? Its not like it consumes that much battery power to do this. Heres a simular thread that was never answered. https

  • Trace file of size 500MB getting created every hour

    Hello, bdump has cdmp* files and the mount point is getting 100% full. Environment :- RAC FCBF0DBF:0DA4DD4C 26 738 10401 71 KSXPWAIT: Send compl suppressed and No requests. proc 0xc00000033c005fb8 haswrk 0 FCBF0E59:0DA4DD51 26 738 10005 2 KSL WAIT EN

  • Why does an image inserted goes outside the html structure

    I used the image insert command to place an image on my page in design view but when I looked at the image in code view, it was below the html structure. Yet when I move it in code view into the body section it disappears in design view. Any suggesti