Skip to Content
author's profile photo Former Member
Former Member

Loop at screen wit h checkbox

selection-screen : begin of block b1.

parameters : p_dl as checkbox ,

p_file type rlgrap-filename modif id FIL.

Hi all,

Requirement here is

Having two selection screen parameters

1. Check box for download 2. File .

if i didnt select the checkbox it should disable.

If i check the checkbox, the file parameter should enable

after execution the file field is disable ,but in the selection screen when i select the check box, it is not enable mode.

will anybody try the code in your sys and let me know.

selection-screen : end of block b1.

at selection-screen output.

if p_dl = 'X'.

loop at screen.

if screen-group1 = 'FIL'.

screen-input = '1'.

modify screen.

endif.

endloop.

else.

loop at screen.

if screen-group1 = 'FIL'.

screen-input = '0'.

modify screen.

endif.

endloop.

endif.

its urgent.

REgards..

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Feb 20, 2008 at 07:46 AM

    Check below example:

    PARAMETERS: p_dl AS CHECKBOX USER-COMMAND abc,
                p_file TYPE localfile.
    
    AT SELECTION-SCREEN OUTPUT.
    
      LOOP AT SCREEN.
        IF screen-name CP '*P_FILE*'.
          IF p_dl IS INITIAL.
            screen-active = 0.     " File Parameter Invisible
          ELSE.
            screen-active = 1.     " File Parameter Visible
          ENDIF.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Remember i have answered this question in your other thread. Anyhow, validating the EAN in the sense you need to check if any material exists with this external identification number. So you can do that as below:

      SELECT SINGLE ean11 INTO p_ean11 FROM mara WHERE ean11 = p_ean11.
      IF sy-subrc NE 0.
         MESSAGE e001(00) WITH 'Invalid EAN!!!'.    "Error Message
      ENDIF.
      
      EAN's are not pre-defined, they can vary time to time for the same material. So only means to check is from material master unless maintained is other specifically designed tables.

  • author's profile photo Former Member
    Former Member
    Posted on Feb 20, 2008 at 07:45 AM

    Hi ,

    Basically, when you select/deselect the checkbox, the PBO of the selection screen (AT SELECTION-SCREEN OUTPUT event) needs to be called again, so that that modify screen command works , for this fo the following:

    PARAMETERS: p_dl AS CHECKBOX USER-COMMAND one.

    Cheers,

    Aditya

    Edited by: Aditya Laud on Feb 20, 2008 2:45 AM

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.