Processing BAPI multiple times

Experts
Looking for an easy solution to this -
I have abap code that calls a bapi and loads data from an excel spreadsheet with a header and line data. Currentlty the BAPI only processes one record. What is the easiest way of either getting the abap code to run calling multiple data files or to get the abap code to pick mutliple header and line records in the same file.
thanks

hi Andrew ,
maintain only one file , maintain one flad  that s H/L  for each and every row in that file.
based on there values u have to get header and iitem data.
like
loop at i_upload.
if flag = 'H'.
  header  table with one more unique key to identify items for this header
else.
flag = L.
item table.
endloop.
Regards
Peram

Similar Messages

  • Executing BAPI Multiple Times

    Hello Everyone,
    I am trying to execute BAPI_ACC_DOCUMENT_POST multiple times in an application. My requirement is to post multiple documents in one click. The Context is as follows.
    --Context
    BAPI_ACC_DOCUMENT_POST(model node)---cardinality(0..1)
    Accountgl(model node)---cardinality(0..n)
    AccountPayable(model node)---cardinality(0..n)
    Currencyamount(model node)---cardinality(0..n)
    DocumentHeader(model node)---cardinality(0..1)
    Output(model node)---cardinality(0..1)
    -Document(Value Node)-cardinality(0..n)
    I have create the Value node Document and I am trying to get few values from the user and assigning it to the model nodes during runtime. The BAPI should execute depending on the number of rows in the Document Table that the user decides at the runtime.
    Could anyone give me some basic idea about how to acheive this requirement. I hope you can understand my requirement and please do let me know if you need any further explanation. I would greatly appreciate your help.
    Regards,
    Gopal.

    Hi Siva,
    My issue is resolved by using the following code.
    public void onActionPostDocument(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionPostDocument(ServerEvent)
        //$$begin ActionButton(-761385096)
    for(int i=0; i<wdContext.nodeDocument().size(); i++){
    wdContext.currentDocumentheaderElement().setHeader_Txt(wdContext.nodeDocument().getDocumentElementAt(i).getHeader_Txt());
              wdContext.currentDocumentheaderElement().setRef_Doc_No(wdContext.nodeDocument().getDocumentElementAt(i).getRef_Doc_No());                    wdContext.currentAccountglElement().setGl_Account(wdContext.nodeDocument().getDocumentElementAt(i).getGl_Account());
    wdContext.currentAccountglElement().setCostcenter(wdContext.nodeDocument().getDocumentElementAt(i).getCostcenter());
    wdContext.currentAccountpayableElement().setVendor_No(wdContext.nodeDocument().getDocumentElementAt(i).getVendor_No());
    wdContext.nodeCurrencyamount().setLeadSelection(0);
    wdContext.currentCurrencyamountElement().setAmt_Doccur(wdContext.nodeDocument().getDocumentElementAt(i).getAmt_Doccur().negate());
    wdContext.currentCurrencyamountElement().setItemno_Acc("0000000001");
    wdContext.nodeCurrencyamount().setLeadSelection(1);
    wdContext.currentCurrencyamountElement().setAmt_Doccur(wdContext.nodeDocument().getDocumentElementAt(i).getAmt_Doccur());
    wdContext.currentCurrencyamountElement().setItemno_Acc("0000000002");
    wdThis.wdGetMultipleDocCompController().executeBapi_Acc_Document_Post_Input();                                   
    Thanks a lot for your help.
    Regards,
    Gopal.

  • How to shedule process chain Multiple time in a month

    Hi to all,
    I have a question.
    suppose we required to shedule the process chain,
    for first 10 days, we need to extract data 8 time a day
    and for remaing days in months, we need to extratc data 1 time a day.
    How can we achive that in process chain.
    Please can any one tell me the solution.
    I shall be thankful to you for this.
    Regards
    Pavneet rana

    Hi,
    Another option would be using the InfoPackage settings. Create 2 infoPackages.
    1st one for first 10 days
    ====================
    In the "Schedue" tab, define the Scheduling options to Hourly and save it. Now, you will see "Periodic Processing" section with two options,
    1. Do Not Cancel Job
    2. Cancel Job After X Runs
    For 2, provide 8.
    2nd for From 11th day
    ==================
    Create another InfoPackage for Daily load.
    In process Chain, you may use the previous "Decision Between Multiple Alternatives" process type (in the command formula, write a simple formula as below:
    RIGHT( 2, Current Date ) <= 10
    Then include 2 ABAP Program for each option (using "BAPI_IPAK_START" with the InfoPackage name) in decision options. (use the InfoPackages as variants).
    This will solve your requirement,
    "for first 10 days, we need to extract data 8 time a day
    and for remaining days in months, we need to extract data 1 time a day."
    Now, further update using DTP, for remaining days in months (i.e. 1 time a day) you can directly include the DTP in the chain. However, for the 1st 10 days you have to dig more.
    Good Luck!
    Sankar Kumar

  • Just bought a new iphone4 and was loading os6 and now it won't turn on. the apple glows like it is starting up, then the screen goes black and then repeats the same process over and over. i have tried to reboot multiple times now

    just bought a new iphone4 and was loading os6 and now it won't turn on. the apple glows like it is starting up, then the screen goes black and then repeats the same process over and over. i have tried to reboot multiple times now

    I am assuming the phone was working prior to you installing IOS 6? Did you use itunes to install IOS 6 or just run from the phone?
    When I tried to do the Over The Air update to IOS6 on my iPhone 4, it errored out and I had to connect it to iTunes and select "Restore" from the summary screen after iTunes finds the phone is connected. If this works for you, it will go through a couple of reboots that take a few minutes to complete. It should then give you the option to start with a fresh new phone or to use one of your previous backups to load your contacts and other information, provided you have backed up the phone previously.
    I hope this helps you my friend!

  • Processing the multiple sender xml one by one in a time gap to RFC

    Dear Experts,
             I have to process the multiple sender xml file one by one from FTP to RFC in time gap.
    For Ex:
            I will place 10 xml file in a FTP path at a  time, PI is picking 10 file at a time and process it to RFC at a time.
    Any other way to process the multiple file one by one through PI in a time gap to RFC
    (i,e) PI needs to process the 10 files one by one, once the first file processed successfully from FTP to RFC then the next file to process in a time gap to avoid getting the error in RFC.
    Kindly suggest your ideas or share some links how to process this multiple files.
    Best Regards,
    Monikandan.

    Hi Monikandan,
    You can use CE BPM with PI 7.1 But first check the suggestion of Anupam in the below thread:
    reading file sequentially from FTP using SAP PI file adapter
    Regards,
    Nabendu.

  • I am downloading the Creative Cloud desktop app on my Mac, and it starts to download but just stalls in the process and doesn't get any closer to finishing. Anyone have any suggestions. I've restarted my computer multiple times and restarted the download,

    I am downloading the Creative Cloud desktop app on my Mac, and it starts to download but just stalls in the process and doesn't get any closer to finishing. Anyone have any suggestions. I've restarted my computer multiple times and restarted the download, but to no avail.

    uninstall anything cc that's already installed, clean (Use the CC Cleaner Tool to solve installation problems | CC, CS3-CS6) and the reinstall, Adobe: Creative, marketing, and document management solutions

  • TS4268 I am trying to facetime on my mac but keep getting the message "The server encountered an error processing registration. Please try again later." I have gotten this multiple times. how can I get around this?

    priority:
    I am trying to facetime on my mac but keep getting the message "The server encountered an error processing registration. Please try again later." I have gotten this multiple times. how can I get around this?
    i also have tried downloading "FaceTap" application to get facetime on my ipad and failed too. i thought i failed because i couldnt download latest 6.0 iOS or later. i downloaded latest software update for iOS but was 5.8 I think

    Wait until Apple fix it. See: http://www.apple.com/support/icloud/systemstatus/

  • Process Chain Triggers Multiple times

    Hi All,
    I have Meta process chain say ZAAA  which has multiple Local Chains example ZBBB , ZCCC and ZDDD. .This Local chain ZCCC trigger multiple times of  in one day . we had a issues today  with deactivation of Transformations and DTP in different levels because of that Local Process chain ZCCC is failed along with other process chains . when I reach to ZCCC started by repeat or repair ,before Local Chain ZCCC finished whole process ,ZCCC triggers second time .
    Now first times  triggered process chain ZCCC is in  yellow , and second time triggered process chain ZCCC gone through all the way to gree ,  and Meta chain showes red.
    what I have do make Meta chain green.
    Regards
    Hari

    Hi Hari,
    I wonder what you mean by below statement:
    one of the sub pc still yellow first time trigger and went to red and second time trigger whole process is green. all Sub PC are green
    For the sub pc mentioned above, you trigger it all over again? Or you repeat/repair the step failed?
    If you trigger it the second times all over again it is a new run and the first run remain fail,ed so the meta chain will never get green, if you want to make the meta chain green, you need to repeat/repair the step failed in first run.
    Regards
    Bill

  • Process request method executing multiple times issue

    Hi ALL,
    In my controller code , process request method is executing multiple times and inserting multiple data into the table, can any body help me how to resolve this issue.
    I have the below code in my process request:
    OAApplicationModule am = (OAApplicationModule) pageContext.getApplicationModule(webBean);
         am.invokeMethod("InsertRecord",null);
         OAMessageLovInputBean oalovinputbean=(OAMessageLovInputBean)webBean.findIndexedChildRecursive("ccustatus") ;
         oalovinputbean.setValue(pageContext,"INPROGRESS");
         String userName = pageContext.getUserName();
          System.out.println("User NAme is :" + userName);
          OAMessageTextInputBean pUserId = (OAMessageTextInputBean)webBean.findChildRecursive("item32");
          pUserId.setValue(pageContext,userName);
          OAMessageTextInputBean pchangedby =  (OAMessageTextInputBean)webBean.findChildRecursive("item34");
          pchangedby.setValue(pageContext,userName);
          if((("on").equals(pageContext.getParameter("rrchkbox"))))
                  String whereclause1=(String)pageContext.getTransactionValue("whereclause");
                  String workordnum=(String)pageContext.getTransactionValue("workordnum");
                  String rrnum =(String)pageContext.getTransactionValue("rrnum");
                  String ponum =(String)pageContext.getTransactionValue("ponum");
                  System.out.println("whereclause test1"+whereclause1);
                  String status=pageContext.getParameter("ccustatus");
                  System.out.println("DEBENDRA LINE STATUS:" + status);
                  Serializable param[] = {whereclause1,workordnum,rrnum,ponum};        
                           // am.invokeMethod("getSearchData1",param);
                           // am.invokeMethod("checkSelectedrow",param);       
                 Serializable vcnt =  am.invokeMethod("processPOData",param);  
    Below code written in AM:
    public void InsertRecord()
            XXDPECONTAINERVOImpl vo = getXXDPECONTAINERVO1();
            vo.setMaxFetchSize(0);
            XXDPECONTAINERVORowImpl row = (XXDPECONTAINERVORowImpl)vo.createRow();
            oracle.jbo.domain.Number empNum = (oracle.jbo.domain.Number)getOADBTransaction().getSequenceValue("XXDPE_CONTAIN_SEQ");
            row.setContainerizationId(empNum);
            vo.insertRow(row);
            row.setNewRowState(row.STATUS_INITIALIZED);
    Please help me out.

    hi,
    PR() will be called whenever your page will load, so the number of times you will load your page all the time your PR will be called and it will call the AM method.
    otherwise put some condition and call the insert method from your PR.
    Regards
    Mahesh

  • Process chain on a particular day and multiple times

    i have a requirement to run a process chain 2 times on saturday (one at 3pm and another at 8 pm) for a particular process chain only  !!
    how do i do this ?? some one please help....

    Here's one idea:
    Create an ABAP program that calls the RSPC_API_CHAIN_START Function Module. In this program, create a selection screen that has the same selection criteria as this Function Module. When you have tested the program and ensures that it works properly, create a variant for that program, for the selection selection screen criteria, and save that. After you have transported the program and variant throughout your landscape, schedule two separate jobs in tcode SM36 of your production environment. One as a weekly periodic job that is scheduled to start on a Saturday @ 3:00 PM and another weekly periodic job that is scheduled to start on a Saturday @ 8:00 PM.

  • My iso5 update keeps failing, after waiting 45 minutes for it to download, every time it says there was an error?(whilst processing the completed download) so then i have to start again and wait for it to download, ive tried multiple times, help?

    so ive tried to redownload the iso5 for my ipad two multiple times over the last few weeks, and it simply isnt working, and to add insult to injury ive just purchaced some new apps from the appstore that cost £6 each, and they require the iso5 softwear :'( i need the apps to complete my exam coursework which is due very soon. please please help

    You could try downloading the update via a browser instead : https://discussions.apple.com/message/16703914#16703914

  • I am trying to print a snapshot taken from a PDF multiple times on one page.

    Reader Will not print multiple copies of a snapshot on one page. I read the help files for Acrobat itself and all it said was take the snapshot and print it. Does anyone know if Acrobat can print multiple copies of the snapshot on one page?
    From some reading in another forum page it looks like Acrobat can do it by saving the snapshot repeatedly with different names and the printing all of them at once. I really hate that workaround as I need to do this often.
    Message was edited by: duckles10

    I tried to do it using Reader. I have a one page PDF document with a UPS shipping label on one side and a special box label with a barcode on the other. This is designed to print on a standard 8.5 x 11 sheet of paper. There are many times when I need to be able to print the box labels more than once. At home, I do it by taking a snapshot of the box label and printing it to a Label printer as many times as I need it. The distributor who also ships items for me only has a full page printer but he can print 4 on a page labels on UPS provided stock. Reader won’t print a snapshot multiple times, the option is grayed out. What I wanted to know is if Acrobat itself can print that snapshot multiple times. I don’t think it can without being able to cut and save that PDF multiple times as separate files. That would be a slow and cumbersome operation. If it would take a snapshot or a single cut and save and print that PDF 4 times on a page it would be a reason to spend the money to buy the program because we need to perform this operation OVER and OVER on a regular basis. On some shipments we might need to print 12 or more extra box labels. We tape smaller boxes together for one UPS label and need to make sure EACH box gets a separate label. Otherwise they sometimes get lost on the other end.
    Doing the save 4 separate PDFs process we might actually need TWO copies of Acrobat unless reader can print 4 on a page if it has 4 PDF’s to work from. I have not yet found a good way to save those snapshots from reader. I have tried since I found that it was possible to cut and save them in other formats but not PDF’s as reader can’t save them. The quality of the saved items in other formats is not acceptable. I recently discovered that Microsoft publisher which I have can save a document as a PDF. I’m going to see if I can import to that program next.

  • When I try to download an app it comes up with no connection URL and it says I've typed in my password wrong multiple times when I haven't changed the password

    So I have tried to download several apps and it asks for my password. I type in my password and then it comes up failure to find service connection URL. After clicking retry multiple times it comes up and say my password is incorrect. When I logged in here my password is correct. How do I fix this

    Hi, Taterbug17. 
    I would recommend signing out of the iTunes Store on your iOS device and sign back in.  Here are the steps on how to process these steps. 
    iOS: Changing the signed-in iTunes Store Apple ID account
    http://support.apple.com/kb/ht1311
    Cheers,
    Jason H. 

  • I recently tried to update iTunes to 11.1, and am now getting an error message "This application has failed to start because MSVCR80.d11 was not found."  I have uninstalled and reinstalled iTunes multiple times.  Am running Windows XP Svc Pack 3.  help

    I recently tried to update iTunes to 11.1, and am now getting an error message "This application has failed to start because MSVCR80.dll was not found.  Reinstalling the application may fix this problem."  I have uninstalled and reinstalled iTunes several times with no success.  I am running Windows XP Svc Pack 3.  Help please.

    Click here and follow the instructions. You may need to completely remove and reinstall iTunes and all related components, or run the process multiple times; this won't normally affect its library, but that should be backed up anyway.
    (99753)

  • I was trying to open a project in adobe flash pro cc and it said there was an error opening the project. I have tried multiple times with no success, however all my other projects open and work fine

    I tried multiple times, but still couldn't open my project. All my other projects open and work fine. Please help, it is important.

    You will most likely get better help in Flash Professional
    The Cloud forum is not about using individual programs
    The Cloud forum is about the Cloud as a delivery & install process
    If you will start at the Forums Index https://forums.adobe.com/welcome
    You will be able to select a forum for the specific Adobe product(s) you use
    Click the "down arrow" symbol on the right (where it says All communities) to open the drop down list and scroll

Maybe you are looking for

  • Calendar to get week number of current month

    Hi All, Description: Currently I am working on an application which require to calculate some data for current month from a database where I have the data of all the previous and current month of that year, I can take week number as criteria. Help Re

  • To upload a data into SAP Table with the help of RFC function in BODS

    Hi, Please provide me step-by-step solution to upload data into any SAP table with the help of RFC function in Data Services. I have created RFC function that upload data into SAP table. RFC Function contains one table that has same structure as my d

  • Two separate blogs; one unattached to website

    I'd like to create a separate more professional blog that is attached to my website. Additionally, I'd like to keep my more casual family oriented blog that I can share with family and close friends. We are a one computer household. Does iWeb 08 allo

  • Regarding overall purchase requisition release strategy

    Hi,       For following combination PR release strategy  is not working. 1.Total value of requisition 2.Purchasing Organization 3.Name of Requisitioner/Requeste But when we take any one of them it is working. But when I tried to put together, these f

  • YouCam video won't play - only audio. Used link from apps page. Can see screen capture.

    Hi there, We recorded a 1 minute video using Cyberlink Youcam (the one on the 8.1 apps page, as opposed to the one with shortcut on the main desktop page - Youcam5.) We can see te screenshot of the video, and hear the audio for entire duration of rec