Fetch details from workitem.

Hi,
I have a Travel & expense workflow scenario where in i get workitem id is a rfc bapi call. Based one the wrokitem id i need to fetch the corresponding key fields like the Personal Number and the Trip Number.
How can i acheive this. Is there any FM for the same.
Regards,
Jose

Hi Pavan,
Sorry i could not reply immediately, the net got disconnected.
Anyways, thanks for the quick reply. I think i framed the Q wrong.
The BAPI you suggested asks for the SAP system, i mean it is called from some other system to SAP system. My rewuirement is that i am getting the workitem id from the portal system to SAP so i need t process the details in SAP only using the workitem id. For this i found am FM 'SWK_WI_CONTAINER_READ'
which is giving me the necessary details in a single string concatenated. I am using that for now.
Kindly suggest if there is any other FM which would give the parameters in separate variables other than in a single string concatenated.
Regards,
Jose

Similar Messages

  • Fetching details from the URL Link

    Hi Experts,
    I need a help on the webdynpro, for capturing few details from the url used to call the webdynpro application.
    My client has designed the scenario such that,
    They have designed thier intranet in dotnet. For accessing the webpage designed, the user has to provide his Employee ID and name.
    On accessing the webpage designed for him, he has few webdynpro URL links assigned to him that he can access.
    On clicking the link, the Webdynpro application is called for doing the transaction.
    Now the requirement is that, for calling the webdynpro application the client is passing the Employee name, Employee ID and the IP address of the thin client system, through the URL link generated by the dotnet framework.
    Now I need to know the way how to capture these details into the webdynpro application?
    hereby am providing the sample URL by which they pass the values.
    http://abcde.industries.co.in:8000/sap/bc/webdynpro/sap/zwda_MB51?uid=1283265&empname=RAMESH KUMAR&tcode=MMBE&ip=192.168.45.118
    Kindly provide me the possible solution.
    Regards,
    Vijaysankar.V

    Dear Vijay,
               In your case , your application url parameters are like UID,NAME, IP, & TCODE.
               U Can write a method and fetch all these parameters as i shown below:
    data: uid type string.
    data: name type string.
    data: ip type string.
    data: tcode type string.
    uid = wdr_task=>client_window->get_parameter( 'UID' ).
    name = wdr_task=>client_window->get_parameter( 'NAME'' ).
    ip = wdr_task=>client_window->get_parameter( 'IP' ).
    tcode = wdr_task=>client_window->get_parameter( 'TCODE' ).
    Thanks,
    Saurin Shah

  • Fetching pernr from workitem

    HI All,
    I am working on workflow for approval /rejection of leave requests. Can someone tell me if there is any BAPI/function module or DB table from where i can fetch the personnel number (pernr) from the workitem id in my function module?
    Regards
    Partha
    Edited by: Partha Kar on Apr 6, 2010 6:03 PM

    Check below code snippet, Actually Iam not clear whose pernr you are trying to get whether the Intiiators or the approvers, if it is intiiators the you can use the below code snippet,
    DATA:
               lv_wiid   TYPE sww_wiid,
               lt_cont   TYPE STANDARD TABLE OF swr_cont,
               ls_cont  TYPE swr_cont,
               lv_pernr  TYPE pernr_d,
               lv_initiator TYPE sysid.
    CALL FUNCTION 'SAP_WAPI_READ_CONTAINER'
      EXPORTING
        workitem_id      = lv_wiid
      TABLES
        simple_container = lt_cont.
    READ TABLE lt_cont INTO ls_cont WITH KEY element = '_WF_INITIATOR'.
    IF sy-subrc IS  INITIAL.
      lv_initiator = ls_cont-value.
      CALL FUNCTION 'RP_GET_PERNR_FROM_USERID'
        EXPORTING
          begda     = sy-datum
          endda     = sy-datum
          usrid       = lv_initiator
          usrty       = '0001'
        IMPORTING
          usr_pernr = lv_pernr
        EXCEPTIONS
          retcd     = 1
          OTHERS    = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDIF.
    If at all you are looking for approvers pernr then you need to change read table statement by replacing the key from WIINITIATOR to WIACTUAL_AGENT.

  • Fetching Invoice details from BSEG

    Hi experts,
                    I  fetched  details like BUZEI BUZEI KOART SHKZG MWSKZ DMBTR PSWBT PSWSL HWBAS KTOSL HKONT KUNNR MATNR TXJCD from Bseg . program execute  well in development server but very slow  in production server. Coding is given below , kindly provide solution for this.
    input.
    1.MANDT
    2.BUKRS
    3.VKORG
    4.FKDAT
    First i fetch invoices based on input from vbrk and vbrp table and  passed  in bseg.
    SELECT VBRKMANDT VBRKVBELN VBRKVKORG VBRKFKDAT VBRKBUKRS VBRPGSBER
      INTO TABLE ITAB
      FROM VBRK
      INNER JOIN VBRP ON VBRKVBELN = VBRPVBELN
      WHERE
       VBRK~MANDT IN S_MANDT AND
            VBRK~BUKRS IN S_BUKRS AND
            VBRK~VKORG IN S_VKORG AND
            VBRK~FKDAT IN S_FKDAT.
      RANGES : R_VBELN FOR VBRK-VBELN.
      LOOP AT ITAB.
        R_VBELN-SIGN = 'I'.
        R_VBELN-OPTION = 'EQ'.
        R_VBELN-LOW = ITAB-VBELN.
        APPEND R_VBELN.
      ENDLOOP.
      LOOP AT ITAB.
        ITAB-FYEAR = ITAB-FKDAT+0(4).
        MODIFY ITAB INDEX SY-TABIX.
      ENDLOOP.
      DATA : BELNR LIKE BSEG-BELNR.
      SELECT BELNR GJAHR BUZEI KOART SHKZG MWSKZ DMBTR PSWBT PSWSL HWBAS KTOSL HKONT KUNNR MATNR TXJCD
      FROM BSEG INTO TABLE GTAB FOR ALL ENTRIES IN ITAB
      WHERE BUKRS IN S_BUKRS AND
            BELNR IN R_VBELN AND      
            GJAHR = ITAB-FYEAR .
    Thanks & regards
    G.Vendhan

    Hi Vendhan,
    SELECT VBRK~MANDT VBRK~VBELN VBRK~VKORG VBRK~FKDAT VBRK~BUKRS VBRP~GSBER
    INTO TABLE ITAB
    FROM VBRK
    INNER JOIN VBRP ON VBRK~VBELN = VBRP~VBELN
    WHERE
    VBRK~MANDT IN S_MANDT AND " Not required so comment it...
    VBRK~BUKRS IN S_BUKRS AND
    VBRK~VKORG IN S_VKORG AND
    VBRK~FKDAT IN S_FKDAT.
    RANGES : R_VBELN FOR VBRK-VBELN.
    LOOP AT ITAB.
    R_VBELN-SIGN = 'I'.
    R_VBELN-OPTION = 'EQ'.
    R_VBELN-LOW = ITAB-VBELN.
    APPEND R_VBELN.
    ENDLOOP.
    LOOP AT ITAB.
    ITAB-FYEAR = ITAB-FKDAT+0(4).
    MODIFY ITAB INDEX SY-TABIX.
    ENDLOOP.
    DATA : BELNR LIKE BSEG-BELNR.
    As you are interesed to get the data for the billing document only select data from vbrk only...
    and use that internal table in for all entries with BSEG rather then join of vbrk and vbrp while
    IF ITAB[] IS NOT INITIAL[]. " Check this condition before using For all Entries alwayse...
    SELECT BELNR GJAHR BUZEI KOART SHKZG MWSKZ DMBTR PSWBT PSWSL HWBAS KTOSL HKONT KUNNR MATNR TXJCD
    FROM BSEG INTO TABLE GTAB FOR ALL ENTRIES IN ITAB
    WHERE BUKRS IN S_BUKRS AND
    BELNR IN R_VBELN AND  " Wrong... You are supposed to pass vbrk-VBELN to BSEG-VBELN as BELNR and VBELN are different and contains diff data as well..
    GJAHR = ITAB-FYEAR
    AND KOART =  'D'. " Include it for customers
    ENDIF.
    Also I would like to suggest you if you can use below tables if possible...
    BSAD                           secondary Index for Customers (Cleared Items)
    BSID                             secondary Index for Customers
    So you need to change the logic to get correct data first...
    Hope it will solve your problem..
    Thanks & Regards
    ilesh 24x7
    ilesh Nandaniya

  • How to fetch Schedule details from Subscription ID using ReportServer2010

    Hi All,
    I'm using Azure so ReportServer DB and the application DB  are in two different servers. So my requirement is to fetch the Schedule details from the ReportServer DB and store it in my application DB for further processing and i have only the SubscriptionID.
    So is there any way i can fetch the schedule details from subscription ID from ReportServer2010 web service.
    One alternative is that I'm connecting to the azure server and fetching the information but i want to know is there any built in web method to get this info.
    Thanks in advance and let me know if you need any more info. Waiting for your valuable answer.
    Regards,
    Ravi Neelam.

    After going thought different forums and got some knowledge on this issue and able to sort this issue. I'm posting this so other can easily use this method and can save lot of time.
    Solution: I'm using CreateSchedule method which will create a Schedule in ReportServer DB and will return the ScheduleId which i will insert as a matchData parameter to my CreateSubscription
    method. Hope the below code snippet will be use full.
    This is my CreateSubscription Method code snippet:
    public string CreateSubscription(string reportPath, string toAddress, string subject, string description, int matchDataSelection, Dictionary<string, string> itemParameters)
                int counter = -1;
                string subscriptionId = string.Empty;
                ExtensionSettings extensionSettings = GetExtensionSettings(toAddress, subject);
                ScheduleDefinition matchData = GetMatchData(matchDataSelection);
                ParameterValue[] parametersvalue = new ParameterValue[itemParameters.Count()];
                foreach (var item in itemParameters)
                    ParameterValue param = new ParameterValue();
                    counter++;
                    param.Name = item.Key;
                    param.Value = item.Value;
                    parametersvalue[counter] = param;
                ScheduleDefinition scheduleDefinition = new ScheduleDefinition();
                scheduleDefinition = GetMatchData(matchDataSelection);
                string scheduleId = service.CreateSchedule("SampleScheduleDefnition", scheduleDefinition, null);
                return subscriptionId = service.CreateSubscription(reportPath, extensionSettings, description, "TimedSubscription", scheduleId, parametersvalue);
    private ExtensionSettings GetExtensionSettings(string toAddress, string subject)
                ExtensionSettings extensionSettings = new ExtensionSettings();
                ParameterValue[] extensionParams = new ParameterValue[5];
                extensionParams[0] = new ParameterValue();
                extensionParams[0].Name = "TO";
                extensionParams[0].Value = toAddress;
                extensionParams[1] = new ParameterValue();
                extensionParams[1].Name = "IncludeReport";
                extensionParams[1].Value = "FALSE";
                extensionParams[2] = new ParameterValue();
                extensionParams[2].Name = "Subject";
                extensionParams[2].Value = subject;
                extensionParams[3] = new ParameterValue();
                extensionParams[3].Name = "RenderFormat";
                extensionParams[3].Value = "PDF";
                extensionParams[4] = new ParameterValue();
                extensionParams[4].Name = "Priority";
                extensionParams[4].Value = "NORMAL";
                extensionSettings.ParameterValues = extensionParams;
                extensionSettings.Extension = "Report Server Email";
                return extensionSettings;
    private ScheduleDefinition GetMatchData(int matchDataSelection)
                int selection = matchDataSelection;
                DateTime currentDate = DateTime.Now;
                TimeSpan timeStampforNewTime = new TimeSpan(08, 00, 00);
                currentDate = currentDate.Date + timeStampforNewTime;
                ScheduleDefinition schedule = new ScheduleDefinition();
                schedule.StartDateTime = currentDate;
                if (matchDataSelection == 1)
                    schedule.EndDate = DateTime.Now.AddDays(1);
                    schedule.EndDateSpecified = true;
                else
                    schedule.EndDateSpecified = false;
                ScheduleDefinition matchDataResponse = new ScheduleDefinition();
                switch (selection)
                    case (int)MatchDataSelection.Once:
                        schedule.Item = GetPatternforDaily();
                        break;
                    case (int)MatchDataSelection.Daily:
                        schedule.Item = GetPatternforDaily();
                        break;
                    case (int)MatchDataSelection.Weekly:
                        schedule.Item = GetPatternforWeekly();
                        break;
                    case (int)MatchDataSelection.BiWeekly:
                        schedule.Item = GetPatternforBiWeekly();
                        break;
                    case (int)MatchDataSelection.Monthly:
                        schedule.Item = GetPatternforMonthly();
                        break;
                //XmlDocument xmlDoc = GetScheduleAsXml(schedule);
                //matchDataResponse = xmlDoc.OuterXml;
                return matchDataResponse;
    private RecurrencePattern GetPatternforMonthly()
                MonthlyDOWRecurrence pattern = new MonthlyDOWRecurrence();
                pattern.WhichWeekSpecified = true;
                pattern.WhichWeek = WeekNumberEnum.FirstWeek;
                MonthsOfYearSelector months = new MonthsOfYearSelector();
                months.January = true;
                months.February = true;
                months.March = true;
                months.April = true;
                months.May = true;
                months.June = true;
                months.July = true;
                months.August = true;
                months.September = true;
                months.October = true;
                months.November = true;
                months.December = true;
                pattern.MonthsOfYear = months;
                DaysOfWeekSelector days = new DaysOfWeekSelector();
                days.Monday = true;
                pattern.DaysOfWeek = days;
                return pattern;
            private RecurrencePattern GetPatternforDaily()
                DailyRecurrence pattern = new DailyRecurrence();
                pattern.DaysInterval = 1;
                return pattern;
            private RecurrencePattern GetPatternforWeekly()
                WeeklyRecurrence pattern = new WeeklyRecurrence();
                DaysOfWeekSelector selector = new DaysOfWeekSelector();
                selector.Monday = true;
                pattern.DaysOfWeek = selector;
                return pattern;
            private RecurrencePattern GetPatternforBiWeekly()
                WeeklyRecurrence pattern = new WeeklyRecurrence();
                DaysOfWeekSelector selector = new DaysOfWeekSelector();
                selector.Monday = true;
                pattern.DaysOfWeek = selector;
                pattern.WeeksInterval = 1;
                pattern.WeeksIntervalSpecified = true;
                return pattern;
    Regards, Ravi Neelam.

  • Not able to fetch the audit trail details from dehydration store.

    Hi
    While i am trying to fetch the audit trail details from the dehydration store using oracle soa 11g api, i am getting the below error.
    The complete stack trace is as below.
    javax.naming.NameNotFoundException: Unable to resolve 'FacadeFinderBean'. Resolved '' [Root exception is javax.naming.NameNotFoundException: Unable to resolve 'FacadeFinderBean'. Resolved '']; remaining name 'FacadeFinderBean'
         at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:234)
         at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:348)
         at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259)
         at weblogic.jndi.internal.ServerNamingNode_1033_WLStub.lookup(Unknown Source)
         at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:405)
         at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:393)
         at javax.naming.InitialContext.lookup(InitialContext.java:392)
         at oracle.soa.management.internal.ejb.EJBLocatorImpl.lookupBean(EJBLocatorImpl.java:738)
         at oracle.soa.management.internal.ejb.EJBLocatorImpl.lookupFinderBean(EJBLocatorImpl.java:716)
         at oracle.soa.management.internal.ejb.EJBLocatorImpl.<init>(EJBLocatorImpl.java:167)
         at oracle.soa.management.facade.LocatorFactory.createLocator(LocatorFactory.java:35)
         at com.test.GetPayload.getCompositeInstancePayload(GetPayload.java:65)
         at com.test.GetPayload.main(GetPayload.java:129)
    Caused by: javax.naming.NameNotFoundException: Unable to resolve 'FacadeFinderBean'. Resolved ''
         at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:1139)
         at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:252)
         at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.java:182)
         at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:206)
         at weblogic.jndi.internal.RootNamingNode_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:667)
         at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:522)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:518)
         at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
    My code is as below
    Hashtable jndiProps = new Hashtable();
    jndiProps.put(Context.PROVIDER_URL, "t3://localhost:7001");
    jndiProps.put(Context.INITIAL_CONTEXT_FACTORY,
    "weblogic.jndi.WLInitialContextFactory");
    jndiProps.put(Context.SECURITY_PRINCIPAL, "weblogic");
    jndiProps.put(Context.SECURITY_CREDENTIALS, "welcome1");
    jndiProps.put("dedicated.connection", "true");
    Locator locator = LocatorFactory.createLocator(jndiProps);
    CompositeInstanceFilter filter = new CompositeInstanceFilter();
    filter.setECID(ecid); //Set the composite ECID
    filter.setId(compInstanceId); //Set the composite instance id
    Any Suggestion in this regard will be helpful.
    Thanks
    Abhijit
    Edited by: 945736 on Jul 11, 2012 4:20 PM
    Edited by: 945736 on Jul 11, 2012 4:20 PM

    If it just for a particular message then another simple solution is to open the message and go to details in pimon.
    http://wiki.scn.sap.com/wiki/display/PIS/AdapterMessageMonitoringVi+service+and+it%27s+methods

  • Create a report same as KSB1 and add WBS line item details from CJI3

    Hello Everyone,
    I need to create a report exactly like KSB1 which should have a selection screen exactly like KSB1 but it should also display the WBS line item details from CJI3.
    What is the right way of doing it? Please advice.
    COEP is pretty huge in Production, and we need to fetch data by a specific date in selection screen or a cost center group. This can take a long time to fetch data from the table based on selection screen input. Are there function modules or do we need to use some other tables to fetch data same as COEP?
    Thanks for all your help.
    Regards,
    Shipra.

    Hai ,
             Please go throuth the note  325546  , u need to implement the customer exit  COOMEP01 .
    regards,
    K.Vinay kumar

  • Fetching Data from SAP ECC to BODS 4.0

    HI,
    I am trying to fetch tables like LFA1 and ADRC into BODS from ECC. I am able to connect to the ECC system from BODS.
    In Data services Designer I go to Datastore and add a new datastore as SAP Applications.
    I am able to connect to ECC using this. After that when I select the datastore and select import by name i get the following error
    Data Services Designer
    Error: Cannot import the metadata table <name=LFA1>.
    RFC CallReceive error <Function Z_AW_RFC_ABAP_INSTALL_AND_RUN: RFC_ABAP_MESSAGE- SAP System has status 'not modifiable'[SAP NWRFC 711][SAP Partner 701 ][PET][hicgudb3][BOBJDS][4102]>. (BODI-1112339)
    OK  
    Can you please help me in resolving this.
    What kind of access does the user need to have for fetching data from ECC using BODS
    Thanks in advance.
    Regards
    Sudip.

    Please refer to the [documentation|http://help.sap.com/businessobject/product_guides/boexir4/en/sbo401_ds_sap_en.pdf] that discusses that in quite a lot of detail.

  • How can i fetch records from 3 tables in a single query  without using join

    Hi.
    Can any body please tell me <b>How can i fetch records from 3 tables with a single query  without using joins</b>
    Thanx
    prabhudutta

    Hi Prabgudutta,
    We can fetch the data by using the views concept.
    Go throuth this info we can know the how to create view and same like database table only we can fetch the data.
    Views conatin the data at runtime only.
    Four different view types are supported. These differ in the
    way in which the view is implemented and in the methods
    permitted for accessing the view data.
    Database views are implemented with an equivalent view on
    the database.
    Projection views are used to hide fields of a table (only
    projection).
    Help views can be used as selection method in search helps.
    Maintenance views permit you to maintain the data
    distributed
    on several tables for one application object at one time.
    step by step creation of Maintenance view:
    With the help of the table maintenance generator, you are able to maintain the ENTRIES of the table in SM30 transaction.
    It can be set in transaction SE11 - Tools - Table maintenance generator.
    Table maintanance Generator is used to manually input values using transaction sm30
    follow below steps
    1) go to se11 check table maintanance check box under attributes tab
    2) utilities-table maintanance Generator-> create function group and assign it under
    function group input box. Also assign authorization group default &NC& .
    3) select standard recording routine radio in table table mainitainence generator to move table
    contents to quality and production by assigning it to request.
    4) select maintaience type as single step.
    5) maintainence screen as system generated numbers this dialog box appears when you click on create button
    6) save and activate table
    One step, two step in Table Maintenance Generator
    Single step: Only overview screen is created i.e. the Table Maintenance Program will have only one screen where you can add, delete or edit records.
    Two step: Two screens namely the overview screen and Single screen are created. The user can see the key fields in the first screen and can further go on to edit further details.
    SM30 is used for table maintenance(addition or deletion of records),
    For all the tables in SE11 for which Table maintenance is selected , they can be maintained in SM30
    Sm30 is used to maintain the table ,i.e to delete ,insert or modify the field values and all..
    It creates the maintenance screen for u for the aprticular table as the maintenance is not allowed for the table..
    In the SE11 delivery and maintenance tab, keep the maintenance allowed..
    Then come to the SM30 and then enter the table name and press maintain..,
    Give the authorization group if necessary and give the function group and then select maintenance type as one step and give the screen numbers as system specified..
    Then create,,,
    Then u will able to see the maintenance view for the table in which u can able to insert and delete the table values...
    We use SM30 transaction for entering values into any DB table.
    First we create a table in SE11 and create the table maintenance generator for that Table using (utilities-> table maintenance generator) and create it.
    Then it will create a View.
    After that from SM30, enter the table name and Maintain, create new entries, change the existing entries for that table.
    Hope this resolves your query.
    Reward all the helpful answers.
    Rgds,
    P.Naganjana Reddy

  • Any suggestion for tuning following code of fetching prompts from report.

    Hi Experts,
    In my application I want to fetch all prompts details from SAP BO.  I am using following code and its working fine but taking to much time in fetching data.
    public static ReportEngine reportEngineWebi = null;
      public static ReportEngine reportEngineFullClient = null;
      public static Prompts prompts = null;
      public static DocumentInstance di = null;
      public static Prompt cdzPrompt = null;
      public static PromptType cdzPromptType = null;
      public static Lov lov = null;
      public static Values lovValues = null;
      public static String[] pvalues = null;
      public static IWebi webi = null;
      public static IFullClient fullclient = null;
      public static int prmt_report_si_id = 0;
      public static String prmt_si_id = "";
      public static String prmt_si_title = "";
      public static String prmt_si_kind = "";
      public static String prmt_si_lov_previous_values = "";
      public static String prmt_si_lov_values = "";
    IInfoObjects objsprompts = oInfoStore
      .query("Select top 20000 * From CI_INFOOBJECTS Where si_kind in ('Webi') and SI_INSTANCE=0 and SI_PROCESSINFO.SI_HAS_PROMPTS=1");
      int prmt_report_si_id = 0;
      prmt_si_id = "";
      prmt_si_title = "";
      prmt_si_kind = "";
      prmt_si_lov_previous_values = "";
      prmt_si_lov_values = "";
      reportEngineWebi=((ReportEngines) oEnterpriseSession
      .getService("ReportEngines"))
      .getService(ReportEngines.ReportEngineType.WI_REPORT_ENGINE);
      for (int j = 0; j < objsprompts.getResultSize(); j++) {
      prompts = null;
      di = null;
      try {
      webi = (IWebi) objsprompts.get(j);
      di = reportEngineWebi.openDocument(webi.getID());
      try {
      prmt_report_si_id = 0;
      prmt_report_si_id = webi.getID();
      } catch (Exception e) {
      prmt_report_si_id = 0;
      prompts = di.getPrompts();
      try {
      if (prompts.getCount() > 0) {
      for (int i = 0; i < prompts.getCount(); i++) {
      cdzPrompt = prompts.getItem(i);
      try {
      prmt_si_id = "";
      prmt_si_id = cdzPrompt.getID();
      } catch (Exception e) {
      prmt_si_id = "";
      try {
      prmt_si_title = "";
      prmt_si_title = cdzPrompt.getName();
      } catch (Exception e) {
      prmt_si_title = "";
      try {
      cdzPromptType = cdzPrompt.getType();
      prmt_si_kind = cdzPromptType.toString();
      } catch (Exception e) {
      prmt_si_kind = "";
      // System.out.println("going to fetch prompt lov");
      cdzPromptType = cdzPrompt.getType();
      // System.out.println("promt type-" + cdzPromptType);
      // System.out.println("Ended***********"+i);
      if (cdzPrompt.hasLOV()) {
      try {
      prmt_si_lov_values = null;
      // System.out.println("going to found pvalues");
      pvalues = cdzPrompt.getPreviousValues();
      // System.out.println("pvalues found");
      prmt_si_lov_previous_values = "";
      if (pvalues.length > 0) {
      // System.out.println("pvalues-");
      for (int c = 0; c < pvalues.length; c++) {
      if (c == 0) {
      prmt_si_lov_previous_values = pvalues[c];
      } else {
      prmt_si_lov_previous_values = prmt_si_lov_previous_values
      + "," + pvalues[c];
      } catch (Exception e) {
      System.out.println("handle Error lov values");
      e.printStackTrace();
      // System.out.println(" ");
      // here enters prompts into databse...
      // System.out.println(i+" prompt fetch");
      pstmt.setInt(1, prmt_report_si_id);
      pstmt.setString(2, prmt_si_id);
      pstmt.setString(3, prmt_si_title);
      pstmt.setString(4, prmt_si_kind);
      pstmt.setString(5, prmt_si_lov_previous_values);
      pstmt.setString(6, prmt_si_lov_values);
      pstmt.setString(7, "Utility");
      pstmt.executeUpdate();
      } else {
      // System.out.println("No promts found");
      } catch (Exception e) {
      // System.out.println("Handle Error in code-");
      // e.printStackTrace();
      } catch (Exception e) {
      // Nothing...
      try {
      if(di!=null){
      //System.out.println("going to close di");
      di.closeDocument();
      //System.out.println("di close");
      } catch (Exception e) {
      // nothing..
      //System.out.println("*****************************single prompt completed********************************");
      if(reportEngineWebi!=null){
      try{
      reportEngineWebi.close();
      }catch(Exception e){
      System.out.println("Handle error! while closing reportEngineWebi prompt");
      e.printStackTrace();
    This code is working fine but taking too much time in fetching prompts.
    di = reportEngineWebi.openDocument(webi.getID());
    this is DocumentInstance object, its taking time.
    Please suggest me if there is any other option available to fetch prompts from SAP BO.
    Thanks in advanced

    Hi Vijay...
    The selection screen should look like...
    cb1 -
    variant1 -
    icb1 -
    date1 -
    time1
    cb2 -
    variant2 -
    icb2 -
    date2 -
    time2
    where...
    cb1 - checkbox which indicates the first report(YRTEST) in the table...
    variant1 - textbox for variant which has a help,on clicking should display all the variants of YRTEST report...
    icb1 - checkbox which indicates the immediate background processing...
    date1 - date on which the job should be scheduled...
    time1 - time on which the job should be scheduled...
    If icb1 is clicked then date1 & time1 should not be allowed to enter & vice-versa...
    cb2 - checkbox which indicates the second report(YRTEST1) in the table...
    variant2 - textbox for variant which has a help,on clicking should display all the variants of YRTEST1 report...
    icb2 - checkbox which indicates the immediate background processing...
    date2 - date on which the job should be scheduled...
    time2 - time on which the job should be scheduled...
    If icb2 is clicked then date2 & time2 should not be allowed to enter & vice-versa...
    Its not like what u said...(Based on user entered data fetch the data of report(variant,date,time) and you can submit the data to background job as incase of single record by looping the data)
    Because we have only ReportName,ReportDescription as fields in the table & not variant,date,time...The variant,date,time are all entered in the selection-screen only from which the background job is scheduled...
    I hope the requirement is more clearer...

  • Fetch data from IR to form in UPPER CASE format for text field items

    Hello,
    Can anyone please help with this issue. I have a IR report with form and I want to fetch the data to upper case when I go to the form level to edit the details from the IR report. I am using the Oracle APEX in built automatic row processing DML to update, create or delete the records. Is their any way, where I can convert the data to upper case whenever user creates a new record or updates the existing record using the in-built automatic row processing DML.
    Please help.
    Thanks,
    Orton

    Jari,
    I have tried your option but no luck. The thing is the text is getting converted from lower to upper case when i navigate from report to form level. But I want to save the data to the database all upper case, even if the user enters data in lower case and this applies for both inserts and updates. Whenever i tried to create or update a record, all the data should be converted to upper case before inserting or updating to the database.
    Please help.
    Thanks,
    Orton

  • I have Problem in fetching data from CONTROL BLOCK

    Sir,
    I am facing problem in fetching data from control block.
    Asif.

    is your control-block a filter-block for the detail-block?
    Do you want to see only the detail-data of the user-id you have displayed in the master?

  • Fetch records from Database based on Input value

    Hi Experts,
    In my mobile application, I have designed one input field with F4 help or input assist. I need to fetch records from database based on that input and need to display records in table.
    My question is:
    How to fetch the records from database/back end based on the input value and display them as table format as we are doing in SAP ABAP?
    Here, I need to fetch the records based on input value available in the UI screen and pass that value to gateway, fetch the records from database and need to bind with table in SAPUI5.
    Kindly share the whole process flow with sample code for this requirement. Hope I have explained the requirement in detail.
    Thanks In Advance..
    Regards,
    Arindam Samanta.

    Hi,
    Try something like this.
    In this, I am passing From date, To date, RelGrp, RelStr, Uname as input. Then I am storing those values in variables and passing this data in Odata request.
    OData.read({ requestUri: "http://xxxx:8000/sap/opu/odata/sap/Z188_PO_SRV/pos?$filter=Docdate le datetime'"
                    + todateformat+"T00:00:00' and Docdate ge datetime'"
                    + fromdateformat+"T00:00:00' and RelGrp eq '"
                    + relcode +"'and RelStr eq '"
                    + relstg +"'and Uname eq '"
                    + username+ "' "},
      function (data) {
    console.log(data);
    When we are giving correct inputs it will goes to Success function and get the data from back end.
    In console we can see the data.
    Hope this will helps to you.
    Thanks&Regards
    Sridevi

  • Fetch Details of Transport Management Documents with Document IDs.

    Hi,
    I have a requirement in which I have to fetch details like Partner IDs, Transportation mode etc. for various TM documents like Freight Order, Forwarding Agreement etc on the basis of their Document IDs.
    I could find that Documents are stored as Business Objects in SAP TM system which we can explore with transaction /BOBF/CONF_UI.
    Could anyone please help me further with how can I fetch the details for a TM document from Business Objects.
    Thanks,
    Shalabh

    Shalabh ,
    The only way to fetch data from BOBF is to dig in a standard way, i can only suggest some code with methods.You can use them as ref. to fetch required data.
    This is a sample to get your Freight order root , key is your parent Key.
      DATA:
               lt_key               TYPE /bobf/t_frw_key,
              lt_root              TYPE /scmtms/t_tor_root_k,
              lo_srvmgr            TYPE REF TO /bobf/if_tra_service_manager.
    CALL METHOD lo_srvmgr->retrieve
             EXPORTING
               iv_node_key = /scmtms/if_tor_c=>sc_node-root
               it_key      = lt_key
             IMPORTING
               et_data     = lt_root.
    similarly you can use associations to fetch further nodes from BOBF.
    CALL METHOD lo_srvmgr->retrieve_by_association
             EXPORTING
               iv_node_key    = /scmtms/if_tor_c=>sc_node-root
               it_key         = lt_key
               iv_association = /scmtms/if_tor_c=>sc_association-root-stop_first
               iv_fill_data   = abap_true
               iv_edit_mode   = /bobf/if_conf_c=>sc_edit_read_only
             IMPORTING
               et_data        = lt_stop
               et_target_key  = lt_stop_key.
    Hope this Helps.
    Thanks
    Sarab.

  • Filters on non-conforming dimensions when fetching data from multiple facts

    Hi,
    I would like to confirm my understanding about how OBI fetches data from multiple facts. I have set up the BMM layer. Through Answers I am getting data from multiple facts as expected. However, is it necessary to base filters only on the conforming dimensions? If I do so, I am getting the correct data. But if I filter data on non-conforming dimensions, then I am getting more data which I am not expecting.
    Suppose, Fact1, Fact2 and Fact3 share a CommonDim dimension. If I have a filter on CommonDim, then the filter is used on the three fact tables. However, if I filter data based on Fact1's DimTwo which is not shared by Fact2 and Fact3 and I have measurements from all the fact tables, then from the SQL generated, it seems that OBI is fecting all data from Fact2 and Fact3 and data from Fact1 where DimTwo = 'SomeValue'. Then it seems to be merging the data from the three result sets.
    Is this expected, esp. a scenario where a filter is based on a non-conforming dimension (DimTwo in the example)? Have I missed anything? What do I need to do, if I want to return rows from Fact1 based on DimTwo's filter and then if there is data on Fact2 and Fact3 based on the value in CommonDim corresponding to DimTwo's filter?
    Please let me know.
    Thanks and regards,
    Manoj.
    PS.: I have got a link now which is http://obibb.wordpress.com/2010/06/06/multiple-fact-reporting-on-non-conforming-dimensions-part-ii/
    Edited by: mandix on 25-Oct-2011 12:01

    Hi
    The problem you describe is similar to mine (I wrote several threads ago).
    That is, if there is a non-conformed dimension in a report then the column from the fact table which is not connected with those non-conformed dimensions containes zeros or blanks.
    Was this problem solved? I didn't quite catch one of previuos messages... If you can please repeat it more detailed.
    What I tried to do is to set Total level in the Content tab (LTS properties). In this example - I could set Total level to JOBS in the plan type dimension. But it didn't help.
    So if you know what to do then please describe it here...

Maybe you are looking for