Skip to Content
0
Former Member
Nov 17, 2010 at 04:05 AM

getting the parameter value

58 Views

Hi ,

Below is my code , i have tried assigning selection text to my parameter(checkbox) see below->works fine

now in i_para i have list of selected parameters which are being displayed on the screen.

i want to know how can i get the values assigned in those parameters.. i dont want to use case on all the parameters written on the selection screen(too much garbage code) by default i have written 20 parameters on the selection screen

Eg : if i knw the parameter on screen created is p_new1 i want to check what value the user has stored in it.

OR if anyone can let me know how to create slection screen using table values

LOOP AT SCREEN .
      IF screen-group1 CP 'SD*'
      AND screen-group3 = 'PAR'.
        wa_para-name = screen-name.
        g_tabix =  g_tabix + 1.
        READ TABLE i_zuprgmvar INTO wa_zuprgmvar INDEX g_tabix .
        IF sy-subrc = 0.
          wa_para-text = wa_zuprgmvar-low .
        ENDIF.
        APPEND wa_para TO i_para.
        CLEAR wa_para.
      ENDIF.
    ENDLOOP.
    CLEAR g_tabix.

  ENDIF.

  LOOP AT i_para INTO wa_para WHERE text IS NOT INITIAL.
    wa_rsseltexts1-name = wa_para-name.
    wa_rsseltexts1-kind = 'P'.
    CONCATENATE wa_para-text 'Type' INTO wa_rsseltexts1-text SEPARATED BY space.
    APPEND wa_rsseltexts1 TO i_rsseltexts1.
    CLEAR wa_rsseltexts1.
  ENDLOOP.

  CALL FUNCTION 'SELECTION_TEXTS_MODIFY'
    EXPORTING
      program                     = sy-repid
    TABLES
      seltexts                    = i_rsseltexts1

Thanks

Renu Gusain