Skip to Content
avatar image
Former Member

sy-batch value when debuggin a background process

Hello All,

I have a quick question. I am working with a background job and I have a doubt about the sy-batch value. I know it set to 1 when the process in run in background but if I turn the debuggin on [ via the infinite loop ] then will the sy-batch value change to SPACE ?

In debugging I see its changed to space but I am wondering is it cause I am debuggin in background or is it because Its an update task ?

can you please advise ?

thanks,

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Sep 29, 2008 at 09:16 AM

    The SY-BATCH should come as "X" when you debug a background job via infinite loop. Have you called any code update task? If yes then it will be processed via dialog processing so here SY-BATCH will be initial.

    I just set this program in background and found that the SY-BATCH as "X" and it goes to infinite loop.

    REPORT ztest1.
    
    DATA: l_flag TYPE c LENGTH 1.
    DO.
      IF l_flag = sy-batch.
        EXIT.
      ENDIF.
    ENDDO.
    
    
    DATA: l_string TYPE string,
          l_final TYPE string.
    
    l_string =  'UPS Surface Collect #954365'.
    
    DATA: l_dummy1 TYPE string,
          l_dummy2 TYPE string.
    
    
    SPLIT l_string AT ' #' INTO l_dummy1 l_dummy2.
    
    CONCATENATE l_dummy1 l_dummy2 INTO l_final.
    
    WRITE:/1 l_final.
    
    

    Edited by: Sourav Bhaduri on Sep 29, 2008 2:47 PM

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 29, 2008 at 09:00 AM

    Hi Reena Sharma,

    May i know how you can debug a background execution?

    Whether it's get into DEBUGGER screen?

    No, Youcan't debug.

    Regards,

    R.Nagarajan.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 29, 2008 at 08:59 AM

    Hi,

    It's a system field not program specific so if you are debugging in the foreground then it will be set to space.

    Darren

    Add comment
    10|10000 characters needed characters exceeded