Function module PTRA_WEB_EXPENSE_REPORT_GET_2 not working when used in loop

Hi All,
I have used a function module PTRA_WEB_EXPENSE_REPORT_GET_2  in a custom fumction module which i am developing fetch the travel expense data . The function module PTRA_WEB_EXPENSE_REPORT_GET_2  returns the travel expense data based on the employee and the trip number. I want to fetch the travel expense data for a given set of employees and trip number and hence i have used this function module inside a loop statement.
The function module returns the travel expense data for the employee and trip in the first loop pass. From the second loop passs it doesn't return the value. I have also checked this in se37 and the same thing happens. Value is returned for the fist employee but for the next employee we have to go to initial screen of se37 and execute the Func. module again.
I debugged this function module and found that the value of the employee and the trip number is stored in the global variable. The value passed for the employee and trip is compared with the correspomding value in the global variable and if they are not same an error message is returned. Since we are using in a loop , each time a different value is passed for the employee and trip and the check fails .
Is there any way to clear the value in the global parameters or is there any other function module which can be used to clear the values of the global variables?
Thanks!
Regards
Manipal Parkala

Hello Archana,
May be we can try several ways...
1) can you try calling function module BUFFER_REFRESH_ALL ??
   after each call...
2) May be u can call Function module "PTRA_WEB_EXPENSE_REPORT_GET_2 " in background task or seperate task , it will load the function group everytime when u call it in loop.
***DO let us know if it does not work.
thanks
~Raj

Similar Messages

  • HT204168 touch screen function not working when using facetime

    Why is my iPad touch screen function not working when using FaceTime?

    Hi megascones,
    I apologize, I'm a bit unclear on the exact nature or scope of the issue you are describing. If you are having issues with the touch screen on your iPad, you may find the troubleshooting steps outlined in the following article helpful:
    If the screen on your iPhone, iPad, or iPod touch doesn't respond to touch - Apple Support
    Regards,
    - Brenden

  • Why is my touch screen function not working when using facetime

    Why is my touch screen function not working when using facetime

    Hello megascones,
    After reviewing your post, it sounds like the screen is not responding to touch in one app. I would recommend that you read this article, it may be able to help the issue.
    If the screen on your iPhone, iPad, or iPod touch doesn't respond to touch - Apple Support
    Restart your device. If you can't restart, reset your device.
    Thanks for using Apple Support Communities.
    Have a nice day,
    Mario

  • Siri does not work when used for calling a contact function

    Siri does not work when used for calling a contact function

    Very strange, try to turn off/on your iPhone. Or make a reset (home+power button)...
    If it continues try to restore it.

  • Function module is not working properly in background

    Hi  all,
    i have used one Function module 'PRICING' in user exit SAPMV45A to calculate pricing for sales order.
    i am using BAPI_SALESORDER_CHANGE to change the sales order pricing.
            when i run the program in foreground, all condition records for pricing is updated correctly. but it is not updating
    correctly when i run the program in background.
       Please tell me wheather 'PRICING'  or  'BAPI_SALESORDER_CHANGE'  function module is not working properly in background ?
       or any other reason?
    Thanks
    babu

    Hi Pabitra,
    Can you provide some more information as to the type of error you are getting? Or can you check the log entries and give some more information so that it would be possible to provide a solution.
    And, try to put questions in proper Forum for quick and prompt reply.
    Hope this helps.
    Thanks,
    Samantak.

  • Reg:Function module SAPWL_GET_SUMMARY_STATISTIC not working in CRM ABAP 6.0

    Hi All,
      When i execute the function module SAPWL_GET_SUMMARY_STATISTIC in CRM ABAP 6.0 passing the values below,
    PERIODTYPE                    
    HOSTID                         
    STARTDATE  
    it's not showing any values in the summary.
    it's showing the exporting parameters as,
    RFC_ERROR_TYPE                  L
    SUMMARY_AVAILABLE               N
    HITLISTS_N_PROFILES_AVAILABLE   A
    if this function module will not work means kindly provide me the solution for calculating
    Average Response Time as in tcode st03 - Instance - total - Workload Overview.
    Average CPU Time and some more fileds.
    Regards,
    Suresh

    Hi
    I used the FM mentioned and found the details as below:
    VKORG
    TABNAME                        TVKO
    FIELDNAME                      VKORG
    LANGU                          EN
    POSITION                       0001
    OFFSET                         000006
    DOMNAME                     VKORG
    ROLLNAME                    VKORG
    CHECKTABLE
    VTEXT
    TABNAME                        TVKOT
    FIELDNAME                      VTEXT
    LANGU                          EN
    POSITION                       0002
    OFFSET                         000014
    DOMNAME                        TEXT20
    ROLLNAME                       VTXTK
    CHECKTABLE
    LENG                           000020
    Shiva

  • Check Function Module is not working

    Hi All Expert,
    I'm new in workflow and  develop custom workflow for Transaction FB65 ( Vendor Credit Memo) and using business object FIPP , event CREATED.
    Actually  requirement is that when user  click on park button in FB65 then should  be trigger workflow only for particular vendor code .
    Now my workflow is working fine for all vendor code.
    For particular vendor code, I have created an new entries in  SWE2 and assigning a check function module to that
    Refer Link :         http://www.****************/Tutorials/Workflow/checkfunctionmodule/demo.htm
    and also same entries create in SWETYPV But Check Function Module is not working before workflow trigger.
    Appreciate your help and support.
    Regards
    Saurabh

    Hi
    : Check FM  : ZWF_DR_CR_MEMO 
    SourceCode :
    FUNCTION ZWF_DR_CR_MEMO.
    *"*"Local Interface:
    *"  IMPORTING
    *"     VALUE(OBJTYPE) LIKE  SWETYPECOU-OBJTYPE
    *"     VALUE(OBJKEY) LIKE  SWEINSTCOU-OBJKEY
    *"     VALUE(EVENT) LIKE  SWETYPECOU-EVENT
    *"     VALUE(RECTYPE) LIKE  SWETYPECOU-RECTYPE
    *"  EXPORTING
    *"     REFERENCE(RESULT) TYPE  C
    *"  TABLES
    *"      EVENT_CONTAINER STRUCTURE  SWCONT
    *"  EXCEPTIONS
    *"      NOT_TRIGGERED
    BREAK-POINT.
    TABLES : VBSEGK.
      DATA : LV_VEND TYPE VBSEG-LIFNR.
      CLEAR : LV_VEND.
      SELECT SINGLE  LIFNR FROM  VBSEGK INTO LV_VEND WHERE BELNR EQ OBJKEY.
        if sy-subrc eq 0
          IF LV_VEND = '0000120510'.
            RAISE NOT_TRIGGERED.
          ENDIF
      endif.
    ENDFUNCTION.

  • How do I set up a mail group on mac mail?  All the advise on line seems to refer to 'address book' and I only have 'contacts'.  The guidance does not work when using 'contacts' - can anyone help me?

    How do I set up a mail group on mac mail?  All the advise on line seems to refer to 'address book' and I only have 'contacts'.  The guidance does not work when using 'contacts' - can anyone help me?

    Create a group and send mail
    http://www.dummies.com/how-to/content/how-to-create-a-basic-contact-group-in-mac -os-x-li.html
    http://www.macworld.com/article/1165582/how_to_email_groups_with_mail.html
    Best.

  • Photoshop CC. Colour selection not working when using alt and brush.

    Hi, Photoshop CC. Windows 8.1 64 bit. Colour selection not working when using alt and brush. I have tried rebooting and other things like closing swatch panel etc.
    The alt key is otherwise OK.  It's not the recent upgrade from Win 8 to 8.1 (5 days ago) because the colour selection facility was working yesterday. Any ideas.

    I'd say things sound desperate enough to try resetting Preferences
    Reset Preferences
    Windows — Hold down Shift Ctrl Alt immediately after starting Photoshop
    Mac — Hold down Shift Cmd Opt immediately after starting Photoshop
    If that fails, we need to know your operating system?
    Do you have a full CC subscription, or by apps do you mean Photoshop, Bridge and Lightroom?
    Another other information that might pertain ?

  • Lenovo S8-50LC Wlan(WiFi) Does not work when use Sim Cart(3G)

    Hi
    Tablet Lenovo S8-50LC
    Wlan(WiFi) Does not work when use Sim Cart(3G).
    What is the solution for this problem?
    Build Number : TABS8-50LC_S000200_150121_ROW
    SoftWarw Version : TABS8-50LC_150121

    Right, but if you have the SIM in the tablet and you put the tablet in airplane mode, does wifi work then? If so, it may be a bad SIM. Do you have another SIM you can try?

  • Function module not working when used with 'In Background Task'

    hi,
    this is my code
    call function 'Z_IBD_FILL_ZINETACT'
                  in background task
                  destination  'SAPD220125'
                  tables
                      it_net1 = it_net1
                      it_net2 = it_net2
                      it_net3 = it_net3  .
    when this code is executed i am not getting any data in my internal tables i.e it_net1, it_net2, and it_net3
    but i changed this code see the below code
          call function 'Z_IBD_FILL_ZINETACT'
                 in background task (THIS IS COMMENTED)
                  destination  'SAPD220125'
                  tables
                      it_net1 = it_net1
                      it_net2 = it_net2
                      it_net3 = it_net3  .
    now i am getting data into my internal tables
    can any one tell me what can be the problem and how to solve it in my case
    its very urgent

    Hi,
    Pls. go through the  docu..
    CALL FUNCTION
    Variant 5
    CALL FUNCTION func IN BACKGROUND TASK.
    Additions:
    1. ... AS SEPARATE UNIT
    2. ... DESTINATION dest
    3. ... EXPORTING  p1 = f1    ... pn = fn
    4. ... TABLES     p1 = itab1 ... pn = itabn
    Effect
    Flags the function module func to be run asynchronously. It is not executed at once, but the data passed with EXPORTING or TABLES is placed in a database table and the next COMMIT WORK executes it in another work process.
    Note
    This variant applies only as of Release 3.0, so both the client system and the server system must be Release 3.0 or higher.
    Note
    qRFC with Outbound Queue
    This is an extension of tRFC. The tRFC is serialized using queues, ensuring that the sequence of LUWs required by the application is observed when the calls are sent.
    For further information about qRFC, refer to the Serialized RFC: qRFC With Outbound Queue section of the SAP Library.
    Addition 1
    ... AS SEPARATE UNIT
    Effect
    Executes the function module in a separate LUW under a new transaction ID.
    Addition 2
    ... DESTINATION dest
    Effect
    Executes the function module externally as a Remote Function Call (RFC); dest can be a literal or a variable.
    Depending on the specified destination, the function module is executed either in another R/3 System or as a C-implemented function module. Externally callable function modules must be flagged as such in the Function Builder (of the target system).
    Since each destination defines its own program context, further calls to the same or different function modules with the same destination can access the local memory (global data) of these function modules.
    Note
    Note that a database commit occurs at each Remote Function Call (RFC). Consequently, you may not use Remote Function Calls between pairs of statements that open and close a database cursor (such as SELECT ... ENDSELECT).
    Addition 3
    ... EXPORTING p1 = f1 ... pn = fn
    Effect
    EXPORTING passes values of fields and field strings from the calling program to the function module. In the function module, formal parameters are defined as import parameters. Default values must be assigned to all import parameters of the function module in the interface definition.
    Addition 4
    ... TABLES p1 = itab1 ... pn = itabn
    Effect
    TABLES passes references to internal tables. All table parameters of the function module must contain values.
    Notes
    If several function module calls with the same destination are specified before COMMIT WORK, these normally form an LUW in the target system. Calls with the addition 1 are an exception to this rule - they each have their own LUW.
    You cannot specify type 2 destinations (R/3 - R/2 connections).
    (See Technical details and Administration transaction.)
    Example
    REPORT  RS41503F.
    /* This program performs a transactional RFC.
    TABLES: SCUSTOM.
    SELECT-OPTIONS: CUSTID FOR SCUSTOM-ID DEFAULT 1 TO 2.
    PARAMETERS: DEST LIKE RFCDES-RFCDEST DEFAULT 'NONE',
                MODE DEFAULT 'N',
                TIME LIKE SY-UZEIT DEFAULT SY-UZEIT.
    DATA: CUSTITAB TYPE TABLE OF CUST415,
          TAMESS   TYPE TABLE OF T100,
          WA_CUSTITAB TYPE CUST415.
    SELECT ID NAME TELEPHONE INTO CORRESPONDING FIELDS OF TABLE CUSTITAB
                   FROM SCUSTOM WHERE ID IN CUSTID ORDER BY ID.
    PERFORM READ_CUSTITAB.
    EDITOR-CALL FOR CUSTITAB TITLE 'Editor for table CUSTITAB'.
    PERFORM READ_CUSTITAB.
    CALL FUNCTION 'TRAIN415_RFC_CALLTRANSACTION'
         IN BACKGROUND TASK
         DESTINATION DEST
         EXPORTING
              TAMODE    = MODE
         TABLES
              CUSTTAB   = CUSTITAB.
    CALL FUNCTION 'START_OF_BACKGROUNDTASK'
         EXPORTING
              STARTDATE = SY-DATUM
              STARTTIME = TIME
         EXCEPTIONS
              OTHERS    = 1.
    IF SY-SUBRC = 1.
      EXIT.
    ENDIF.
    COMMIT WORK.
    CALL TRANSACTION 'SM58'.
          FORM READ_CUSTITAB                                   *
    FORM READ_CUSTITAB.
      WRITE: / 'System ID:', SY-SYSID.
      SKIP.
      LOOP AT CUSTITAB into WA_CUSTITAB
        WRITE: / WA_CUSTITAB-ID, WA_CUSTITAB-NAME,
                 WA_CUSTITAB-TELEPHONE.
      ENDLOOP.
      ULINE.
    ENDFORM.
    Pls. reward if useful....

  • Function Key not work when using jre1.5

    My application was based on JDK1.3 to develop and JRE 1.3 is using in the client side.
    In the application, function keys are the shortcut and it is working fine based on the above setting.
    Since JRE 1.5 is encouraged to be used in the future, we try to use it to run our application. But we find that all function keys are not working.
    I am not sure the fact, but I get the following exception sometimes in the console:
    Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException
    at javax.swing.LayoutComparator.compare(LayoutComparator.java:61)
    at java.util.Arrays.mergeSort(Arrays.java:1307)
    at java.util.Arrays.mergeSort(Arrays.java:1296)
    at java.util.Arrays.mergeSort(Arrays.java:1296)
    at java.util.Arrays.mergeSort(Arrays.java:1295)
    at java.util.Arrays.sort(Arrays.java:1223)
    at java.util.Collections.sort(Collections.java:159)
    at javax.swing.SortingFocusTraversalPolicy.enumerateAndSortCycle(Sorting
    FocusTraversalPolicy.java:119)
    at javax.swing.SortingFocusTraversalPolicy.getFirstComponent(SortingFocu
    sTraversalPolicy.java:425)
    at javax.swing.LayoutFocusTraversalPolicy.getFirstComponent(LayoutFocusT
    raversalPolicy.java:148)
    at javax.swing.SortingFocusTraversalPolicy.getDefaultComponent(SortingFo
    cusTraversalPolicy.java:502)
    at javax.swing.LegacyGlueFocusTraversalPolicy.getDefaultComponent(Legacy
    GlueFocusTraversalPolicy.java:131)
    at java.awt.FocusTraversalPolicy.getInitialComponent(FocusTraversalPolic
    y.java:149)
    at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFoc
    usManager.java:318)
    at java.awt.Component.dispatchEventImpl(Component.java:3841)
    at java.awt.Container.dispatchEventImpl(Container.java:2024)
    at java.awt.Window.dispatchEventImpl(Window.java:1766)
    at java.awt.Component.dispatchEvent(Component.java:3803)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
    at java.awt.SequencedEvent.dispatch(SequencedEvent.java:93)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
    read.java:234)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
    ad.java:163)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    I try to compile my code using JDK 1.3 and 1.5. Actually, there is no compilation error.
    Please help me if you know the fact or solution.
    Thanks a lot!

    The supported Software in iPlanet's Portal Server is JDK/JRE 1.2.2_07 and JDK 1.2.2_09(in SP4). Starting with JDK1.3.1_01, applets are handled somewhat differently. Enable Java and look at the error messages in Java Console to find why the Netlet is not loading in JDK1.3.1_02. The issue might be with two JRE's or with your cache setting. Hope this helps you.
    Thanks,
    Raj_indts
    Developer Technical Support
    Sun Microsystems
    http://www.sun.com/developers/support

  • Function Module (ENQUEUE_ES_PROG) not working in Background

    I scheduled a job which runs every 15 mins in the the background to fetch data from an external system,depending on the data volume ,the program can sometimes run for over 15 minutes.To avoid data conflict I used a function module ENQUEUE_ES_PROG on the program to first check if the job started is still running before another job gets kicked.The problem I have is the fact that this function module does not seem to work in the background but in the looks perfect in foreground. Does anyone have a clue on how to use this FM for background job?

    Hello Mochabo,
    Consider the following scenario:
    Your job is running for more than 15 minutes. Since it is running in the background, it will be executed by a work-process of type BACKGROUND. If there's only one BACKGROUND work process configured for your application server, then the second job will have to be waiting till the first one finishes and releases the background work process.
    But when you are executing this in the foreground, the DIALOG work-process does the processing. So you are not finding any problem.
    So, to my knowledge, there will be a problem when there's only one BACKGROUND work process. Please go to transaction SM50 and see how many of them are configured for the current application server.
    Also, in case there's only one BACKGROUND work-process, you will not have toworry that the second job will start before the first has finished. It simply can't. It has got to wait.
    Hope this explanation helps.
    Regards,
    Anand Mandalika.

  • Function module is not working

    Hi Experts,
    There is one function module "RH_READ_INFTY_1001" is working fine with developement server but not working with Quality server.
    In development server the value of sy-subrc is 0. But in quality server it is not working.
    Error comes NO MSGTYPE " " FOUND.
    Thanks....

    Hi,
    I guess the message type is not getting populated.
    Use your own message
    Message 'Error' TYPE 'E'. "--> Message type must be in CAPS
    Regards

  • Module borders not displaying when using Aggregator

    I am using Captivate 4.  I created a TOC for both modules in a project. Then I created an Aggregator to connect them and display both TOCs.
    The issue I am havving is that the individual modules have borders on all 4 sides, yet they do not display when using the aggregator. How do I correct this?
    Thank you.

    Lenny,
    I apologize for not having an answer to your question, but I'm envious that you've successfully configured mod_jk. I've read several different versions of how to configure this, but nothing has worked so far. I wonder if you could either point me to some correct instructions on how to integrate Apache and Tomcat so I might try to duplicate your success.
    Thanks in advance,
    Vince

Maybe you are looking for