Reading hierarchies when running in background.

Currently we have an abap that captures the hierarchy information via the function K_HIERARCHY_TABLES_READ.  We then use the results to collect additional data.  The report works in the foreground but gets different results when running in the background.  We traced the issue back to the function read.  We checked with SAP and SAP's response is that the function K_HIERARCHY_TABLES_READ cannot be used in the background.  Does anyone run any reports in the background which reads hierarchies?  If so, how do you do it?
thanks,
Larry

Paul,
Starting new task will start a new LUW in dialog process and not in background. This is the reason you are having a problem. While technically STARTING NEW TASK is used for parallel processing, you need to consider whether the program will be run in foreground or background mode.
In case of background, you need consider using multiple jobs via job open, submit, job close. This way you can initiate more than one process in your server group to do the work.
You will need to consider the # of background WP available and the # of WPs you can use for this program.
So if there are 100 WPs available and you can use only 10 at any give time, then you should schedule 10 jobs and then check the status of the 10 jobs before you can start scheduling the next jobs.
You can use the FM SPBT_INITIALIZE to check the # of WPs that are currently available in the server group.
Hope this helps.
Thanks,
Vikram.M

Similar Messages

  • Report program when run in background job getting cancelled immediately

    Hi
    When i run a program in foreground i am able to see the output. But when run in background not able to run the job successfully. The job is getting cancelled immediately.
    I am using the below function module for output display. Should i need to pass any parameters in the below function module so that i can run the program in background  successfully.
      CALL METHOD DETAIL_GRID->SET_TABLE_FOR_FIRST_DISPLAY     
          EXPORTING                                            
            IS_LAYOUT         = IS_LAYOUT                    
            I_SAVE            = 'A'                        
            IS_VARIANT        = GS_VARIANT                   
          CHANGING                                           
            IT_FIELDCATALOG   = IT_FIELDCATALOG               
            IT_OUTTAB         = BLOCKED_STOCK_TAB_ALV[].     
    Please suggest.
    Thanks and regards
    Rajani Yeluri

    Hi Rajani.
      ALV require the DRYPOR(screen) for display but incase you run in back ground which have to write to spool but in spool we can only write in format of LIST REPORT not inter-active report like ALV. That why
    system cancelled your process immediately.
    Hope it helps.
    Sayan.

  • RMMR1MRS-When run in background cause update failure errors looking

    hi,
          RMMR1MRS report when run in background cause update failure errors .
    There are few  below reason for the error log.
    1.  for the PO invoice already generated -  (its right if already invoice generated. should not happen again)
    2.  In  MIGO,  entire  quantity has been reversed  and also invoice generated with zero value - ( its right , should not happen invoice again )
    3. Particular PO line item deleted -  (its right if the PO line item deleted. ERS settlement not require)
    For the all above reason, the update error occurs.  But the mean time  the program  "RMMR1MRS"  should not through the update error log. 
    Note: The job was not terminated due to this update error and also no harm because of the error log
    can you please help on this update failure why it occurs.

    Have you found a solution already? If so, please, share it with the community and close this thread.

  • The number of rows per page is greyed out when running in background?

    Hi,
    For a customized transaction the number of rows per page cannot be set when running in background.
    While a background job is created in SM36 after entering the report name and the selection variant name in the properties of Format the rows and columns field is greyed out.It was not editable.
    Is there any settings to be done or in the custom program any code change needs to be done?
    Thanks in advance.
    Regards,
    Sharon.

    Hi Gabriel,
    After double clicking the format only the rows field is not set to edit.It was greyed out.Is it anything related to the printer settings that will be maintained for a user?
    Regards,
    Sharon.

  • Error in BIM when running in background mode

    Hi,
    I am facing an error when running a BIM in sm35.
    The BIM runs fine with my userid in all three modes( foreground,display error mode, background mode)....but fails when the functional person is testing in background mode. The BIM runs fine in all other modes.
    It gives the message when running in background mode
    "No batch input data for screen SAPLMGMW 4008"
    What should I check or do to correct it.
    Please help.
    Regards
    Rashi

    The BIM runs fine in Foreground mode and in Display error mode even for the functional..It is giving error only for Background mode.
    I also did the following
    1.   Created the BIM in my id and tried running( in background) it using the other id ...it was successful
    2.   Created the BIM in other id and ran ( in background) using my id....it failed.
    I will check again for authorisations also.
    Regards,
    Rashi

  • GUI_GET_DESKTOP_INFO is not worked when run in background

    Dear all,
    I want to retrieve the computer name using this function module. It is working fine in foreground but it returns no result when I run in background. Is there any other method to get the computer name in background? Thanks in advance.

    Problem solved using the following method:
      DATA: BEGIN OF usr_tabl OCCURS 10.
              INCLUDE STRUCTURE uinfo.
      DATA: END OF usr_tabl.
      DATA  th_opcode(1)                    TYPE x.
      data: size type i.
      CONSTANTS: opcode_list LIKE th_opcode VALUE 2.
      CALL 'ThUsrInfo' ID 'OPCODE' FIELD opcode_list
        ID 'TAB' FIELD usr_tabl-sys.
      describe table usr_tabl lines size.
      read table usr_tabl index size.
      write usr_tabl-term.
    while usr_tabl-term is the computer name. It works in background as well.
    Edited by: Chiew Ngee Ho on Mar 12, 2009 9:36 AM

  • System is showing time out when run in background

    Dear all,
    We have two systems: One R/3 and EBP. We have made one report where the remote function module will be called from R/3 to EBP. There are 4 lakhs data in SAP. We are sending 10000 data as package in internal table and getting the corresponding output. But the system is showing time out when the report has run in background. Can you please suggest how the process can be improved so that the timeout can be avoided.
    Thanks and regards,
    Atanu

    Hi,
    Try to fetch records in smaller chunks and process them.  For example, if you are trying to fetch records for one year, instead of single query, try to fetch in 12 sets for each month.  Fetch first month and process the records and put them in the output internal table.  Then go for next month and so on.  Anyway your program is running in background.  There will not be any user complaint also.  The solution might sound bit funny.  But it works.
    Regards,
    Hema

  • Amount field getting rounded up when run in background

    Hello All,
      when i run a report in foreground the amount value(KBETR) is displaying properly with the value 12.78.But when the same report is run in background it is displaying 13.what should be done?
    Thanks,
    Rakesh.

    Hi,
    Try to fetch records in smaller chunks and process them.  For example, if you are trying to fetch records for one year, instead of single query, try to fetch in 12 sets for each month.  Fetch first month and process the records and put them in the output internal table.  Then go for next month and so on.  Anyway your program is running in background.  There will not be any user complaint also.  The solution might sound bit funny.  But it works.
    Regards,
    Hema

  • Error when running in background

    Hi,
      When i run the pgm in foreground its working fine but if i run in background the job is getting cancelled with the error message "Code page couldnt be determined".I checked in background the value in the o/p is coming but the job is getting cancelled.What is the reason for it?

    Hi,
    In your program are you using any cl_gui_frontend_services methods. That means
    any cl_gui_frontend_services=>gui_download
    cl_gui_frontend_services=>gui_upload
    If you are using frontend services background job. The job will not work
    Hope it will helps

  • List Format Different When Run In Background...

    Hi Guys,
    When I run a report in the Foreground my List displays normally.  It is worth knowing that this list has 36 Columns (36 added to the Field Catalog).
    But, when I run it in the background (F9), it seems to "wrap"/"split" the columns...  The last few colums are sent to the next line so my field catalog is actually displayed over 2 lines!!!
    When running the Report in the background (F9) I did choose the "Properties" button and I set the Rows to be 65 and the Colums to be 255 under the "Format" Parameter.  This does not change anything...
    We recently upgraded to ERP6.0. I wonder if it is some kind of SAP Standard that changed???
    Please advise - Point will be rewarded for usefull awnsers.
    Christiaan

    Tks, But it is still not working.
    I think it is SAP Standard not to go over the 255 limit when run in the background.  My list DEFINATELY has more than the 255 limit...
    Here is my statement:
    REPORT /bsa/rp_purchaseorder_analysis MESSAGE-ID /bsa/mm LINE-SIZE 400.
    This does not work.  When I use F9, it gives a message : "Formatting is set to X_65_255".  I run this WITHOUT overriding and it does not work.  I also ran this overriding the settings...  I made the columns 400 and it did not work.
    I dont think it is possible????
    tks
    Christiaan

  • Parallel Processing when running in background

    Hi
    We have implemented a parallel processing solution using the Call Function Starting New Task Destination in Group format to split a large number of updates across an RFC Server Group.
    This works well when running the ABAP in dialog, but when we schedule for background processing, the parallel processing does not seem to occur, we get a single background process.
    Does anyone have any ideas why this may be occuring ?
    Thanks
    Paul

    Paul,
    Starting new task will start a new LUW in dialog process and not in background. This is the reason you are having a problem. While technically STARTING NEW TASK is used for parallel processing, you need to consider whether the program will be run in foreground or background mode.
    In case of background, you need consider using multiple jobs via job open, submit, job close. This way you can initiate more than one process in your server group to do the work.
    You will need to consider the # of background WP available and the # of WPs you can use for this program.
    So if there are 100 WPs available and you can use only 10 at any give time, then you should schedule 10 jobs and then check the status of the 10 jobs before you can start scheduling the next jobs.
    You can use the FM SPBT_INITIALIZE to check the # of WPs that are currently available in the server group.
    Hope this helps.
    Thanks,
    Vikram.M

  • FM "TH_POPUP" Does not show popup in 4.7 server when run in background.

    Hi Experts,
        I am Using the Function Module TH_POPUP in my report to notify user when a background job is compleated. when I run my report in background the job gets canceled when the Function module is called only in our SAP 4.7 server.
    The report works without trouble in  our SAP 4.6c & ECC servers
    Can anybody give a solution?
    or
    provide another function module similar to TH_POPUP..
    Thanks in Advance...
    Anand C
    Edited by: Anand Cyril on Oct 5, 2009 8:35 PM

    Why do you want the pop-up to appear?  How exactly does it appear when you run it in the background?  I would have thought that it wouldn't as there's no GUI for it to pop-up on.
    Try adding this code to your program
    IF SY-BATCH NE 'X'. "program running in foreground
    *...show pop-up
    ENDIF.

  • Error in ALV display when run in background

    Hi All,
    My program gives ALV Block Display . I am getting an extra ALV block displayed before display of each of my ALV block . However , while in normal execution (F8) , the program is running fine.
    Can I debug a background job ? Please help.

    Hi,
    My program runs for few seconds (2-4) . when I switch from program to SM37 tcode , program execution is already complete . Is there any other way of debugging ?

  • Will SUBMIT report EXPORTING LIST TO MEMORY work, when Run in Background?

    You can use SUBMIT <report> EXPORTING LIST TO MEMORY, and then Call the FM LIST_FROM_MEMORY to get the Data.
    This works fine, when the Program is Run in Foreground. My question is, will it work when I Run the Program in Background? i.e. When I Run the Program in Background, will the SUBMIT Statement, Export the List to Memory? Because only then the FM LIST_FROM_MEMORY will get the Data.
    Any alternate solution to meet the same requirement will be appreciated.

    It works for me... my spool output looked like:
    11.01.2008          JC: Calling program - test list to memory                  1                                                                               
    ZLOCAL_JC_SDN_CALLING_PROGRAM                started at 12:54:29                        
    ZLOCAL_JC_SDN_CALLING_PROGRAM                call complete 12:54:30                     
    ZLOCAL_JC_SDN_CALLING_PROGRAM                started at 12:54:30                                                                               
    11.01.2008           JC: Called program - testing list to memory                                                                               
    ZLOCAL_JC_SDN_CALLED_PROGRAM                 was called at: 12:54:29                    
    for the following code:
    report zlocal_jc_sdn_calling_program.
    parameters:
      p_start(1)            type c.
    start-of-selection.
      perform testcase.
    *&      Form  testcase
    form testcase.
      data:
       lt_list              type table of abaplist.
      write: / sy-repid, 'started at', sy-uzeit.
      submit zlocal_jc_sdn_called_program
        exporting list to memory
        and return.
      write: / sy-repid, 'call complete', sy-uzeit.
      call function 'LIST_FROM_MEMORY'
        tables
          listobject = lt_list.
      write: / sy-repid, 'started at', sy-uzeit.
      call function 'WRITE_LIST'
        tables
          listobject = lt_list.
    endform.                    "testcase
    and
    report zlocal_jc_sdn_called_program.
    start-of-selection.
      write: / sy-repid, 'was called at:', sy-uzeit.

  • Dump when run in background

    Hi All,
    I have a z-report which displays a ALV report. when I run this in background it gets canceled. when i see the log , it has dump and dump is as shown below.
    A RAISE statement in the program "CL_GUI_CONTROL================CP" raised the exception condition "CNTL_ERROR".
    Since the exception was not intercepted by a superior
    program, processing was terminated.
    What could be the problem, suggest me a solution if i have to add some code into my program or is it an application error which can be solved by SAP Notes.
    Regards
    Divakar Goud,

    Are you using GUI_UPLOAD or GUI_DOWNLOAD in the report then they will not work there.
    Use OPEN DATASET instead to read or write.
    Also, check weather there is a Container for OO ALV on the Report then use Docking Containe when SY_BATCH = 'X'.
    If its an normal ALV then Change the GRID to LIST layout for Backgroud. Its not that we cannot display grid in background we can do that but we require some layout handling there.
    ALV Grid in background job?
    Regards,
    Amit
    Reward all helpful replies.

Maybe you are looking for

  • Mac Book Pro - Mac Mini; sharing stopped working after IP/Net change

    I apologize in advance for the length of this, I've got a complex issue that I've been unable to diagnose with the usual published notes... I have a Mac Book Pro and Mac Mini. I previously had sharing and screen sharing working between both systems.

  • Executing the report in the background

    Hi Frnds, I want to execute a report in background.After executing the report I want to receive a mail. I think this is possible through reporting agent. so i need the steps for this how to do...pls do the need ful..waiting for reply.. Thanks and Reg

  • Reader 9 plug-in woes

    Howdy, folks, and happy spring! I produced a PDF with embedded sound files (small MP3s) and have tested it in various versions of Reader (6, 7, 8, 9) for Mac OS X. Earlier versions of Reader work just fine, but Reader 9 won't play the sounds. I've no

  • How can I keep iphoto 08 from freezing?

    Every time I open iPhoto 09, I get the rainbow wheel of death and "Application Not Responding." I can't access any of the photos in iPhoto. Are they accessible without opening the program? If so, where?

  • How to access unamed components

    If I had a frame with 100 text fields which was added to the frame using the following loop. How can I access and identify individual textfields for (int i=0;i<100;i++)    someframe.add(new JTextField()); }Any help is appreciated