Problem in at selection screen

hai friends,
i have two radio buttons in my selection-screen . one is for application server file and another is for local file.when i select the local file radio button one excel file should get genarated and when i click on appln sever button then the file should b transferred to the applin server(given path).of course these things are working fine.but if i come back to the same sel-screen and again execute the program then i am getting the alv list with double columns(the ccolums which have r getting repeated in my list) and vice-versa.
if u want plz see my code also.
SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-000.
SELECT-OPTIONS : s_date FOR ztbukxxin003-z_manufdate NO-EXTENSION.
SELECTION-SCREEN END OF BLOCK blk1.
SELECTION-SCREEN BEGIN OF BLOCK blk3 WITH FRAME TITLE text-006.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: p_rad1 TYPE c RADIOBUTTON GROUP grp1 USER-COMMAND urad
DEFAULT 'X'.
SELECTION-SCREEN COMMENT 5(15) text-007 FOR FIELD p_lopath.
PARAMETERS: p_lopath LIKE filename-pathintern DEFAULT
'ZS_SESAM_SEND_EDI'.
PARAMETERS : p_lofile LIKE filename-fileintern DEFAULT 'ZTBUKXXIN008'.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINe.
PARAMETERS: p_rad2 TYPE c RADIOBUTTON GROUP grp1 .
SELECTION-SCREEN COMMENT 5(15) text-009 FOR FIELD p_file.
PARAMETERS : p_file  LIKE rlgrap-filename.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK blk3.
             A T  S E L E C T I O N - S C R E E N                    *
DATA : i_mdate TYPE ztbukxxin003-z_manufdate.
AT SELECTION-SCREEN .
Validate  manufacture date on the selection screen.
  SELECT SINGLE z_manufdate
  INTO i_mdate
  FROM ztbukxxin003
  WHERE z_ndsnum LIKE 'CEA%' AND
  z_manufdate IN s_date.
  IF sy-subrc NE 0.
    MESSAGE 'Enter the date in the format YYYY/MM/DD' TYPE 'E'.
  ENDIF.
  IF p_rad1 EQ 'X'.
    PERFORM get_appl_file   USING  p_lofile.
  ELSEIF p_rad2 EQ 'X'.
    PERFORM get_local_file   USING  p_file.
  ENDIF.
of course here if i  write the above 5 lines of code in at selection screen on value-request for p_file.then the program not getting executed also.that's why i have wrote everything in at sel-screen only.
i guess the problem is in events only.but i am not able to understand what code can b added adn what code deleted from this.
any solution from anybody.

Hi,
Try the below code and see
IF p_rad1 EQ 'X'.
refresh : itab.
PERFORM get_appl_file USING p_lofile.
once u read the file and put in internal table then use clear command and clear the file.
clear : p_lofile
ELSEIF p_rad2 EQ 'X'.
refresh : itab.
PERFORM get_local_file USING p_file.
once u read the file and put in internal table then use clear command and clear the file.
clear : p_file.
ENDIF.
Regards,
nagaraj

Similar Messages

  • Problem in AT selection screen validation

    Hi,
    I am having problem in AT SELECTION SCREEN Validation.
    I have 2 radiobutton and 6 parameter. if i click first radio button  all the 6 radiobutton should enable and take the user input, that is working fine for me.
    if i click second radiobutton , out of 6 , 3 parameter should disable and remaining 3 should enable. thats also working fine.
    My problem is program has written the validation for this 3 parameter in the AT SELECTION SCREEN.
    For first radioutton all the validation working  fine, for second validation as soon as i press the radiobutton it will display error message. Based on 2 parameter user is filling value for 3 rd parameter.
    I want the same validation to be done for second radio button after user pressing enter.
    PARAMETER: p_single RADIOBUTTON GROUP rad1 DEFAULT 'X' USER-COMMAND f1,
               p_multi RADIOBUTTON GROUP rad1.
    PARAMETERS: s_pwwrk LIKE plaf-pwwrk.          
    PARAMETERS: p_lgort LIKE plaf-lgort.
    PARAMETERS: p_kostl LIKE cobl-kostl.
    here is my code:
    AT SELECTION SCREEN.
    CLEAR t001w.
      CLEAR t001k.
      CLEAR marv.
      SELECT SINGLE * FROM t001w WHERE werks EQ s_pwwrk.
      IF sy-subrc NE 0.
        MESSAGE e999 WITH 'Plant' s_pwwrk 'does not exist'.
      ELSE.
        SELECT SINGLE * FROM t001k WHERE bwkey EQ t001w-bwkey.
        SELECT SINGLE * FROM marv WHERE bukrs EQ t001k-bukrs.
        IF p_budat0(4) NE marv-lfgja OR p_budat4(2) NE marv-lfmon
    IF marv-xruem IS NOT INITIAL.
            IF p_budat0(4) NE marv-vmgja OR p_budat4(2) NE marv-vmmon.
    MESSAGE e999 WITH p_budat4(2) p_budat0(4)
                                'is closed.
                                            Please try again.'.
            ENDIF.
          ELSE.
            MESSAGE e999 WITH p_budat4(2) p_budat0(4)
                              'is closed.
                                          Please try again.'.
          ENDIF.
        ENDIF.
      ENDIF.

    For your Case ,
    If i understand clearly,You can do the validation when you want on AT SELECTION SCREEN ON WP_FIELD.
    If you say your validation to be done only for Selection of Second Radio Button, then..
    AT SELECTION SCREEN.
    if p_multi  eq 'X'. "<- Make Validation to be done only if user select Second Button
    CLEAR t001w.
    CLEAR t001k.
    CLEAR marv.
    SELECT SINGLE * FROM t001w WHERE werks EQ s_pwwrk.
    IF sy-subrc NE 0.
    MESSAGE e999 WITH 'Plant' s_pwwrk 'does not exist'.
    ELSE.
    SELECT SINGLE * FROM t001k WHERE bwkey EQ t001w-bwkey.
    SELECT SINGLE * FROM marv WHERE bukrs EQ t001k-bukrs.
    IF p_budat+0(4) NE marv-lfgja OR p_budat+4(2) NE marv-lfmon
    IF marv-xruem IS NOT INITIAL.
    IF p_budat+0(4) NE marv-vmgja OR p_budat+4(2) NE marv-vmmon.
    MESSAGE e999 WITH p_budat+4(2) p_budat+0(4)
    'is closed.
    Please try again.'.
    ENDIF.
    ELSE.
    MESSAGE e999 WITH p_budat+4(2) p_budat+0(4)
    'is closed.
    Please try again.'.
    ENDIF.
    ENDIF.
    ENDIF.
    endif.

  • 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

  • Problem with the selection screen in submit program

    Hi Friends,
    i am facing the problem wih the selection screen in submit program. in my Module pool program i am using the submit program statement, When i execute the program , The module program display the submit program selections creen.
    I have implemented the code same as below.
    submit ztest with tknum =p_tknum and  return.
    Can you pleaes help me how to avoid the submit program selection screen.
    Thanks,
    Charan

    Hi Charan,
    You have to give the selection screen values when you submit a job.
    Press F1 on submit and you will see more details.
    Here is an example from ABAP Documentation.
    Program accessed
    REPORT report1.
    DATA text(10) TYPE c.
    SELECTION-SCREEN BEGIN OF SCREEN 1100.
      SELECT-OPTIONS: selcrit1 FOR text,
                      selcrit2 FOR text.
    SELECTION-SCREEN END OF SCREEN 1100.
    Calling program
    REPORT report2.
         DATA: text(10)   TYPE c,
          rspar_tab  TYPE TABLE OF rsparams,
          rspar_line LIKE LINE OF rspar_tab,
          range_tab  LIKE RANGE OF text,
          range_line LIKE LINE OF range_tab.
    rspar_line-selname = 'SELCRIT1'.
    rspar_line-kind    = 'S'.
    rspar_line-sign    = 'I'.
    rspar_line-option  = 'EQ'.
    rspar_line-low     = 'ABAP'.
    APPEND rspar_line TO rspar_tab.
    range_line-sign   = 'E'.
    range_line-option = 'EQ'.
    range_line-low    = 'H'.
    APPEND range_line TO range_tab.
    range_line-sign   = 'E'.
    range_line-option = 'EQ'.
    range_line-low    = 'K'.
    APPEND range_line TO range_tab.
    SUBMIT report1 USING SELECTION-SCREEN '1100'
                   WITH SELECTION-TABLE rspar_tab
                   WITH selcrit2 BETWEEN 'H' AND 'K'
                   WITH selcrit2 IN range_tab
                   AND RETURN.
    Regards,
    Jovito.

  • Problems in at selection-screen output - setting pushbutton invisible

    Hello,
    I hope I can get some help here
    I have a problem with setting a pushbutton invisible
    i have a field (long-text) in my screen - and behind this a pushbutton for calling the editor
    if in a variant the parameters field is set invisible i also want to set the pushbutton invisible
    i have no idea why in the at selection-screen output event screen-invisible is always 0 - but in the variant the field is set invisible.
    i need to know if the parameters field is invisible to set the pushbutton the same
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(31) S_TXB_L1.
    PARAMETERS S_TXT_L1 TYPE ZHR_FC_STRING.
    SELECTION-SCREEN PUSHBUTTON 79(15) P_LTX_1 USER-COMMAND YLTXT1.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(31) S_TXB_L2.
    PARAMETERS S_TXT_L2 TYPE ZHR_FC_STRING.
    SELECTION-SCREEN PUSHBUTTON 79(15) P_LTX_2 USER-COMMAND YLTXT2.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(31) S_TXB_L3.
    PARAMETERS S_TXT_L3 TYPE ZHR_FC_STRING.
    SELECTION-SCREEN PUSHBUTTON 79(15) P_LTX_3 USER-COMMAND YLTXT3.
    SELECTION-SCREEN END OF LINE.
    AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
        IF SCREEN-NAME(7) = 'S_TXT_L'.
          MERK_INVISIBLE = SCREEN-INVISIBLE.
        ENDIF.
        IF SCREEN-NAME(6) = 'P_LTX_'.
         SCREEN-INVISIBLE = MERK_INVISIBLE.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    Thanks very much...
    Helmut

    I agree - there seems to be some confusion here. In the variant the field can only be "hidden" while in the code it is possible to make the field completely invisible. 'Hiding' the field in the variant merely hides it by default and adds a 'plus' button to the toolbar, by clicking which the hidden elements can be exposed.
    As far as changing the screen fields goes, I find it usefull to use MODIF ID. Perhaps this blog could be helpful:
    http://friendlyabaper.blogspot.com/2009/07/my-super-awesome-selection-screen.html
    P.S. Please use the code tags for the code, per Forum Rules.

  • RE: HR ABAP Multiple selection problem on input selection-screen

    hi friends,
    I AM Facing one problem in HR abap report  selection-screen , in my report  employee details data getting based on payroll area
    of selection-screen. Here iam  SELECTION-SCREEN  declarations made in program level NOT created REPORT CATEGORY FOR
    PNP LDB.
    ACTUAL MY PROBLEM IS IF I SELECT SINGLE PAYROLL AREA IN SELECTION-SCREEN IT GETTING DATA PERFECTLY FOR THAT
    PAYROLL AREA  
    EX. ZA - PAYROLL AREA IF I SELECT IN SELECTION SCREEN IT FETCHING THAT PAYROLL  AREA DATA PERFECTLY, PROBLEM
    IS IF I SELECT MULTIPLE PAYROLL AREAS IN SELECTION-SCREEN PAYROLL AREA FIELD  ZA AND ZB PAYROLLS IT FETCHING
    ONLY ZA -PAYROLL DATA ONLY IT IS NOT FETCHING DATA FROM ZB PAYROLL AREA.MY REQUIREMENT IS IT SHOULD FETCH
    BOTH PAYROLL DATA  AND SHOWING  .
    HERE  IAM GIVING MY SELECTION SCREEN DECLARATION SYNTAX.
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS:
                    S_ABKRS FOR P0001-ABKRS NO INTERVALS," NO-EXTENSION,     " PAY ROLL AREA
                    S_PERSA FOR P0001-WERKS NO INTERVALS," NO-EXTENSION,     " PERS.AREA
    SELECTION-SCREEN END OF BLOCK B2 .
    PLEASE Any body knows solution for this selection give me reply.
    regards,
    gopal

    If you are using Logical DB PNP why are you coding Selection Fields for ABKRS and WERKS?   Both of these fields are defined in the PNP Selection Screen and if you use those fields then SAP will handle filtering the data.

  • Problem on  "at selection-screen output." command

    Hi ,
    in my programe a part of code is :-
    selection-screen : begin of block b0 with frame title text-000.
       selection-screen:  skip 1.
      parameters: s_box1  radiobutton group g1 user-command u1  default            'X',
                  s_box2 radiobutton group g1.
    selection-screen : end of block b0 .
    selection-screen : begin of block b2 with frame title text-002.
    select-options  : s_vend for bseg-lifnr modif id m1 .
    selection-screen : end of block b2 .
    selection-screen : begin of block b3 with frame title text-003.
    select-options  : s_budat for bkpf-budat modif id m2 .
    selection-screen : end of block b3 .
    at selection-screen output.
    if s_box1 = 'X'.
    loop at screen.
    if screen-group1 = 'M2'.
    screen-active = '0'.
    modify screen.
    elseif  screen-group1 = 'M1'  .
    screen-active = '1'.
    modify screen.
    endif.
    endloop.
    elseif s_box2 = 'X'.
    loop at screen.
    if screen-group1 = 'M2'  .
    screen-active = '1'.
    modify screen.
    elseif  screen-group1 = 'M1'.
    screen-active = '0'.
    modify screen.
    endif.
    endloop.
    endif.
    while executing this one...
    while clicking S_BOX2 from S_BOX1 , S_VEND is changing to S_BUDAT but if I click again S_BOX1 this program goes to infinite loop.
    Please help me to correct this problem.
    Thankx in adv.
    Biswajit
    N.B:- This is a test code. no coding convention  is followed.

    I just copied your code and Tested it is working fine with out any problem.
    REPORT  zscreen_test_.
    TABLES:bseg,bkpf.
    SELECTION-SCREEN : BEGIN OF BLOCK b0 WITH FRAME TITLE text-000.
    SELECTION-SCREEN: SKIP 1.
    PARAMETERS: s_box1 RADIOBUTTON GROUP g1 USER-COMMAND u1 DEFAULT 'X',
    s_box2 RADIOBUTTON GROUP g1.
    SELECTION-SCREEN : END OF BLOCK b0 .
    SELECTION-SCREEN : BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
    SELECT-OPTIONS : s_vend FOR bseg-lifnr MODIF ID m1 .
    SELECTION-SCREEN : END OF BLOCK b2 .
    SELECTION-SCREEN : BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
    SELECT-OPTIONS : s_budat FOR bkpf-budat MODIF ID m2 .
    SELECTION-SCREEN : END OF BLOCK b3 .
    AT SELECTION-SCREEN OUTPUT.
      IF s_box1 = 'X'.
        LOOP AT SCREEN.
          IF screen-group1 = 'M2'.
            screen-active = '0'.
            MODIFY SCREEN.
          ELSEIF screen-group1 = 'M1' .
            screen-active = '1'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ELSEIF s_box2 = 'X'.
        LOOP AT SCREEN.
          IF screen-group1 = 'M2' .
            screen-active = '1'.
            MODIFY SCREEN.
          ELSEIF screen-group1 = 'M1'.
            screen-active = '0'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    "If you have any code next to this place that under appropriate
    "events.

  • Problem in Report selection screen

    Hi friends,
    I have a requirement to change the selection screen dynamically .
    My actual requirement is, i have there radio buttons in the selection screen ,
    based on the click of the radio button the input blocks should get changed.
    I am able to achieve that by looping the screen in the event of selection screen output.
    My problem is if i execute the report defaultly the first radio button is selected ,
    so my first selection screen block should display but this is not displaying.
    If i write code in initilization event , this works , but this event is triggering every time
    so i am unable to use this event and i am unable to set flags also to solve this  .
    Kindly Provide me a solution.
    Thanks & Regards,
    Arun.

    Hi Arun,
    I think may be you have misssed the part user command which is to be used as follows:
    PARAMETERS RAD1 RADIOBUTTON GROUP RAD
                                          DEFAULT 'X' USER-COMMAND flag.
    If its already there, kindly copy and paste your code here so that we can help you...

  • Problem in creating selection screen from screen painter

    hi ,
          i am working with screens i have created a screen and in that wehn i click report button it has to ask for select options for dates.from there i will write a select quesry based on selection dates ...how to call a selection screen from screen.i created an include and in that include i used select options.but it is showing error message .guide me how to do it ?

    Hi..
    Here for your problem,
    I have created a button with function code 'CLICK' in screen no 1000.
    when I click on the button I am capturing the ok_code and displaying the selection screen.
    ok_code = sy-ucomm.
    case:ok_code.
    when 'CLICK'.
             SELECTION-SCREEN BEGIN OF SCREEN 500 TITLE title.
             SELECT-OPTIONS: P_DATE for sy-datum.
             SELECTION-SCREEN END OF SCREEN 500.
    title = 'Input Date'.
    CALL SELECTION-SCREEN '0500'.
    endcase.
    You can also have them as subscreen by providing the required parameters in the selection screen.
    Hope this solves your problem.
    Warm Regards,
    Bhuvaneswari.

  • Problem in Call Selection Screen

    Hi,
    I am facing a problem on the call selection screen. The no. of nested screens that can be called by using call selection screen is 50. When the count reaches to 51 it is going to short dump. How can i avoid the dump. What is the system field that captures the nested screens count.
    Thanx in advance,

    Maximum number of nested CALL SCREEN is 50, I think you cannot call 51th screen in a row.
    To avoid short dump you can handle exception <b>DYNP_TOO_MANY_CALL_SCREENS</b> and give error (or information) message 'Maximum number of nested sccreen level is 50' .
      TRY .
          CALL SCREEN 100.
        CATCH cx_root .
          MESSAGE e100(00).
      ENDTRY.

  • Problem in multipule selection screens in a single report.

    Hi experts,
    I have created one report with multiple selections screen. There i am using Layouts for each screen. The problem is whenever i press F4 in layout fields it is going to display all variants, bcoz the program name is same,so how can i segregate the variants for particular selection screen. Please suggest how to do. send the code if you have.
    Thanks and regards,
    Pavan.

    check out the following documentation. use handle or logical group. you can provide any 4 char field to screen 1 and for screen 2 then fill the same when you press F4
    A variant is identified uniquely by:
    the program to which it is assigned (REPORT)
    the handle if, e.g. several lists with various structures and data are called (HANDLE) in a program (I_CALLBACK_PROGRAM)
    The handle is a unique user-assigned CHAR(4) field, which assigns the call to the current internal output table structure.
    Example:
    Various lists can be output in program x, depending on a user action.
    Display variants are to be able to be defined for each of these lists.
    This functionality is guaranteed by assigning a HANDLE for each list. If variants are saved for this program and handle, the handle must not change.
    the logical group if, e.g. the same list is made with different settings (LOG_GROUP) via different transactions
    The logical group is a unique user-assigned CHAR(4) field which determines the assignment.
    Example:
    The program x is called via the transactions T1 and T2. The field catalog fields offered to the user vary depending on the transaction code by assignment to logical groups.
    If variants are saved for the program and logical group, the logical group must not change.
    the user name, if variants are saved user-specifically (USERNAME)
    This parameter is never entered manually as the variant name is unique.
    the variant name (VARIANT).
    This parameter is only to be entered if a particular variant is to be read and the list is to be output with this variant via this structure.

  • Problem in displaying selection screen of a abap-hr report

    Hi,
    I have developed a abap-hr report in ver..6.2.I have used logical data base PNP for it.It was working fine.
    But when i migrate it into ver.4.6, I can see no selection screen for the report.
    How to get the selection-screen?
    Please help me through.
    Thanks in advance,
    Raj.
    Edited by: raj b on Feb 20, 2008 8:00 AM

    Hi Raj,
    Please check whether you have assigned any report category for the PNP selection screen in the version 6.2.
    The report category might not exist in the 4.6 version and that might be the reason the selection screen is not appearing.
    Cheers,
    Aditya

  • Problem in at selection-screen on value request

    hi friends ,
          i want to display f4 help for a field in a popup. this i can do, but this popup comes based on values
    i entered in other screen fields . but these values are not updated to screen values when i trigger f4.

    Hi,
    DATA: T_DYNPRO TYPE TABLE OF DYNPREAD,
          WA_DYNPRO LIKE LINE OF T_DYNPRO,
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_PARAM.
    WA_DYNPRO-FIELDNAME = 'Screen Field Name'.
    APPEND WA_DYNPRO TO T_DYNPRO.
    CALL FUNCTION 'DYNP_VALUES_READ'
      EXPORTING
        DYNAME                               = SY-REPID
        DYNUMB                               = SY-DYNNR
       TRANSLATE_TO_UPPER                   = 'X'
      TABLES
        DYNPFIELDS                           = T_DYNPRO
    EXCEPTIONS
       INVALID_ABAPWORKAREA                 = 1
       INVALID_DYNPROFIELD                  = 2
       INVALID_DYNPRONAME                   = 3
       INVALID_DYNPRONUMMER                 = 4
       INVALID_REQUEST                      = 5
       NO_FIELDDESCRIPTION                  = 6
       INVALID_PARAMETER                    = 7
       UNDEFIND_ERROR                       = 8
       DOUBLE_CONVERSION                    = 9
       STEPL_NOT_FOUND                      = 10
       OTHERS                               = 11
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    READ TABLE T_DYNPRO INTO WA_DYNPRO WITH KEY FIELDNAME = 'Screen Field Name'.
    TEMP = WA_DYNPRO-FIELDVALUE.
    " Select the values based on Temp and populate your internal table for F4 help using the Screen value Temp
    "Call 'F4IF_INT_TABLE_VALUE_REQUEST' and display the pop up.

  • Unusual problem(in table selection screen)

    Hi ALL,
    I HAVE A ZTABLE IN WHICH I HAVE A AUFNR FIELD.
    i have records with my username and for that record i have
    a order no i.e aufnr has a value.
    When i give the only the order number in my selection screen(se11
    ) it says
    no records found ,if i put a star at the end for the order then it
    gives me the record.
    The length of the field is 12 char
    and it has convers routine ALPHA for the domain.
    The field is AUFNR.
    The values for my record is of length 6,even if i add zeros in the front, iam not able to get that record thisis in the selection screen of SE11.
    i HAVE to RETRIEVE DATA BASED ON THIS FIELD USING SELECT statement ,BUT IT ALWAYS RETURN SY-SUBRC 4.
    cAN SOMEBODY EXPLAIN AS TO WHY IS THIS HAPPENNING AND WHAT SHOULD I DO TO OVER COME THIS
    THANKS
    Kajol

    I really think that you need to keep to the length of 12 for this field in the database and yes it would have leading zeros in the db table.  Make the field in your DB table 12,  you may have to write a conversion program to convert the field values already in the DB to 12 instead of the 10.
    Question(just curious)  why did you make the field 10 instead of 12?  Someone tell you to do that?
    My suggestion when working with custom tables that use "Standard" table fields, like AUFNR or VBELN etc, is to always use the data element which from the standard table, this way you know that the value will be stored the same way, and all will be consistant.
    Regards,
    Rich Heilman

  • Problem in designing selection screen

    Hi friends...............
    Based on one radio button i need ti disable some Mandaory fields (those are Mandaory fields).
    But here i cant overcome these mandatory fields.
    How can i do this.

    Hi,
    use the following code
    selection-screen begin of block blk11 with frame title text-002.
    *parameters : so_plant radiobutton group a USER-COMMAND fcod MODIF ID m1 DEFAULT 'X'.
    *parameters : so_ven   radiobutton group a MODIF ID m1 .
    *parameters : so_cust  radiobutton group a MODIF ID m1.
    *selection-screen end of block blk11.
    *at selection-screen OUTPUT .
    PERFORM chng_screen.
    *AT SELECTION-SCREEN.
    LOOP AT SCREEN.
       IF screen-group1 = 'M2'.
          IF screen-input NE '1'.
            v_flag = 'X'.
          ELSE.
            clear v_flag.
          ENDIF.
       ENDIF.
    endloop.
    *form chng_screen.
    *LOOP AT  SCREEN.
    if so_plant = 'X'.
      IF screen-group1 = 'M3'.
         screen-input = space.
         screen-active = 0.
         modify screen.
      ELSEIF  screen-group1 = 'M2'.
         screen-input = 1.
         screen-active = 1.
         modify screen.
      ELSEIF screen-group1 = 'M4'.
         screen-input = 1.
         screen-active = 0.
         modify screen.
       ENDIF.
    ELSEIF SO_VEN = 'X'.
      IF screen-group1 = 'M2'.
         screen-input = space.
         screen-active = 0.
         modify screen.
      elseif screen-group1 = 'M3'.
         screen-input = 1.
         screen-active = 1.
         modify screen.
      ELSEIF screen-group1 = 'M4'.
         screen-input = 1.
         screen-active = 0.
         modify screen.
       ENDIF.
    ELSEIF SO_CUST = 'X'.
       IF screen-group1 = 'M2'.
         screen-input = space.
         screen-active = 0.
         modify screen.
      ELSEIF screen-group1 = 'M3'.
         screen-input = 1.
        screen-active = 0.
         modify screen.
      ELSEIF screen-group1 = 'M4'.
         screen-input = 1.
        screen-active = 1.
         modify screen.
       ENDIF.
    ENDIF.
    *ENDLOOP.
    Thanks & Regards

Maybe you are looking for