Background Processing, Selection Screens and Variants

Hi All,
I am having a little trouble Background Processing with Selection Screens and Variants.
When a user runs my report and selects the option of background processing, then they select a checkbox. Once this is checked, they should go and fill in details, press Execute and voila a background process is created. However what is happening is that when i execute it then it asks for a variant. I do not want this to happen. I want the values in the selection screens to be used as default. Here is my code for background processing
FORM START_BACKGROUND_PROCESSING.
  CALL FUNCTION 'BP_JOBVARIANT_SCHEDULE'
    EXPORTING
      TITLE_NAME            = 'End Customer Report '
      JOB_NAME              = 'customer_report'
      PROG_NAME             = 'ZSE_SD_SALES'
  EXCEPTIONS
    NO_SUCH_PROGRAM       = 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.
ENDFORM.                    "START_BACKGROUND_PROCESSING
After the background process is started, all teh data is collated then written to the app server. this is the order
  ELSEIF R2 EQ 'X' AND SY-BATCH EQ 'X'.
    PERFORM INITIALIZE_DATA.
    PERFORM SELECT_DATA.
    PERFORM PROCESS_DATA.
    PERFORM GET_END_CUSTOMER_DATA.
    PERFORM WRITE_TO_APP_SERVER.
Any ideas? Points given to those who are helpful

done myeslf

Similar Messages

  • To run a report in background in selection screen using a new button

    hi friends iam new member to this site
    nice to meet u all
    i want to run a report in background using the selection screen of the same report and i want to keep a button in application tool bar.
    after enter the values in the selection screen by clicking that button it should move to the screen which we get generally by menu option
    program-->execute in background
    and by entering the output device and start condition it should be scheduled in the background.
    with job_open,job_submit and job_close we need variants.
    for this i tried through bp_jobvariant_schedule and
    bp_jobvariant_overview but with this we can run with variants only
    but the user wants to enter the values in selection screen and need a button to run background
    ok friends i think u understood me
    please inform soon ok bye have a nice time

    Hi Jagadish
       There are two ways for you to handle the situation.
    1. Train the users to enter the values in selection screen and manually go for backgroung scheduling.
    2. Use At user command and within that basing on the option selection selected, use FM:JOB_OPEN with sy-repid get the job number, submit the program with the values on the selection screen and lastly executing FM: JOB_CLOSE with the job number from JOB_OPEN and SY-REPID.
    Note that you have to set 'X' for export parameter something like startimmed while calling FM: JOB_CLOSE for immediate execution. Am not on SAP to give you the exact parameter.
      Hope the above info helps you.
    Kind Regards
    Eswar

  • What is a Selection Screen and how to make it ?

    What is a Selection Screen and how to make it ? Please explain the process.
    Best regards,
    Ryan

    Selection Screen are used for the program reports. These allows you to input some values that are required to show the desired output.
    for example : you want to show the list of sales orders between 1000 to 1999, you would write a select query as this (to make u understand better)
    select vbeln from vbak into it_vbeln
                 where vbeln GE 1000 " greater than or equal to
                   and vbeln LE 1999. " less than or equal to
    now if you wnat to do it dynamically, you need a selection screen
    tables : vbak. " declaration
    selection-screen : begin of block block1 with frame title text-003.
    select-options : so_vbeln for vbak-vbeln. " selection range from __ to __
    selection-screen : end of block block1.
    now you can write the same select query as
    select vbeln from vbak into it_vbeln
                 where vbeln in so_vbeln.
    Hope this is clear now
    Regards
    Gopi

  • How to hide input fields on selection screen using variant attribute

    Hello all,
    I want to know how to hide input fields on selection screen using variant attribute conpletely.
    As you know, when setting the attribute of variant "Hide field" checked, the field is temporarily hidden, but when clicking "All Selections(F7)" button on the selection screen, the fileds become appeared.
    I want to hide the field completely. Di you know how to do ?
    Thank you for your support.
    Regards,
    Hideki Kozai

    Use this attribute hide field and save the variant. Then create transaction for this program setting default variant for parameter Start with variant . The user who runs it will have it by defualt set.
    Otherwise
    in PBO simply use LOOP at screen and output = 0 for this field. This will ensure that field is invisible in any case.
    Regards
    Marcin

  • Selection screen and smartforms

    Hi,
    Can somebody share with me simple eg to
    enter data via the selection screens and then pass those values to smartform.
    i have used the following code.But whenever i execute it the smartform opens first. i want to open the selection screen first.Then after entering the data there ,the smartorm must open up with the entered values.
    PARAMETER P_PARAM1 TYPE MYTABLE-COL1.
    PARAMETER P_PARAM2 TYPE MYTABLE-COL2.
    AT SELECTION-SCREEN OUTPUT.
    CALL FUNCTION '........................................'
      EXPORTING
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
      CONTROL_PARAMETERS         =
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
      OUTPUT_OPTIONS             =
      USER_SETTINGS              = 'X'
       PARAM1                    =  P_PARAM1
       PARAM2                     = P_PARAM2
    IMPORTING
      DOCUMENT_OUTPUT_INFO       =
      JOB_OUTPUT_INFO            =
      JOB_OUTPUT_OPTIONS         =
    EXCEPTIONS
      FORMATTING_ERROR           = 1
      INTERNAL_ERROR             = 2
      SEND_ERROR                 = 3
      USER_CANCELED              = 4
      OTHERS                     = 5
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Thanks & Regards
    Jay

    Hi,
    As asked I am sending this piece of a code so that you can get a clear idea for the same.If you face the difficulty again please let me know.
    selection-screen begin of block b1 with frame title text-001.
    parameters :
       p_carrid type spfli-carrid.          " Carrier Id.
    selection-screen end of block b1.
    Working variable
    data:
      f_name      type rs38l_fnam.         " function module name
    start-of-selection.
    perform open_smartforms.
    form open_smartforms .
      call function 'SSF_FUNCTION_MODULE_NAME'
        exporting
          formname                 = '<formname>''
      VARIANT                  = ' '
      DIRECT_CALL              = ' '
       importing
         fm_name                         = f_name
       exceptions
         no_form                          = 1
         no_function_module       = 2
         others                            = 3
      if sy-subrc <> 0.
        message id sy-msgid type 'S' number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.                               " IF sy-subrc ne 0
      call function f_name
        exporting
      ARCHIVE_INDEX                  =
      ARCHIVE_INDEX_TAB         =
      ARCHIVE_PARAMETERS    =
      CONTROL_PARAMETERS   =
      MAIL_APPL_OBJ                =
      MAIL_RECIPIENT                 =
      MAIL_SENDER                    =
      OUTPUT_OPTIONS             =
      USER_SETTINGS               = 'X'
        p_carr                                = p_carrid
    exceptions
       formatting_error         = 1
       internal_error             = 2
       send_error                 = 3
       user_canceled           = 4
       others                         = 5
      if sy-subrc ne 0.
        message id sy-msgid type 'S' number sy-msgno
        with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.                               " IF sy-subrc ne 0
    endform.                               " OPEN_SMARTFORMS
    Regards,
    Suvajit.

  • Selection screen and DP

    Hi friends
              Can any one tell me which event triggers first and the order of event triggering when both selection screen and dialog program is used..Also tell me which event  wont fire.
    Regards
    Suresh.A

    Here is the Sequence.
    1. First Load-of-Program event is triggred by default when you execute any report.
    2. Inisilization.
    3. At-selection Screen output.
    4. At selection Screen.
    5. Start-of-selection.
    6. end-of-selection.
    if you are calling screen in your report you will be doing so in Start-of-selection
    then after start-of-selection.
                  Process before output
                  Process after input
                 (if you add POH, and POV, these event will trigger when you press F1 or F4)
                  End-of-selection.
    Thanks & regards

  • Difference between At selection-screen  and At selection-screen field

    I need to know the difference between
    Difference between At selection-screen  and At selection-screen field
    Regards
    Shashi

    Hi,
    AT SELECTION-SCREEN is the event triggered in the PAI of the selection screen.
    AT SELECTION-SCREEN on field field_name is the event specific to the field and is triggered when u press enter in that field.
    AT SELECTION-SCREEN selscreen_event.
    Effect
    This statement defines event blocks for different events selscreen_event that are triggered by the ABAP runtime environment during selection screen processing.
    Selection screen events occur immediately before sending a selection screen and after certain user actions on a displayed selection screen. They assist in selection screen processing in the ABAP program.
    AT SELECTION-SCREEN is triggered at least twice during actions on selection screens that are linked into another selection screen as a subscreen - first for the linked selection screen itself, and then for the linking selection screens.
    SELECTION-SCREEN FIELD SELECTION
    FOR {NODE|TABLE} node [ID id].
    Effect
    This statement defines a node node in the structure of the logical database for field selection. If a node belongs to type T, you can use the TABLE addition instead of NODE. The statement cannot be used for type C nodes. .
    If a node is defined for field selection, you can use an executable program linked to the logical database in the GET statement to control which fields in the node are to be read by the logical database. If you use the function module LDB_PROCESS, the FIELD_SELECTION parameter must be specified accordingly.
    for more details check this link...
    http://help.sap.com/saphelp_46c/helpdata/en/9f/db9a2e35c111d1829f0000e829fbfe/frameset.htm
    Regards,
    Priyanka.

  • Need to have pop up window in selection screen and capture the user action.

    Hello Friends,
                         I have a requirement, that need to show a pop up window after execution, and to get the action from user using a Push button.
    I create a selection screen and a sub screen as window.
    After user execute from the selection screen, I am popping up this window.
    Window contains some input values to be entered and push button to identify the user action.
    I try to capture the user action using sy-ucomm, but it does not hold any value when user press the button.
    How to overcome this issue.
    Here is the definition of the window.
    Pop Up Window for getting values
    SELECTION-SCREEN BEGIN OF SCREEN 500 AS WINDOW TITLE title .
    PARAMETER : p_vdate LIKE t9aa01-validfrom,
                p_dcggt LIKE t9aa01-hkont,
                p_dcgst1 LIKE t9aa01-hkont,
                p_dcgst2 LIKE t9aa01-hkont,
                p_na LIKE t9aa01-hkont.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN POSITION 20.
    SELECTION-SCREEN PUSHBUTTON 2(10) text-001 USER-COMMAND SVE.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF SCREEN 500.
    Cheers,
    Senthil
    Edited by: Senthil on Jan 7, 2008 11:03 AM

    Hi,
    Try using the below code.
           data : w_var type string.
           CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'
             EXPORTING
              DEFAULTOPTION        = 'Y'
               textline1            = 'test '
             TEXTLINE2            = ' '
               titel                = 'check'
             START_COLUMN         = 25
             START_ROW            = 6
             CANCEL_DISPLAY       = 'X'
            IMPORTING
              ANSWER               = w_var.
                     if w_var = 'J'.
                     else.
                     endif.
    Comments : J indicates Yes and N indicates No
    Regards,
    Jeswanth

  • Restrict 'Executing report in background' from selection screen

    I want user to not to select option for executing report in background from Selection Screen of the program.
    i.e. 'Execute Program in Background' option in 1st menu bar tab should either be disabled OR if user clicks on it then he should get error message on selection screen itself.
    Thanks,
    Falguni

    Hi Falguni,
    Write the code based on function code SJOB in the event AT SELECTION-SCREEN. Write the following code :
    AT SELECTION-SCREEN
    CASE SY-UCOMM.
    WHEN 'SJOB'.
    MESSAGE E000 WITH 'You cannot schedule background job'.
    ENDCASE.
    Thanks & Regards,
    Faheem.

  • Selection-screen and GET

    Hi all,
    in my program i use PNP logical database, so system create automatically selection screen. Nice.
    When user fill selection screen event start-of-selection is launched and i do GET PERNR for read data from PNP.
    But my customer want to add field in selection screen. Ok, i did that. Well, now he want that when a user fills new fields the PNP is not read i.e GET PERNR shouldn't be launched, so i my program i write this :
    if myfield is initial.
    GET PERNR.
    else.
    PERFORM get_data.
    endif.
    But when i compile program i can't do that and i don't know how to make this and if it's possible.
    Regards,

    Hi tafkap,
    1. u have created a z report and
       u are using PNP logical database.
    2.  u say,
    , now he want that when a user fills new fields the PNP is not read i.e GET PERNR shouldn't be launched
    suppose this is achieved, then how
    are u going to fetch the data
    and show the report ?
    3. If u already have the logic for
       getting information from database and showing
       to the user,
       then do  not use GET event.
      (It is not compulsory in a ldb)
    4. Instead use START-OF-SELECTION
       event
       and do the normal programming.
    5. In such case,
       the selection screen (and ur extra field(s))
       will be displayed as usual
       and your own code will get triggered
       at start-of-selection.
    I hope it helps.
    regards,
    amit m.

  • SUBMIT Zxx VIA SELECTION-SCREEN AND RETURN

    SUBMIT Zxx VIA SELECTION-SCREEN AND RETURN
    and it's dont make f8 why

    wa_rspar-selname = 'P_DEALNO'.
    wa_rspar-kind = 'S'.
    wa_rspar-sign = 'I'.
    wa_rspar-option = 'EQ'.
    wa_rspar-low  = T_FORDER-DEAL_No.
       APPEND wa_rspar TO rspar.
    Submit ZSDR_SALESORDER_DISPLAY
         using Selection-screen '1000'
               WITH SELECTION-TABLE rspar.
    orelse
    *submit RSEIDOC2 with docnum-low = docnum with
                       credat-low = credat
                               and return.

  • SUBMIT via selection screen and return gives dump

    Hi Guys,
    When i have used SUBMIT via SELECTION SCREEN and RETURN, it gave me the selection screen and subsequent report is executed properly without an error and when i pressed back button, it went to selection screen without any issues but the problem is when i press back from the selection screen it gives me a dump. Could you guys think of what would be the probelm.
    Thanks in Advance.
    Santosh.

    Hi Santhosh,
    What is the dump u r getting? I tried like this and is working file.
    Report1
    REPORT  Z75694TEST1.
    PARAMETERS po_1 TYPE c.
    WRITE po_1.
    SUBMIT Z75694_TEST VIA SELECTION-SCREEN AND RETURN.
    Report2
    REPORT Z75694_TEST .
    PARAMETERS: po_2 TYPE c.
    WRITE po_2.
    Thanks,
    Vinod.

  • TO display pop_up on selection screen And chosse that field in 'SELECT' sta

    Hello,
    I want a pop up on selection screen when user clicks the push button on selection screen pop up should come on selection screen and display the all field of YTLEA table. when user checks few or all field from pop up then data for that field is selected from the YTLEA table.

    DDIF_TABL_GET

  • Using Selection screen and selection screen output

    Hi All,
    I am trying to execute AT SELECTION-SCREEN and AT SELECTION-SCREEN output. Both the para's working fine seperately. But when I execute them together AT SELECTION-SCREEN output is not working. Please let me know how to solve this problem. Please see below for the code.
    PARAMETERS:  p_werks LIKE marc-werks OBLIGATORY MEMORY ID WRK,
                 p_lgort LIKE mard-lgort OBLIGATORY,
                 p_rlgort LIKE mard-lgort OBLIGATORY.
        PARAMETERS: p_boml TYPE c RADIOBUTTON GROUP mode user-command flag.
            SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
                PARAMETERS: p_aufnr LIKE aufk-aufnr MODIF ID cp2.
            SELECTION-SCREEN: END OF BLOCK b1.
    *SELECTION-SCREEN COMMENT 1(44) text-004 FOR FIELD p_cmpl.
        PARAMETERS: p_cmpl TYPE c RADIOBUTTON GROUP mode.
           SELECTION-SCREEN: BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
                PARAMETERS: p_matnr type marc-matnr MODIF ID cp1,
                            p_verid type afpo-verid MODIF ID cp1,
                            p_labst type mard-labst MODIF ID cp1.
           SELECTION-SCREEN: END OF BLOCK b2.
       PARAMETERS: p_mstr TYPE c RADIOBUTTON GROUP mode.
    AT SELECTION-SCREEN output.
      LOOP AT SCREEN.
        IF p_boml <> 'X' AND
           screen-group1 = 'CP1'.
           screen-active = '1'.
           MODIFY SCREEN.
        ENDIF.
        IF p_cmpl <> 'X' AND
           screen-group1 = 'CP2'.
           screen-active = '1'.
           MODIFY SCREEN.
        ENDIF.
        MODIFY SCREEN.
      ENDLOOP.
    AT SELECTION-SCREEN.
      IF p_boml EQ 'X'.
        IF p_AUFNR EQ space.
            MESSAGE e000(z1) WITH 'Please fill Production Order.'.
        ENDIF.
      endif.
      IF p_cmpl EQ 'X'.
        IF p_MATNR EQ space  OR p_verid EQ space OR p_labst EQ space.
            MESSAGE e000(z1) WITH text-003 'Production Version & Quantity. '.
        ENDIF.
      endif.
    Thanks,
    Senthil

    Hi Senthil,
    As far as my knowledge is concerned AT Selection-Screen output and AT Selection-Screen wont work together.In this code you are trying to do the validation in AT Selection-Screen. Instead of that try doin your validations in Start-of-selection Event.
    i,e., modify your code as follows:
    PARAMETERS: p_werks LIKE marc-werks OBLIGATORY MEMORY ID WRK,
    p_lgort LIKE mard-lgort OBLIGATORY,
    p_rlgort LIKE mard-lgort OBLIGATORY.
    PARAMETERS: p_boml TYPE c RADIOBUTTON GROUP mode user-command flag.
    SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS: p_aufnr LIKE aufk-aufnr MODIF ID cp2.
    SELECTION-SCREEN: END OF BLOCK b1.
    *SELECTION-SCREEN COMMENT 1(44) text-004 FOR FIELD p_cmpl.
    PARAMETERS: p_cmpl TYPE c RADIOBUTTON GROUP mode.
    SELECTION-SCREEN: BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
    PARAMETERS: p_matnr type marc-matnr MODIF ID cp1,
    p_verid type afpo-verid MODIF ID cp1,
    p_labst type mard-labst MODIF ID cp1.
    SELECTION-SCREEN: END OF BLOCK b2.
    PARAMETERS: p_mstr TYPE c RADIOBUTTON GROUP mode.
    AT SELECTION-SCREEN output.
    LOOP AT SCREEN.
    IF p_boml <> 'X' AND
    screen-group1 = 'CP1'.
    screen-active = '1'.
    MODIFY SCREEN.
    ENDIF.
    IF p_cmpl <> 'X' AND
    screen-group1 = 'CP2'.
    screen-active = '1'.
    MODIFY SCREEN.
    ENDIF.
    MODIFY SCREEN.
    ENDLOOP.
    START-OF-Selection.
    Perform validation.
    form validation.
    IF p_boml EQ 'X'.
    IF p_AUFNR EQ space.
    MESSAGE e000(z1) WITH 'Please fill Production Order.'.
    ENDIF.
    endif.
    IF p_cmpl EQ 'X'.
    IF p_MATNR EQ space OR p_verid EQ space OR p_labst EQ space.
    MESSAGE e000(z1) WITH text-003 'Production Version & Quantity. '.
    ENDIF.
    endif.
    endform.
    Kindly reward if useful.
    Thanks,
    pavithra

  • Selection Screen and Selection Button

    Hi,
    I have put in a screen this
    SELECTION-SCREEN PUSHBUTTON /01(20) p_0031 USER-COMMAND _0031.
    But It never enters 'at user-command' event !
    What should i do ?

    Hi Stephan
    If you specify the USER-COMMAND addition, the pushbutton must be assigned a function code fcode. The function code fcode must be specified directly and can only contain a maximum of 20 characters.
    Before you can work with the pushbutton, you must specify a TABLES statement to declare an interface work area for the structure SSCRFIELDS from the ABAP Dictionary.
    If the user selects the pushbutton on the selection screen, the runtime environment triggers the event AT SELECTION-SCREEN and the function code fcode is transferred to the ucomm component in the interface work area sscrfields.
    Regards
    Santosh

Maybe you are looking for

  • Firefox 3.6.9 doesn't open but is running in task manager

    I received Animalware via µTorrent and was very busy cleaning up. I changed from AVG (because it let it slip by) to Avira Anti-Vir, ran MalwareBytes Anti-Malware, among other threat removers. In the beginning, none of the current browsers, as well as

  • How to create a Blur overlay on to mask parts of an FLV import

    I am a Flash Novice, using Adobe Flash CS3 Pro. I have a number of training recordings (system demonstrations) that I've created using Camtasia, and are output in FLV format (the requested output format). The training recordings contain some live dat

  • How to transport the report object from development clint to quality clint

    any body knows different ways of transferring  report object  from  development clint to quality clint.pse send ...

  • GL accounts for Tax codes

    Hi, I was serching for report which has missing GL accounts for the Tax codes. T.code OB40 Is there any report/table where we can find out this. ? Your sugeesions would be really helpful for me. Thanks, Manasi

  • What is command to format variables in script layout?

    Hi all, Can anybody let me know, What is the command we use to format the varialbles in script layouts? like if i want to delete leading or trailing spaces(condence) from a variable in the layout, there are some command like (c) for condence But, i d