JOB_SUBMIT   with Selection Screen Value

I have a requirement :
with other select-options and parameters, i have two radio button, Foreground and Background:
when Background radio button will be selected program should be scheduled as a background job.
How i will pass selection screen value in JOB_SUBMIT ??
Cheers.
Srikanta

Hi ,
Try This
*& Report  ZMMVB_PG_SL_CHANGE_BDC
REPORT  zmmvb_pg_sl_change_bdc.
TABLES : mara,t133a,marc.
DATA i_t133a LIKE t133a OCCURS 0 WITH HEADER LINE.
DATA : BEGIN OF itab OCCURS 0,
        matnr LIKE marc-matnr,
        werks LIKE marc-werks,
        ekgrp LIKE marc-ekgrp,
       END OF itab.
DATA : BEGIN OF itab1 OCCURS 0,
         matnr LIKE marc-matnr,
         werks LIKE marc-werks,
         dispo LIKE marc-dispo,
END OF itab1.
DATA : fname LIKE ibipparms-path ,
       ename TYPE string,
       mode.
DATA: BEGIN OF it_t133a OCCURS   0,
        bilds LIKE t133a-bilds,
        pstat LIKE t133a-pstat,
        guifu LIKE t133a-guifu,
        auswg LIKE t133a-auswg,
      END OF it_t133a.
DATA:  ctr TYPE i,
       ctr_s(2) TYPE n,
       wrk(35),
       ch(1),
       viewno(2) TYPE n,
       guifu LIKE t133a-guifu.
DATA: BEGIN OF it_views OCCURS 30.
        INCLUDE STRUCTURE mbildtab.   " Selection Views
DATA: END OF it_views.
DATA bdc_data LIKE bdcdata OCCURS 0 WITH HEADER LINE.
SELECTION-SCREEN BEGIN OF BLOCK b WITH FRAME TITLE text-000.
PARAMETERS : ek RADIOBUTTON GROUP rg1 ,
             sl RADIOBUTTON GROUP rg1
SELECTION-SCREEN END OF BLOCK b.
SELECTION-SCREEN BEGIN OF BLOCK c WITH FRAME TITLE text-001.
PARAMETERS : fg RADIOBUTTON GROUP rg2 DEFAULT 'X',
             bg RADIOBUTTON GROUP rg2.
SELECTION-SCREEN END OF BLOCK c.
START-OF-SELECTION.
  IF fg = 'X'.
    mode = 'A'.
  ELSEIF bg = 'X'.
    mode = 'E'.
  ENDIF.
  IF ek = 'X'.
    guifu = 'SP09'.
    PERFORM bdc_ekgrp_change.
  ELSEIF sl = 'X'.
    guifu = 'SP12'.
    PERFORM bdc_mrpcontroller_change.
  ENDIF.
*&      Form  BDC_EKGRP_CHANGE
*       text
*  -->  p1        text
*  <--  p2        text
FORM bdc_ekgrp_change .
  CALL FUNCTION 'F4_FILENAME'
    EXPORTING
      program_name  = sy-repid
      dynpro_number = sy-dynnr
      field_name    = ' '
    IMPORTING
      file_name     = fname.
  IF NOT ( fname IS INITIAL ) .
    ename = fname .
  ENDIF.
  CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
      filename                = ename
      filetype                = 'DAT'
    TABLES
      data_tab                = itab
    EXCEPTIONS
      file_open_error         = 1
      file_read_error         = 2
      no_batch                = 3
      gui_refuse_filetransfer = 4
      invalid_type            = 5
      no_authority            = 6
      unknown_error           = 7
      bad_data_format         = 8
      header_not_allowed      = 9
      separator_not_allowed   = 10
      header_too_long         = 11
      unknown_dp_error        = 12
      access_denied           = 13
      dp_out_of_memory        = 14
      disk_full               = 15
      dp_timeout              = 16
      OTHERS                  = 17.
  IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
  IF itab[] IS NOT INITIAL.
    LOOP AT itab.
      REFRESH bdc_data.
      IF itab-matnr NA sy-abcde AND itab-matnr NA '/*-_.'.
        UNPACK itab-matnr TO itab-matnr.
      ELSE.
        TRANSLATE itab-matnr TO UPPER CASE.
      ENDIF.
      SELECT SINGLE * FROM mara WHERE matnr = itab-matnr.
      IF sy-subrc NE 0.
        CONTINUE.
      ENDIF.
      PERFORM view_routine.
      PERFORM bdc_dynpro      USING 'SAPLMGMM' '0060'.
      PERFORM bdc_field       USING 'BDC_CURSOR'
                                    'RMMG1-MATNR'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '/00'.
      PERFORM bdc_field       USING 'RMMG1-MATNR'
                                    itab-matnr.
      CONCATENATE 'MSICHTAUSW-DYTXT(' viewno ')' INTO wrk.
      CONDENSE wrk NO-GAPS.
      PERFORM bdc_dynpro      USING 'SAPLMGMM' '0070'.
      PERFORM bdc_field       USING 'BDC_CURSOR'
                                      wrk.   "'MSICHTAUSW-DYTXT(08)'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=ENTR'.
      CONCATENATE 'MSICHTAUSW-KZSEL(' viewno ')' INTO wrk.
      CONDENSE wrk NO-GAPS.
      PERFORM bdc_field       USING   wrk  "'MSICHTAUSW-KZSEL(08)'
                                      'X'.
      PERFORM bdc_dynpro      USING 'SAPLMGMM' '0080'.
      PERFORM bdc_field       USING 'BDC_CURSOR'
                                    'RMMG1-WERKS'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=ENTR'.
      PERFORM bdc_field       USING 'RMMG1-WERKS'
                                    itab-werks.
      PERFORM bdc_dynpro      USING 'SAPLMGMM' '4000'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=BU'.
*  PERFORM bdc_field       USING 'MAKT-MAKTX'
*                                '"HEX BOLT M16X1.5X100,B8.8,BP"'.
      PERFORM bdc_field       USING 'BDC_CURSOR'
                                    'MARC-EKGRP'.
*  PERFORM bdc_field       USING 'MARA-MEINS'
*                                'NOS'.
      PERFORM bdc_field       USING 'MARC-EKGRP'
                                    itab-ekgrp.
*  PERFORM bdc_field       USING 'MARA-MATKL'
*                                '1702'.
*  PERFORM bdc_field       USING 'MARC-USEQU'
*                                '3'.
*  PERFORM bdc_field       USING 'MARC-KORDB'
*                                'X'.
      CALL TRANSACTION 'MM02' USING bdc_data MODE mode UPDATE 'S'.
    ENDLOOP.
  ENDIF.
ENDFORM.                    " BDC_EKGRP_CHANGE
*&      Form  BDC_MRPCONTROLLER_CHANGE
*       text
*  -->  p1        text
*  <--  p2        text
FORM bdc_mrpcontroller_change .
  CALL FUNCTION 'F4_FILENAME'
    EXPORTING
      program_name  = sy-repid
      dynpro_number = sy-dynnr
      field_name    = ' '
    IMPORTING
      file_name     = fname.
  IF NOT ( fname IS INITIAL ) .
    ename = fname .
  ENDIF.
  CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
      filename                = ename
      filetype                = 'DAT'
    TABLES
      data_tab                = itab1
    EXCEPTIONS
      file_open_error         = 1
      file_read_error         = 2
      no_batch                = 3
      gui_refuse_filetransfer = 4
      invalid_type            = 5
      no_authority            = 6
      unknown_error           = 7
      bad_data_format         = 8
      header_not_allowed      = 9
      separator_not_allowed   = 10
      header_too_long         = 11
      unknown_dp_error        = 12
      access_denied           = 13
      dp_out_of_memory        = 14
      disk_full               = 15
      dp_timeout              = 16
      OTHERS                  = 17.
  IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
  IF itab1[] IS NOT INITIAL.
    LOOP AT itab1.
      REFRESH bdc_data.
      IF itab1-matnr NA sy-abcde AND itab1-matnr NA '/*-_.'.
        UNPACK itab1-matnr TO itab1-matnr.
      ELSE.
        TRANSLATE itab1-matnr TO UPPER CASE.
      ENDIF.
      SELECT SINGLE * FROM mara WHERE matnr = itab1-matnr.
      IF sy-subrc NE 0.
        CONTINUE.
      ENDIF.
      PERFORM view_routine.
      PERFORM bdc_dynpro      USING 'SAPLMGMM' '0060'.
      PERFORM bdc_field       USING 'BDC_CURSOR'
                                    'RMMG1-MATNR'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '/00'.
      PERFORM bdc_field       USING 'RMMG1-MATNR'
                                    itab1-matnr.
      CONCATENATE 'MSICHTAUSW-DYTXT(' viewno ')' INTO wrk.
      CONDENSE wrk NO-GAPS.
      PERFORM bdc_dynpro      USING 'SAPLMGMM' '0070'.
      PERFORM bdc_field       USING 'BDC_CURSOR'
                                       wrk.         "'MSICHTAUSW-DYTXT(11)'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=ENTR'.
      CONCATENATE 'MSICHTAUSW-KZSEL(' viewno ')' INTO wrk.
      CONDENSE wrk NO-GAPS.
      PERFORM bdc_field       USING   wrk          "'MSICHTAUSW-KZSEL(11)'
                                    'X'.
      PERFORM bdc_dynpro      USING 'SAPLMGMM' '0080'.
      PERFORM bdc_field       USING 'BDC_CURSOR'
                                    'RMMG1-WERKS'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=ENTR'.
      PERFORM bdc_field       USING 'RMMG1-WERKS'
                                    itab1-werks.
      PERFORM bdc_dynpro      USING 'SAPLMGMM' '4000'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=BU'.
*      PERFORM bdc_field       USING 'MAKT-MAKTX'
*                                    '"HEX BOLT M16X1.5X100,B8.8,BP"'.
*      PERFORM bdc_field       USING 'MARA-MEINS'
*                                    'NOS'.
*      PERFORM bdc_field       USING 'MARC-DISGR'
*                                    '701'.
*      PERFORM bdc_field       USING 'MARC-EKGRP'
*                                    'A00'.
      PERFORM bdc_field       USING 'BDC_CURSOR'
                                    'MARC-DISPO'.
*      PERFORM bdc_field       USING 'MARC-DISMM'
*                                    'PD'.
      PERFORM bdc_field       USING 'MARC-DISPO'
                                    itab1-dispo.
*      PERFORM bdc_field       USING 'MARC-DISLS'
*                                    'MB'.
      CALL TRANSACTION 'MM02' USING bdc_data MODE mode UPDATE 'S'.
    ENDLOOP.
  ENDIF.
ENDFORM.                    " BDC_MRPCONTROLLER_CHANGE
*&      Form  bdc_dynpro
*       text
*      -->PROGRAM    text
*      -->DYNPRO     text
FORM bdc_dynpro USING program dynpro.
  CLEAR bdc_data.
  bdc_data-program  = program.
  bdc_data-dynpro   = dynpro.
  bdc_data-dynbegin = 'X'.
  APPEND bdc_data.
ENDFORM.                        "BDC_DYNPRO
*        Insert field                                                  *
FORM bdc_field USING fnam fval.
  CLEAR bdc_data.
  bdc_data-fnam = fnam.
  bdc_data-fval = fval.
  APPEND bdc_data.
ENDFORM.                    "BDC_FIELD
*&      Form  VIEW_ROUTINE
*       text
*  -->  p1        text
*  <--  p2        text
FORM view_routine .
  CLEAR viewno.
  SELECT * FROM t133a INTO CORRESPONDING FIELDS OF TABLE i_t133a
                WHERE bilds = '21' AND guifu LIKE 'SP%'  .
  LOOP AT i_t133a .
    ch = i_t133a-pstat.
    IF mara-vpsta NA ch .
      DELETE i_t133a     .
      CONTINUE .
    ENDIF .
  ENDLOOP.
  SORT i_t133a BY guifu ASCENDING .
  LOOP AT i_t133a .
    viewno = viewno + 1 .
    IF i_t133a-guifu = guifu .
      EXIT .
    ENDIF .
  ENDLOOP .
ENDFORM.                    " VIEW_ROUTINE
Regards,

Similar Messages

  • Performance Issue with Selection Screen Values

    Hi,
    I am facing a performance issue(seems like a performance issue ) in my project.
    I have a query with some RKFs and sales area in filters (single value variable which is optional).
    Query is by default  restricted by current month.
    The Cube on which the query operates has around 400,000 records for a month.
    The Cube gets loaded every three hours
    When I run the query with no filters I get the output within 10~15 secs.
    The issue I am facing is that,  when I enter a sales area in my selection screen the query gets stuck in the data selection step. In fact we are facing the same problem if we use one or two other characteristics in our selection screen
    We have aggregates/indexes etc on our cube.
    Has any one faced a similar situation?
    Does any one have any comments on this ?
    Your help will be appreciated. Thanks

    Hi A R,
    Goto RSRT--> Give ur query anme --> Execute =Debug
    --> No a pop up ill come with many check boxes select "Display Aggregates found" option --> now give ur
    selections in variable screen > first it will give the already existing aggregate names> continue> now after displaying all the aggregates it will display the list of objects realted to cube wise> try to copy these objects into notepad> again go with ur drill downs now u'll get the already existing aggregates for this drill down-> it will display the list of objects> copy them to notepad> now sort all the objects related to one cube by deleting duplicate objects in the note pad>goto that Infocube> context>maintain aggregates> create aggregate on the objects u copied into note pad.
    now try to execyte the report... it should work properly with out delays for those selections.
    I hope it helps you...
    Regards,
    Ramki.

  • Problem with Selection screen values of an authorization variable

    hi Gurus,
    I have an authorization variable for Division in my queries....Now whenever a user tries to run the query...a list of divisions is available to him....All divisions for which he/she has proper roles assigned.
    Now the problem is that these values are not restricted to the ones relevant to that query (namely the multi provider)
    Eg. for a Flowers Query (divisions relevant to Flowers only) all the divisions (including the ones for Vegetables, Crops etc.) are also visible only because these roles are also assigned to the same user. This needs to be avoided.
    In a nutshell....
    Is their any way by which i can restrict the number of values popping up for an authorization variable in the selection screen, to only those values which are relevant to the info-provider on which the queries are based ???

    hi Deepu,
    I did go through that SAP note. I just have one concern regarding that. The check at the Info provider level is clear enough and i already have that in place. Now there are 2 more checks required a) at the info object level and b) at the BEX designer level.
    Are all three checks required???
    and also how do you  place the check at the BEX level??? i could not quite figure that one out...
    Any inputs would be welcome.
    Thanks,
    Nikhil

  • Submit program with selection screen parameters - getting blank values

    Hi, I'm submitting a program with selection screen parameters. when I pass '000' (I_TPLSCN  )value for Planning Scenario and when this goes to selection screen then I don't see value for Planning scenario as '000'(I_TPLSCN  ) but the value is blank in selection screen. I'm using the below code for this.
    SUBMIT RMCPAMRP WITH MATNR_GL EQ I_MATNR   SIGN 'I'
                      WITH WERKS_GL EQ I_WERKS   SIGN 'I'
                      WITH PLSCN    EQ I_TPLSCN  SIGN 'I'
        via selection-screen        AND RETURN.
    Could anyone please help me how to display value '000' rather than blanks.
    thanks in advance.

    If I_MATNR, I_TPLSCN and I_WERKS are variable then try with
    SUBMIT rmcpamrp
      WITH matnr_gl = i_matnr
      WITH plscn    = i_tplscn
      WITH werks_gl = i_werks
      via selection-screen       
       AND RETURN .
    If I_MATNR, I_TPLSCN and I_WERKS are of type range then try  with
    SUBMIT rmcpamrp
      WITH matnr_gl IN i_matnr
      WITH plscn    IN i_tplscn
      WITH werks_gl IN i_werks
    via selection-screen       
       AND RETURN
    Edited by: Pawan Kesari on Dec 24, 2009 3:33 PM

  • WAD template with BSP Application - how to read selection screen values

    Hello,
    I've created Web template with Web Application Designer (WAD).
    I would like to extend  that page with BSP Application...
    Purpuse of this application is to read some information from tables
    on BW transaction server and display them within Web page.
    Question: How to read selection screen values from a Web template ?
    Thanks for any help,
    Pawel Borowiec

    Hi,
    The selection screen parameters will be on an inputField, so try and get the is of the inputfield generated by doing View source...
    And once you get the inputfield Id, you can read the value in the InputField(InF) by
    using the following code...!
    data : if_value type ref to cl_htmlb_inputfield.
    data : variable type string.
    if_value ?= cl_htmlb_manager=>get_data( request = request
                                                name    = 'inputField'
                                                id      = 'InF_ID_here'
           if if_value->value is not initial.
             variable  = if_value->value.
           endif.
    Hope this helps.
    <b><i>Do reward each useful answer..!</i></b>
    Thanks,
    Tatvagna.

  • Dashboard having same query with different selection screen values

    Hi,
    I want to create a dashboard by including different versions (different selection screen values, like yesterday, last week, last month) of same query. Is it possible to achieve it by without creating separate queries? We are in BI 7.
    Thanks in advance
    Nisha

    Hi,
    I want to create a dashboard by including different versions (different selection screen values, like yesterday, last week, last month) of same query. Is it possible to achieve it by without creating separate queries? We are in BI 7.
    Thanks in advance
    Nisha

  • How to find out the Batch job selection screen values

    Dear Users,
    One of our users has set up a Batch job by manually entering values into the Selection screen of a report instead of picking up a Variant. We would like to know the values entered on selection screen since the job has failed and the user doesn't remember the selection screen values entered.
    Can anyone please advise if there is a way we can figure out the selection screen values entered?
    Thanks,
    Vijay

    Hi,
    You can debug your failed job by going to 'SM37', type in 'JDBG' in the command line ( no '/' ), put the cursor on the job and press enter - will take you to the job in debug mode.
    You can do this only after the job has finished execution. This will simulate the exact background scenario with the same selection screen values as used in the job.
    So type in the transaction code 'JDBG' and place your cursor on the job after It has finished. It will take you to a SAP program in debug mode. Step through this program which is about 10 lines, after this your program will be executed in the debug mode.
    Check the selection screen values.

  • How to capture selection-screen values

    Hi,
      How to capture selection-screen values when user pressing F3 or Back button after the display of report.
    Regards,
    Bujji.

    Hi Bujji,
    select-option are actually ranges or more general internal tables with the structure:
    SIGN:    'I'nclusive or 'E'xclusive
    OPTION:  'EQ', 'BT', 'NE', 'GE', 'CP', ....
    LOW:     low value of type of the curresponding "FOR table-field"
    HIGH:     high value of type of the curresponding "FOR table-field"
    You may just code:
    TABLES: mara.
    SELECT-OPTIONS s_matnr FOR mara-matnr.
    LOOP AT s_matnr.
      WRITE: / s_matnr-sign,
               s_matnr-option,
               s_matnr-low,
               s_matnr-high.
    ENDLOOP.
    If you find my answer useful, please don't forget the reward.
    Regards,
    Juergen

  • At selection-screen value- help

    Hi All,
    I have a requirement that based on a radio button one at selection-screen value-help is triggered and on based on a different radio button another at selection-screen value-help should be triggered.
    can it be achieved.
    Regards,
    Jeetu

    AT SELECTION-SCREEN - selscreen_event
    Syntax
      | { ON {para|selcrit} }
      | { ON END OF selcrit }
      | { ON BLOCK block }
      | { ON RADIOBUTTON GROUP radi }
      | { }
      | { ON {HELP-REQUEST|VALUE-REQUEST}
      |   FOR {para|selcrit-low|selcrit-high} }
      | { ON EXIT-COMMAND }.
    Alternatives:
    1. ... OUTPUT
    2. ... ON {para|selcrit}
    3. ... ON END OF selcrit
    4. ... ON BLOCK block
    5. ... ON RADIOBUTTON GROUP radi
    6. ... { }
    7. ... ON {HELP-REQUEST|VALUE-REQUEST} FOR
          {para|selcrit-low|selcrit-high} }
    8. ... ON EXIT-COMMAND
    Effect
    These additions allow individual evaluation of specific elements of the selection screens of the program. The information as to which selection has triggered the event is contained in the system field sy-dynnr.
    Alternative 1
    ... OUTPUT
    Effect
    This event is triggered at the screen event PBO of a selection screen. In the event block, the selection screen can be prepared through assignments to the data objects of parameters and selection criteria and through dynamic screen modifications.
    Note
    The assignments to input fields in the event block AT SELECTION-SCREEN OUTPUT always affect the selection screen and overwrite the user inputs from previous displays of the same selection screen. Assignments in the event blocks LOAD-OF-PROGRAM oder INITIALIZATION, on the other hand, only have an effect at first program start.
    Alternative 2
    ... ON {para|selcrit}
    Effect
    This event is triggered at the screen event PAI of a selection screen if the content of the input field of a parameter para or a line of a selection criterion selcrit was passed to the ABAP program. In the event block, the user input can be checked. Sending a warning or an error message in the event block makes the fields para and selcrit ready for input again.
    No parameter that is defined as a radio button can be specified. For this purpose, the addition ON RADIOBUTTON GROUP is provided.
    Note
    If a user action takes place in the dialog box for the multiple selection of a selection criterion selcrit, the entries of the selection table are passed to the program, line by line. For each line, the event AT SELECTION-SCREEN ON selcrit is triggered.
    Alternative 3
    ... ON END OF selcrit
    Effect
    This event is triggered after the selection table selcrit has been fully passed to the program after a user action in the dialog box for the multiple selection has taken place. In the event block, the entire selection table can be checked.
    Alternative 4
    ... ON BLOCK block
    Effect
    This event is triggered at the screen event PAI of a selection screen if all the input fields of a block block of the selection screen were passed to the ABAP program. In the event block, the user inputs can be checked. Sending a warning or an error message in the event block makes all the fields of the block block ready for input again.
    Alternative 5
    ... ON RADIOBUTTON GROUP radi
    Effect
    This event is triggered at the screen event PAI of a selection screen if all the fields of a radio button group radi of the selection screen were passed to the ABAP program. In the event block, the user input can be checked. Sending a warning or error message in the event block makes all the radion buttons of the block radi ready for input again.
    Note
    The individual fields of a radio button group are not passed individually and do not trigger the event AT SELECTION-SCREEN ON par.
    Alternative 6
    Effect
    The event AT SELECTION-SCREEN itself is triggered as the last event of selection screen processing if all the input values were passed to the program. In this event block, all the user inputs can be checked. Sending a warning or an error message in the event block makes all the screen fields ready for input once again.
    Alternative 7
    ... ON { HELP-REQUEST | VALUE-REQUEST } FOR
        {para|selcrit-low|selcrit-high} }
    Effect
    The two events ON HELP-REQUEST and ON VALUE-REQUEST are triggered at the screen events POH and POV of a selection screen if - for the input field of a parameter para or one of the input fields of a selection criterion selcrit - the field help F1 or the input help F4 was called. Other selection events are not triggered.
    In the event blocks, a self-defined field or input field can be programmed, which overrides any helps possibly defined in the ABAP Dictionary.
    Notes
    These event blocks can only be implemented for fields of the selection screen that are defined in the same ABAP program and not in a possibly linked logical database.
    With the events for the field and input help, no data is transported between the selection screen and the ABAP program. As with general screens, suitable function modules must be used for these. The parameters and selection criteria changed for the input help are transported to the selection screen.
    Alternative 8
    ... ON EXIT-COMMAND
    Effect
    This event is triggered if the user has called one of the functions Back, Exit or Cancel. In the event block, possible clean-up actions can be executed.
    Example
    In these executable programs, a standard selection screen and a further selection screen are defined. In the event blocks AT SELECTION-SCREEN, the inputs in the selection screens can be specially handled using the name p_carrid and the screen number in sy-dynnr.
    REPORT demo_at_selection_screen.
    Global data
    DATA: sflight_tab TYPE TABLE OF sflight,
          sflight_wa  LIKE LINE  OF sflight_tab.
    Selection screens
    PARAMETERS p_carrid TYPE spfli-carrid.
    SELECTION-SCREEN BEGIN OF SCREEN 500.
      SELECT-OPTIONS s_conn FOR sflight_wa-connid.
      DATA s_conn_wa LIKE LINE OF s_conn.
    SELECTION-SCREEN END OF SCREEN 500.
    Handling selection screen events
    AT SELECTION-SCREEN ON p_carrid.
      IF p_carrid IS INITIAL.
        MESSAGE 'Please enter a value' TYPE 'E'.
      ENDIF.
      AUTHORITY-CHECK OBJECT 'S_CARRID'
                          ID 'CARRID' FIELD p_carrid
                          ID 'ACTVT'  FIELD '03'.
      IF sy-subrc = 4.
        MESSAGE 'No authorization for carrier' TYPE 'E'.
      ELSEIF sy-subrc <> 0.
        MESSAGE 'Error in authority check' TYPE 'A'.
      ELSE.
        IF sy-ucomm = 'ONLI'.
          CALL SELECTION-SCREEN '0500'.
        ENDIF.
      ENDIF.
    AT SELECTION-SCREEN.
      IF sy-dynnr = '0500'.
        IF s_conn IS INITIAL.
          MESSAGE 'Please enter values' TYPE 'W'.
        ELSE.
          SELECT *
                 FROM sflight
                 INTO TABLE sflight_tab
                 WHERE carrid = p_carrid AND
                       connid IN s_conn.
          IF sy-subrc <> 0.
            MESSAGE 'No flights found' TYPE 'E'.
          ENDIF.
        ENDIF.
      ENDIF.
    Main program
    START-OF-SELECTION.

  • Pass selection screen value to ALV

    Hi
    I need to pass selection screen values to ALV top of page. How to do this?

    Hi,
    Have a look on the following example.
    TYPE-POOLS: SLIS.
    TABLES: LFA1.
    SELECT-OPTIONS: LIFNR FOR LFA1-LIFNR.
    DATA:  BEGIN OF ITAB OCCURS 0,
           LIFNR LIKE LFA1-LIFNR,
           NAME1 LIKE LFA1-NAME1,
           ORT01 LIKE LFA1-ORT01,
           LAND1 LIKE LFA1-LAND1,
           REGIO LIKE LFA1-REGIO,
           END OF ITAB.
    SELECT * FROM LFA1 INTO CORRESPONDING FIELDS OF TABLE ITAB UP TO 5 ROWS.
    DATA:  LAYOUT TYPE SLIS_LAYOUT_ALV,
           HEADER TYPE SLIS_T_LISTHEADER WITH HEADER LINE,
           FLDCAT TYPE SLIS_T_FIELDCAT_ALV.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
       I_PROGRAM_NAME               = SY-REPID
       I_INTERNAL_TABNAME           = 'ITAB'
      I_STRUCTURE_NAME             = ITAB
      I_CLIENT_NEVER_DISPLAY       = 'X'
       I_INCLNAME                   = SY-REPID
      I_BYPASSING_BUFFER           =
      I_BUFFER_ACTIVE              =
      CHANGING
        CT_FIELDCAT                  = FLDCAT
    EXCEPTIONS
      INCONSISTENT_INTERFACE       = 1
      PROGRAM_ERROR                = 2
      OTHERS                       = 3
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
       I_CALLBACK_PROGRAM                = SY-REPID
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = ' '
       I_CALLBACK_TOP_OF_PAGE            = 'TOP-OF-PAGE'
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      =
      I_GRID_SETTINGS                   =
      IS_LAYOUT                         =
       IT_FIELDCAT                       = FLDCAT
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        =
      IT_EVENTS                         =
      IT_EVENT_EXIT                     =
      IS_PRINT                          =
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      I_HTML_HEIGHT_TOP                 = 0
      I_HTML_HEIGHT_END                 = 0
      IT_ALV_GRAPHICS                   =
      IT_HYPERLINK                      =
      IT_ADD_FIELDCAT                   =
      IT_EXCEPT_QINFO                   =
      IR_SALV_FULLSCREEN_ADAPTER        =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
      TABLES
        T_OUTTAB                          = ITAB
    EXCEPTIONS
      PROGRAM_ERROR                     = 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.
    DATA: S(10).
    S = 'TO'.
    FORM TOP-OF-PAGE.
    HEADER-TYP = 'S'.
    HEADER-KEY = 'LIFNR'.
    CONCATENATE LIFNR-LOW LIFNR-HIGH INTO HEADER-INFO SEPARATED BY SPACE.
    APPEND HEADER.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
      EXPORTING
        IT_LIST_COMMENTARY       = HEADER[]
      I_LOGO                   =
      I_END_OF_LIST_GRID       =
      I_ALV_FORM               =
    ENDFORM.
    Reward,if useful.
    Thanks,
    Chandu

  • How to fill internal table with selection screen field.

    Hi all,
    i am new to sap . pls tell me how to fill internal table with selection screen field.

    Hi,
    Please see the example below:-
    I have used both select-options and parameter on the selection-screen.
    Understand the same.
    * type declaration
    TYPES: BEGIN OF t_matnr,
            matnr TYPE matnr,
           END OF t_matnr,
           BEGIN OF t_vbeln,
             vbeln TYPE vbeln,
           END OF t_vbeln.
    * internal table declaration
    DATA : it_mara  TYPE STANDARD TABLE OF t_matnr,
           it_vbeln TYPE STANDARD TABLE OF t_vbeln.
    * workarea declaration
    DATA : wa_mara  TYPE t_matnr,
           wa_vbeln TYPE t_vbeln.
    * selection-screen field
    SELECTION-SCREEN: BEGIN OF BLOCK b1.
    PARAMETERS : p_matnr TYPE matnr.
    SELECT-OPTIONS : s_vbeln FOR wa_vbeln-vbeln.
    SELECTION-SCREEN: END OF BLOCK b1.
    START-OF-SELECTION.
    * I am adding parameter value to my internal table
      wa_mara-matnr = p_matnr.
      APPEND wa_mara TO it_mara.
    * I am adding select-options value to an internal table
      LOOP AT s_vbeln.
        wa_vbeln-vbeln =  s_vbeln-low.
        APPEND  wa_vbeln TO  it_vbeln.
      ENDLOOP.
    Regards,
    Ankur Parab

  • How can I get selection screen values from outside of program?

    Hi. all.
    Now. I'm developing moritoring systems and I have problems. for getting selection screen values in runtime. Is there any function, methods or structure to know this?
    I'd like to get selection screen values while several programs working in runtime and update these values to table to show current system's status and input values for users in real time.
    For example.
    Now. 3 PGMs are working on systems.
    each PGM is ZAAA01, ZAAA02, ZAAA03.
    and ZAAA01 needs input parameter P01, ZAAA02 needs input parameter P02, ZAAA03 needs input parameter P03.
    In this case, I have to know values of P01, P02 and P03.
    The mornitoring systems will show current working status of PGMs(ZAAA01~03)' and these PGMs' input values.
    As fas as I know, the structure 'SCREEN' can be used in each PGM for runtime. Is there any SAP system structure or something else for this purpose?
    I hope your hopeful repsponse.
    Thanks.

    Umm..I need to explain more about this.
    of course I know  SET, GET PARAMETERS.
    But I'd like to minimize coding for each PGM level.
    I have over hundreds PGMs and I have to develop the PGM(including tables and structures) that mornitor
    all of those PGMs on a report in real-time.
    This PGM is kind of  Process Manager.
    First I should know dialogue job PGM and background job that pass parameters using SAP(ABAP) Memory.
    And then I have to update those PGMs' input values via screens into tables in real-time.
    So, I couldn't use SET,GET PARAMETERS for this PGM.
    I want to know methods that can be used for getting information about runtime PGMs' selection screen field values in SAP systems wide.
    Please help me some one knows this.

  • ABAP Query - Selection Screen Values Usage

    Hi,
       I have created an ABAP Query. For one of the selection-screen fields (CAUFV-FTRMI)
    which is select-options, I want to use the values during coding (in the where clause of a select query)
    in Extras section under the event "record processing". Please suggest how to make the the selection-screen values
    available during record processing event. Thanks in advance.
    Regards,
    Tejas Savla

    Hi Kartik,
                  I need to fetch data from some table KEKO depending on the values entered on the selection-screen for the field CAUFV-FTRMI. So, I need to find a way by which the selection-screen input values are available in the record processing event. The values are available in some variable SP$00002 of the automatically generated report program. But, this variable cannot be used in the Coding section of the ABAP QUERY. Please advise.
    Thanks & Regards,
    Tejas Savla

  • Selection screen value display

    can any one suggest, how to display the selection screen value in the output of the report
    i am using SQ02 record processing...

    Hi,
    In SQ02  -> Extras(F5)->Selections tab-->press
       create icod there.
    It will display pop-up screen .
    Enter your selection paramenter name.
    Ex: s_xxxx.
    --->Select one of the radio buttons.
    In extras tab  create a field whci is of same type of your required output field.
    Then go back to field groups(F6).
    Left side under extras join you will find your varable which  you have created .
    Move that field to right side field groups(By drag and drop  (OR ) field right click add to field group. )
    Under START-OF -selection event
    Move s_xxxx  To v_xxxx
    v_xxx is the field you have created in extras.
    Activate the infoset.
    In sq01->change mode->press F6--->Press F6
    Now select the checkbox of your output field.
    On sam,e screen > basic list>select check box of your field.  Save

  • Problem in passing selection screen values using CALL TRANSACTION.

    Hi All
    I am facing problem in transfering selection screen values to the called transaction. I am trying to pass the path of the transaction filer but to no avail. The variable for filepath is not empty.
    Below is my code:
    DATA: lt_bdcdata TYPE TABLE OF bdcdata,
           wa_bdcdata TYPE bdcdata,
           opt TYPE ctu_params.
    CLEAR wa_bdcdata.
    wa_bdcdata-program  = 'RFBASM00'.
    wa_bdcdata-dynpro   = '1000'.
    wa_bdcdata-dynbegin = 'X'.
    APPEND wa_bdcdata TO lt_bdcdata.
    CLEAR wa_bdcdata.
    wa_bdcdata-fnam = 'BDC_CURSOR'.
    wa_bdcdata-fval = 'RFPDO1-FEBUMSF'.
    APPEND wa_bdcdata TO lt_bdcdata.
    CLEAR wa_bdcdata.
    wa_bdcdata-fnam = 'RFPDO1-FEBUMSF'.
    wa_bdcdata-fval = gv_filepath.
    APPEND wa_bdcdata TO lt_bdcdata.
    CLEAR wa_bdcdata.
    wa_bdcdata-fnam = 'BDC_OKCODE'.
    wa_bdcdata-fval = 'PASS'.
    APPEND wa_bdcdata TO lt_bdcdata.
    CLEAR wa_bdcdata.
    opt-dismode = 'E'.
    opt-updmode = 'S'.
    CALL TRANSACTION 'FF_5' USING lt_bdcdata OPTIONS FROM opt.
    Please help.
    Harsh

    Hi Harsh,
    I think you have entered wrong main program for tcode 'FF_5' and wrong screen field for the file name. Use the below code instead of yours.
    DATA: lt_bdcdata TYPE TABLE OF bdcdata,
           wa_bdcdata TYPE bdcdata,
           opt TYPE ctu_params,
           gv_filepath type char128 value 'C:\testfile.txt'.
    CLEAR wa_bdcdata.
    wa_bdcdata-program  = 'RFEBKA00'.
    wa_bdcdata-dynpro   = '1000'.
    wa_bdcdata-dynbegin = 'X'.
    APPEND wa_bdcdata TO lt_bdcdata.
    CLEAR wa_bdcdata.
    wa_bdcdata-fnam = 'BDC_CURSOR'.
    wa_bdcdata-fval = 'UMSFILE'.
    APPEND wa_bdcdata TO lt_bdcdata.
    CLEAR wa_bdcdata.
    wa_bdcdata-fnam = 'UMSFILE'.
    wa_bdcdata-fval = gv_filepath.
    APPEND wa_bdcdata TO lt_bdcdata.
    CLEAR wa_bdcdata.
    *wa_bdcdata-fnam = 'BDC_OKCODE'.
    *wa_bdcdata-fval = 'PASS'.
    *APPEND wa_bdcdata TO lt_bdcdata.
    *CLEAR wa_bdcdata.
    opt-dismode = 'A'.
    opt-updmode = 'S'.
    CALL TRANSACTION 'FF_5' USING lt_bdcdata OPTIONS FROM opt.
    Thanks.
    Regards,
    Jey

Maybe you are looking for

  • Jelly Bean - Email AutoSync No Longer Works

    I am at Android 4.1.1 (Jelly Bean) on my stock Samsung Galaxy S3.  Since the Jelly Bean upgrade, my e-mail will MANUALLY sync e-mails, but will no longer AUTOMATICALLY sync e-mails per the Peak/Off-Peak schedule for any of my e-mail accounts except f

  • Using FMS v4.5.5 with a browser-based audio player running on iPad/iPhone

    Hello, I’m seeking some clarity/guidance on using FMS v4.5.5 (Streaming Edition) with a browser-based audio player running on iPad/iPhone (i.e. under iOS). Background I have a Microsoft Windows 2008 R2 Web Server running IIS v7.5 and supporting a web

  • Calling Perl module in Java

    Hai, I like to know, How do I call a perl module from my java program such that the output of the perl module is used in my Java program ? Regards ackumar

  • Lost my MacBook in the Costa Shipwreck :(

    Hello, I was a passenger on the Costa Concordia, the cruise that recenlty capsized in Giglio, Italy. I lost many things, including my beloved Aluminum MacBook, which is now resting somewhere in the Italian ocean. I wanted to know if there was some wa

  • Excpetion while calling NewObjectArray 2 times

    I am calling a C++ method from another C++ code 2 times. First time, it works ok but second time, JVM throws an exception and terminates. Any idea ? It throws an exception while calling _env->NewObjectArray  I have posted relavant portion of my metho