Execute Infopackage Through BAPI Using Excel Macro (BAPI_IPAK_START)

Hi everyone,
I have a problem when execute infopackage through BAPI using excel macro. I have create a button in macro. When this button is clicked, BAPI for trigger InfoPackage will executed (BAPI_IPAK_START) and this button will disabled.
After this process completely done (traffic indicator for the request is green in update rules), the button will enabled again.
Here the subroutine or pseudocode that i will write :
Private Sub ClickButton()
Begin
1. ThisButton.Activated = False   --> Disabled Button
2. Call BAPI/custom Function Module to execute InfoPackage (BAPI_IPAK_START)
4. ThisButton.Activated = True   --> Enabled Button
End
The problem is i need some statement like this between statement no 2 and statement no 4
Statement That I Want :
3. Wait Until BAPI Execute Completely
So user can click this button again only after the process is finished completely. I don't know how to do this in macro (in ABAP i know i can use "WAIT ... SECOND"), others said this can be done using event in schedule option at infopackage. Anyone,please help me.
Thank you.
Regards,
Satria B

Enter that req number in RSRQ and monitor the load
or  right click on the DS - manage - you will req in yellow status which is in progress and you can click on the ...takes you monitor screen
Edited by: Srinivas on Jul 6, 2010 7:51 AM

Similar Messages

  • Using Excel macros & change properties

    Hi,
    1) my program use Excel macro via a runtime.exec(cmd). I want to use JWS to deliver new versions of application but if I have to put my macros in a jar file how can I reach them (no problem with a file propertie or with gif ressources).
    2) how can I change default properties ("Dossier des applications" in French maybe Applications dir in advanced) wich is enabled in the window.
    thanks a lot
    Sophie

    1) my program use Excel macro via a runtime.exec(cmd).
    I want to use JWS to deliver new versions of
    application but if I have to put my macros in a jar
    file how can I reach them (no problem with a file
    propertie or with gif ressources).You have a lot of options how to do this.
    I would try to use the I/O APIs that reads the macro file
    from a web server (InputStream is = url.openStream()) and put it
    in a local file (FileOutputStream = new FileOutputStream(file)).
    Of course you would need a local location where to store it, could
    be hardwired, or asked from the user.
    2) how can I change default properties ("Dossier des
    applications" in French maybe Applications dir in
    advanced) wich is enabled in the window.I do not understand what you want to do. Explain again.
    Regards,
    Marc

  • Generate CSV automatically using excel macro

    Hi,
    We actually make dimension hierarchy in excel and then make a CSV file and then load it into planning application. The CSV file containing parent child relationship of dimension members and other properties are made manually.
    Can anyone help me regarding how can we generate CSV file automatically using excel macro and vba editor for dimension loading purpose???
    Thanks
    Agniva Chatterjee

    You would need to write the VBA code yourself to populate the spreadsheet, I am not sure what you are expecting the forum to provide.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Problem while executing BAPI_PRODORD_GET_DETAIL through JAVA using JCo

    Hi All,
    I am trying to get Production Order details in JAVA program using JCo. Following is the code I have written.
    JCoDestination destination = JCoDestinationManager.getDestination(ABAP_AS);
    JCoFunction function = destination.getRepository().getFunction("BAPI_PRODORD_GET_DETAIL");
    if(function == null)
    throw new RuntimeException("BAPI_PRODORD_GET_DETAIL not found in SAP.");
    function.getImportParameterList().setValue("NUMBER", 1067831);
    JCoStructure struct = com.sap.conn.jco.JCo.createStructure(destination.getRepository().getStructureDefinition("BAPI_PP_ORDER_OBJECTS"));
    struct.setValue("HEADER", 'Y');
    struct.setValue("POSITIONS", 'Y');
    struct.setValue("SEQUENCES", 'Y');
    struct.setValue("OPERATIONS", 'Y');
    struct.setValue("COMPONENTS", 'Y');
    struct.setValue("PROD_REL_TOOLS", 'Y');
    struct.setValue("TRIGGER_POINTS", 'Y');
    function.getImportParameterList().setValue("ORDER_OBJECTS", struct);
    function.getImportParameterList().setValue("COLLECTIVE_ORDER",'Y');
    try
    function.execute(destination);
    catch(AbapException e)
    System.out.println(e.toString());
    return;
    JCoStructure returnStructure = function.getExportParameterList().getStructure("RETURN");
    if (! (returnStructure.getString("TYPE").equals("") ||
       returnStructure.getString("TYPE").equals("S") ||
       returnStructure.getString("TYPE").equals("W")) )
    System.out.println(returnStructure.getString("MESSAGE"));
    JCoTable codes = function.getTableParameterList().getTable("HEADER");
    int iCnt = codes.getNumRows();
    System.out.println("No Of Rows " + iCnt);
    int iFldCnt = codes.getNumColumns();
    JCoMetaData codesMD = codes.getMetaData();
    for (int i = 0; i < codes.getNumRows(); i++)
    codes.setRow(i);
    // Display the data
    The number which I am passing is a valid production order. When I test this BAPI in SAP gui with same input, it gives back the data but when I try to run this through java I always get the return message as this production order does not exist. Is there anything wrong I am doing?
    I am using JCo 3.0
    I have tried passing various values to ORDER_HEADER structure. I have tried getting the structure from import parameter list and then setting the values on that itself. Nothing has worked for me.
    Thanks,
    Dayanand

    The problem is solved. I just set the order number as string and added 0s before the order number to complete the required length. Also I changed the setting import structure for order header. Each field in the structure should have value as 'X' or ' '
    JCoDestination destination = JCoDestinationManager.getDestination(ABAP_AS);
    JCoFunction function = destination.getRepository().getFunction("BAPI_PRODORD_GET_DETAIL");
    if(function == null)
    throw new RuntimeException("BAPI_PRODORD_GET_DETAIL not found in SAP.");
    function.getImportParameterList().setValue("NUMBER", "000001067831");
    JCoStructure struct = com.sap.conn.jco.JCo.createStructure(destination.getRepository().getStructureDefinition("BAPI_PP_ORDER_OBJECTS"));
    struct.setValue("HEADER", 'X');
    struct.setValue("POSITIONS", 'X');
    struct.setValue("SEQUENCES", 'X');
    struct.setValue("OPERATIONS", 'X');
    struct.setValue("COMPONENTS", 'X');
    struct.setValue("PROD_REL_TOOLS", 'X');
    struct.setValue("TRIGGER_POINTS", 'X');
    function.getImportParameterList().setValue("ORDER_OBJECTS", struct);
    function.getImportParameterList().setValue("COLLECTIVE_ORDER",'X');
    try
    function.execute(destination);
    catch(AbapException e)
    System.out.println(e.toString());
    return;
    JCoStructure returnStructure = function.getExportParameterList().getStructure("RETURN");
    if (! (returnStructure.getString("TYPE").equals("") ||
       returnStructure.getString("TYPE").equals("S") ||
       returnStructure.getString("TYPE").equals("W")) )
    System.out.println(returnStructure.getString("MESSAGE"));
    JCoTable codes = function.getTableParameterList().getTable("HEADER");
    int iCnt = codes.getNumRows();
    System.out.println("No Of Rows " + iCnt);
    int iFldCnt = codes.getNumColumns();
    JCoMetaData codesMD = codes.getMetaData();
    for (int i = 0; i < codes.getNumRows(); i++)
    codes.setRow(i);
    // Display the data
    Regards,
    Dayanand

  • How to run excel macros using lookout

    Hi,
    I want use Excel macros for generating custom reports.Is it possible to run macros using run object in lookout
    thanks

    Hi,
    I am pretty sure you can activate macros in Excel using the Run object in Lookout. I can think of two ways you can do this:
    1. You can setup your Excel to run macros on startup using the Auto_Activate method. In this case, you will just launch excel with your workbook using the Run object and that should run the macros automatically. No brainer!
    2. To better control as to when the macros are run we can assign in Excel some shortcut keys for their launching. We then would need to simulate these keystrokes to launch our macros. This can be done using the SendKeys method and some scripting, WHS Scripting for instance. See this pos
    t for a scripting example which simulates Alt+Tab keys to bring-to-front an app.
    You will launch the script from the Run object and this in turn launches Excel and then simulates the keys for luanching the appropriate macros. I admit this is kinda involved, but hey it works!
    Hope this helps,
    Khalid

  • Could not connect to Oracle database from excel macro. Getting connection not open.

    Hi all, 
    I could not connect to oracle database using excel macro. After much R&D also, I cannot find right solution. Please help me where I am doing wrong.
    Sub Button2_Click()
    Dim Conn As New ADODB.Connection
    Dim RS As New ADODB.Recordset
    Dim Cmd As New ADODB.Command
    Dim sqlText As String
    Dim Row As Long
    Dim Findex As Long
    Dim Data As Worksheet
    Dim X As Long
    Dim UID As String
    Dim PWD As String
    Dim Server As String
    Dim strCon As String
    Application.Calculation = xlCalculationManual
    UID = "myUserid" 'Enter the User ID
    PWD = "myPassword" 'Enter the password
    Server = "myHostname or myServername" 
    Set Data = Sheets("Sheet2")  
    Data.Select
    Range("A:J").ClearContents 
    strCon1 = "Provider = Microsoft.ACE.OLEDB.12.0;DATA SOURCE=myHostName;Database=myDBname;uid=myUserid;pwd=myPassword;"
    Conn.Open (strCon1)
    Cmd.ActiveConnection = Conn
    Cmd.CommandType = adCmdText
    ' Put your query next
    sqlText = " select * from table "
    Cmd.CommandText = sqlText
    Set RS = Cmd.Execute
    For X = 0 To 17 
    Data.Cells(1, X + 1) = RS.Fields(X).Name
    Next
    Do While Not RS.EOF 'this loops through the data and puts it in the spreadsheet
    Row = Row + 1
    For Findex = 0 To RS.Fields.Count - 1
    Data.Cells(Row + 1, Findex + 1) = RS.Fields(Findex).Value
    Next Findex
    RS.MoveNext
    Loop
    Application.Calculation = xlCalculationAutomatic
    Application.Calculate
    End Sub
    sammy

    I have set oci.dll in to the path specified. Prior to this I musy say that, I have 64 bit excel 2010 & installed respective drivers from the link provided http://www.oracle.com/technetwork/database/windows/downloads/index-090165.html
    But
    still I am facing as:-" Provider cannot be found. It may not be properly installed."
    sammy

  • Essbase Excel Macro's and Mxl client

    Hello Folks,
    We are working on 11.1.2.1 having Essbase, Planning, HFM and financial Reports & ODI. We have built the environment newly. I have a scenario where we need to run the ODI batches and run the excel macros to load some of the data. Our batches run from ODI. We have distributed environment for Hyperion servers, totally 3 servers.
    Components in distributed environment:
    1. Shared services, Planning, HFM client, BI Reporting tools, EAS client, Maxl,ODI(server1)
    2. Essbase Server,Maxl(server2)
    3. HFM(Server3)
    MS office & ODI installed on Server1.
    We need to run the batches using ODI & Excel Macro's to load the data.
    I have setup  the maxl client in Server1 for the ODI batch to use for loading data into essbase but my problem is i want to use excel macro's also same time. Is there any possibility or workaround to use both at a time on same servers?
    Thanks,
    Tamas

    What is the error you are getting while running it from ODI? I'm assuming that you are getting some error when you said only one is working.
    When you install EXCEL Add-in it is changing your path and abrorpath variables and that could be the reason why maxl is not working. If ODI is using a bat file why don't you set temporary variable and try.
    in you bat file add these lines (before the maxl call, i would ad them to the start)
    SET ARBORPATH=C:\Oracle\Middleware\EPMSystem11R1\products\Essbase\EssbaseClient
    SET PATH=%ARBORPATH%\bin;%PATH%
    Regards
    Celvin
    http://www.orahyplabs.com

  • Execute Excel Macro Through DIAdem

    Hi All,
      I am currently trying to run a script in DIAdem which exports certain material properties to an Excel Macro-enabled workbook.  Inside the Excel workbook the user executes a macro to perform some calculations.  The results of that calculation will then be re-imported into a DIAdem report.  I have the import/export data part down, but the million dollar question is how can I execute an Excel macro from DIAdem's VBScript?
      I know some are going to say this makes no sense, just do the calculation in DIAdem.  I know this, but the file/calculations are an industry accepted toolbox and it must be done this way. 
      Thanks in advance and here is some dumbed down code to showcase the example:
    Option Explicit 'Forces the explicit declaration of all the variables in a script.
    Dim excel
    Dim excelbook
    Dim a
    Set Excel = CreateObject("Excel.Application")
    Excel.Visible = True
    Set excelbook=Excel.Workbooks.Open("My File")
    excelbook.Sheets("InputResults").range("B5").value = Data.Root.ChannelGroups(ChanGrp#).Properties("myProp").Value
    'Call 'My_Macro' !!!!!!!!!!!!!!!!!!!!
    Msgbox("Result is: " & excelbook.Sheets("InputResults").range("B5").value)
    Solved!
    Go to Solution.

    Hi GT_Mark
    You simply can use the methode Run
    Call Excel.Run("MyMacro")
    Of course you have to make sure that you refer only to data that are available in Excel.
    To obtain CodeCompletion for Excel in the script editor select Microsoft Excel x.x Objects Library in the "Registed Type Libraries" dialog box. The x.x value depends on your installed Excel version.  To open this dialog box, select Script»Type Libraries in DIAdem SCRIPT.
    Hope this helps
    Winfried

  • Transfer the Pur Order Info through BAPI's between SAP R/3 Systems Using XI

    How to Create a Purchase Order for the Vendor and transfer this data through BAPI's between SAP R/3 Systems Using "Exchange Infrastructure(XI)".
    Please kindly let me know the procedure for creating BAPI's and how to transfer this information between SAP R/3 systems. Please kindly mention the NAVIGATION for this scenario.

    Hi Revathi,
    If you want to do an IDOC to IDOC scenario, then the Points to be noted are:
    1. You don’t need a DT, MT or a message interface for the IDOC as it itself acts as the Message Interface.
    2. You import the IDOC and use the same in your mapping.
    3. You do not need a sender IDOC adapter, and no sender agreement, but a receiver IDOC adapter and a receiver agreement is needed.
    IDOC -> File scenario ref:
    /people/prateek.shah/blog/2005/06/08/introduction-to-idoc-xi-file-scenario-and-complete-walk-through-for-starters
    File -> IDOC ->
    /people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping
    (It concentrates on XSLT mapping but also gives an idea about the configuration part. Do go thru that, it might help you.)
    Apart from this if you need any info on how to configure your ALE, partnet profile,etc  drop me a mail, I have excellent tutors that can help you in the same.
    Regards,
    Bhavesh

  • Executing Excel Macros from SAP

    Hi all Experts,
    I have created a program which tranfers data from different internal tables into Different Worksheets of a single workbook.
    Now, Can some one please tell me how to Execute macros from SAP.
    Regards,
    AJ

    To execute an Excel macro follow these steps.
    1. Create macro inside Excel Workbook where you transferred your information.
    2. Use following instruction to execute the desired macro you create:
        DATA: EXCEL TYPE OLE2_OBJECT.
        CREATE OBJECT EXCEL 'Excel.Application'.
        CALL METHOD OF EXCEL 'Run' EXPORTING #1 = 'WRITE_SHEET_CELL'
                                                                            #2 = 'VALUE1'
                                                                            #3 = 'VALUE2'
                                                                            #4 = 'VALUE3'.
    In previous example, macro WRITE_SHEET_CELL was created first. The macro name must be in uppercase.
    Regards.
    Rafael Rojas.

  • Creating sales order using BAPI, through BSP using 2 pages. one for input

    Hi Friends,
    i have a Requirement that....
    i want to create a BSP pages, in first page i have to give input data (in input fields) which is required to create a sales order through BAPI function module (BAPI_SALESORDER_CREATEFROMDAT1).
    in the second page what ever the result given by BAPI FM, that result i want to display on the second page.
    so how i can i proceed with input fields in first page and result in second page. please through some input on this.
    thanks in advance.
    sree

    Hi Sree,
       If you are going to use MVC pattern to do the following steps.
    For example. company code selection...
    In Model class-INIT() method.
    DATA : S_COMP LIKE LINE OF <table>.
    READ TABLE <table> INTO S_COMP INDEX 1.
      IF SY-SUBRC <> 0.
        S_COMP-TEXT = <variable>.
        S_COMP-KEY = '1'.
        APPEND S_COMP TO <i_table>.
        CLEAR S_COMP.
        INSERT S_COMP INTO <i_table> INDEX 1.
      ENDIF.
    HTML View page.
    <htmlb:dropdownListBox id = "comp"
                      table   = "//model/<table>"
                  selection   = "//model/<variable>"
            nameOfKeyColumn   = "text"
            nameOfValueColumn = "text"
            onSelect          = "<Event name>" />
    Thanks,
    Suriya.

  • Class data upload through LSMW using BAPI

    Hi All,
    Plz tell me how to upload class data through LSMW using BAPI.I also need some study material on BAPI.
    Bye,
    Mithilesh Tiwari

    its not possible with single file
    for this you need to pass two files of data
    1 ) Header data ZSOURCE_LIST_HEADER       Source List Header
         MATNR                          C(018)    Material Number
                                        Selection Parameter for "Import/
         WERKS                          C(004)    Plant
    2) item data     ZSOURCE_LIST_ITEM         Source List Item
             MATNR                          C(018)    Material Number
             LIFNR                          C(010)    Vendor Number
             EKORG                          C(004)    Purchasing Organiz
             WERKS                          C(004)    Plant
             VDATU                          C(008)    Valid From
             BDATU                          C(008)    Valid to
    for this use below LSMW IDOC method
    Message Type         SRCLST                      Source List
    Basic Type           SRCLST01                    Source List

  • How to run Excel Macros using JDBC-ODBC

    Hi,
    I want to run the excel macros in the excel file, after I connected to excel file, using JDBC-ODBC bridge.
    How macros treated here?
    Help needed please..........
    - Ramesh

    How to run Excel Macros using JDBC-ODBCYou don't.
    As my fuzzy understanding goes.....
    Macros (excel, word, etc) run via a "OLE" extension of the script host system.
    So the only way to run them is via the OLE interface. That has nothing to do with ODBC. You can write your own JNI to do that, or you might get lucky and find that someone else has written a java library to do it for you.

  • Copying Graphs and Pie Charts generated in Analysis View to Email item using Excel VBA Macro Code

    Hi
    I am currently working on an exce VBA macro code that would help me take snapshots of the Graphs and Pie charts generated in QC for a particular application and copy the same to an email item using excel VBA macro code.
    I was able to write the code to create an email item. But I have no clue of how i can take snapshot of the graphs in Analysis View using excel VBA
    Any help would be highly appreciated.
    Thanks in Advance
    Regards
    Amit

    useramit,
    You are in the consumer end products forum.  You will also want to ask your question over at the Enterprise Business Community.
    Click the plus sign (+) next to Discussion Boards to drop down all the options for servers, networking and any other professionally related problems.
    http://h30499.www3.hp.com/

  • Encrypt with password using an EXCEL macro

    I created a PDF using a macro in EXCEL 2010.  Can I encrypt the PDF using the macro?  I want to encrypt all document contents and restriction permissions to high resolution printing.

    Hi Ralph,
    Please post the query in Microsoft forums.
    You might want to refer to the below threads :
    https://forum.openoffice.org/en/forum/viewtopic.php?f=30&t=54705
    http://www.excelguru.ca/forums/showthread.php?1412-Need-Macro-Help-to-send-a-worksheet-as- PDF
    Regards,
    Rave

Maybe you are looking for