Empty LOOP AT SCREEN

MODULE screen_attributes OUTPUT.
  LOOP AT SCREEN.
  ENDLOOP.
ENDMODULE.
What is the effect of this code?

Hi,  Loop at Screen is used to set or access the screen attributes which you might have defined in the screen layout.
Is this what you want ? Let me know..
The Code which you had written does nothing.. It just loop at all your screen attributes.
Regards,
Swaroop patri

Similar Messages

  • Loop at Screen problem

    Hi,
    I am facing a few hicups in my code, I needed to make certain FIelds as updateable and some as non updateable but the problem is that this is not happening. Can you tell me where i am going wrong. I have written this code in my PBO at the end. The Code should enable FIELD KAWRT for the 1st Line and disable the rest, while for the others it should enable Field KWERT. what is the problem in my code.
      LOOP AT itab.
        IF sy-tabix = 1.
          LOOP AT SCREEN.
            IF screen-name = 'ITAB-KSCHL' OR
               screen-name = 'ITAB-KBETR' OR
               screen-name = 'ITAB-KWERT'.
              screen-input = '0'.
              screen-output = '0'.
              MODIFY SCREEN.
            ELSEIF screen-name = 'ITAB-KAWRT'.
              screen-input = '1'.
              screen-output = '1'.
              MODIFY SCREEN.
            ENDIF.
          ENDLOOP.
        ENDIF.
        READ TABLE i_kschl WITH KEY kschl = itab-kschl.
        IF sy-subrc = 0.
          LOOP AT SCREEN.
            IF screen-name = 'ITAB-KSCHL' OR
               screen-name = 'ITAB-KAWRT' OR
               screen-name = 'ITAB-KBETR'.
              screen-input = '0'.
              screen-output = '0'.
              MODIFY SCREEN.
            ELSEIF screen-name = 'ITAB-KWERT'.
              screen-input = '1'.
              screen-output = '1'.
              MODIFY SCREEN.
            ENDIF.
          ENDLOOP.
        ENDIF.
      ENDLOOP.

    Hi,
    Its happening so because as in your code:
    LOOP AT itab.
    IF sy-tabix = 1.
    LOOP AT SCREEN.                             "This is executed for the First Time That's *FINE*
    IF screen-name = 'ITAB-KSCHL' OR
    screen-name = 'ITAB-KBETR' OR
    screen-name = 'ITAB-KWERT'.
    screen-input = '0'.
    screen-output = '0'.
    MODIFY SCREEN.
    ELSEIF screen-name = 'ITAB-KAWRT'.
    screen-input = '1'.
    screen-output = '1'.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    ENDIF.
    READ TABLE i_kschl WITH KEY kschl = itab-kschl.   
    *THIS PART OF CODE IS EXECUTED ALWAYS WHICH YOU DON'T  WANT SO THIS  SHUD BE IN ELSE PART OF _*IF SY-TABIX = 1**_                                             
    IF sy-subrc = 0.
    LOOP AT SCREEN.
    IF screen-name = 'ITAB-KSCHL' OR
    screen-name = 'ITAB-KAWRT' OR
    screen-name = 'ITAB-KBETR'.
    screen-input = '0'.
    screen-output = '0'.
    MODIFY SCREEN.
    ELSEIF screen-name = 'ITAB-KWERT'.
    screen-input = '1'.
    screen-output = '1'.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    ENDIF.
    ENDLOOP.
    DO LIKE:
    LOOP AT itab.
    IF sy-tabix = 1.
    LOOP AT SCREEN.                     
    ENDLOOP.
    ELSE.
    READ TABLE i_kschl WITH KEY kschl = itab-kschl.   
    ENDIF.

  • Doubt in loop at screen

    i am using two dates in the selection screen one is ERDAT and another is BNDDT.
    these two fileds are obligatory.
    i am using radiobutton to enable these field. look at my coding
      IF p0 = 'X'.
        LOOP AT SCREEN.
          IF screen-name = 'S_BNDAT-LOW' OR
             screen-name = 'S_BNDAT-HIGH' OR
             screen-group1 = 'SC1'.
             screen-input = '0'.
            MODIFY SCREEN.
            CLEAR screen.
          ENDIF.
        ENDLOOP.
      ENDIF.
      IF p1 = 'X'.
        LOOP AT SCREEN.
          IF screen-name = 'S_ERDAT-LOW' OR
             screen-name = 'S_ERDAT-HIGH' OR
             screen-group1 = 'SC1'.
            screen-active = '0'.
             MODIFY SCREEN.
            CLEAR screen.
          ENDIF.
        ENDLOOP.
      ENDIF.
    if i select p1 ,the screen displays error message like fill in all required entry.
    if the fileds are not obligatory its working fine.
    how to over come this.
    Regards,
    Bala
    Code Formatted by: Alvaro Tejada Galindo on Jan 8, 2009 2:48 PM

    hi..
    step 1) just use "MODIFY ID "  for the field in your selection-screen to make it into one group.
    EX:
    select-options:   s_cajo  for  tcj_documents-cajo_number
                                   modif id cas.
    step2) in your at selection-screen .
    just loop the screen and make it required..as follows:
    EX:
        loop at screen.
          if screen-group1 = 'CAS'.
            screen-required = 1.
           screen-input     = 0.
            screen-active    = 1.
            endif.
          modify screen.
        endloop.
    I think it will helps you..
    UR's
    GSANA
    Code Formatted by: Alvaro Tejada Galindo on Jan 8, 2009 2:49 PM

  • Loop at screen in CJR2 layouts (or KPP1L management ) ?

    Hi to all,
    I need to make as input fields (and consquently,  to disable as input fields at some other conditions) the layouts on CJR2 transaction .
    In my case it is available an include custom (as a standard modification ) in which I can use "loop at screen" instruction. But in certain case I've seen that other programmers have used an internal table based on structure KPP1L to handle input/output fields on screen (but this solution in certain case doesn't work properly ). Any suggestion or ideas ?
    Which solution is better in your opinion ?
    Thanks in advance
    Andrew

    Hi to all,
    I need to make as input fields (and consquently,  to disable as input fields at some other conditions) the layouts on CJR2 transaction .
    In my case it is available an include custom (as a standard modification ) in which I can use "loop at screen" instruction. But in certain case I've seen that other programmers have used an internal table based on structure KPP1L to handle input/output fields on screen (but this solution in certain case doesn't work properly ). Any suggestion or ideas ?
    Which solution is better in your opinion ?
    Thanks in advance
    Andrew

  • Loop At Screen to change input field.

    Hello Experts,
    I have a screen which have a pf status on which there is a &change button as well as a save button. I want to loop at screen when the button is clicked to make the fields editable except the first field. When i click save button, the field goes back to uneditable.
    My codes:
    IN PAI:
    CASE OK_CODE.
        WHEN '&CHANGE'.
                  LOOP AT SCREEN.
                        screen-input = 1.
                        screen-output =0.
                  ENDLOOP.
    ENDCASE.
    Any help please?
    Moderator message: There is no point in continuing the discussion as same answer is getting repeated several times. Please search and read to understand the basics of Loop at Screen. Thread locked.
    Message was edited by: Manish Kumar

    Hi Hassim,
    In PBO section.
         LOOP AT SCREEN.
          IF ok_code(sy-ucomm)  = '&CHANGE' .
            IF SCREEN-NAME = 'Field1'.
              SCREEN-INPUT = '0'.
              SCREEN-OUTPUT= '1'.
             ELSE.
              SCREEN-INPUT = '1'.
              SCREEN-OUTPUT= '0'.
            ENDIF.
          ELSE.
              SCREEN-INPUT = '0'.
              SCREEN-OUTPUT= '1'.
            ENDIF.
          ENDIF.
          MODIFY SCREEN.
        ENDLOOP.

  • Table ctrl - no screen-name - hav groupid but not visible in Loop at screen

    Hi...
    In pa30, for a pernr, of infotype 0008, we have a table control.
    In that table control, i hav to hide a field. ex: bet01
    it has value..by default it will appear on the screen...
    Now I want this value not to appear on the screen.
    in loop at screen, i am not able to find the sceen-name(Q0008-bet01 or no Q fields...)
    It loops for all the p fields..and exits the loop.
    How can I hide the q fields..
    I have tried with groupids...but, in loop at screen unable to find the groupids...so no use..
    screen name and groupid are there for this field...
    Any solution???????????

    Hi...thanks for ur reply...
    Not that helpful...
    I hav the groupID..screen-name...
    But the problem is, the loop at screen is not going through this groupid or screen-name...
    And if u have any sample code, plz share it..
    I cant modify the data coming to table control...access problem...
    If u have anyother solution, please give it..Anyways thanks once again for ur reply!
    Experts, no solution??? No alternative???
    Edited by: Veeranji Reddy on Nov 13, 2008 3:22 PM
    Edited by: Veeranji Reddy on Nov 14, 2008 5:49 AM

  • Loop at screen - not all fields are available

    Hi all,
    I want to set some fields on the screen invisible.
    When I do the loop at screen in PBO not all fields from the screen are available.
    Just four fields are available. In the screen there are about 20 fields.
    I try to use the chain. field xyz. endchain... But it was not the problem.
    Any ideas?
    regards

    Try this ,May be  Help ful
    { SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(10)  FOR FIELD r_cars.
    PARAMETERS : r_cars RADIOBUTTON GROUP rgb USER-COMMAND usd .
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 20(10)  FOR FIELD r_toyota .
    PARAMETERS : r_toyota RADIOBUTTON GROUP rgb1 DEFAULT 'X'.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 20(10)  FOR FIELD r_ford .
    PARAMETERS : r_ford RADIOBUTTON GROUP rgb1 .
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(10)  FOR FIELD r_bus .
    PARAMETERS : r_bus RADIOBUTTON GROUP rgb DEFAULT 'X'.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 20(10)  FOR FIELD r_volvo .
    PARAMETERS : r_volvo RADIOBUTTON GROUP rgb2 .
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 20(10)  FOR FIELD r_merced .
    PARAMETERS : r_merced RADIOBUTTON GROUP rgb2  DEFAULT 'X'.
    SELECTION-SCREEN END OF LINE.
    AT SELECTION-SCREEN OUTPUT.  " AT SELECTION-SCREEN OUTPUT
      IF r_cars = 'X'.                                 " If R_CURS radiobutton is selected
        LOOP AT SCREEN .                       " Looping at screen
          IF screen-name CS 'R_VOLVO' OR
             screen-name CS 'R_MERCED'.
            screen-active = 0.                     " Hiding the R_VOLVO and R_MERCED
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ELSE.
        LOOP AT SCREEN .
          IF screen-name CS 'R_TOYOTA' OR
             screen-name CS 'R_FORD'.
            screen-active = 0.
          ENDIF.
          MODIFY SCREEN.
        ENDLOOP.
      ENDIF. }

  • LOOP AT SCREEN

    HI experts!!
    I have a screen 9100 which displays an ALV Grid for the table SFLIGHT and contains two buttons: NEW and MODIFY.
    The two buttons both CALL SCREEN 9200 containing all the fields of SFLIGHT..
    I want when i click the NEW button, all fields are enabled in the screen 9200 and data can be inserted and when i click the MODIFY button after selecting a row in the ALV, the screen 9200 appear with Key fields are disabled and the remaining fields can me modified.
    On screen 9200 there is are buttons SAVE and CANCEL.
    Waiting for your solutions....
    Thank you in aniticipation..
    Regards,
    Yahsaar

    Hi,
    If i understand your problem correctly then you dont need LOOP AT SCREEN.
    as the element on the Screen is the container.
    the ALV is being displayed in that container.
    so you will have to code  the al TO make it editable by checking SY-UCOMM.
    check the below links for the same
    [http://wiki.sdn.sap.com/wiki/display/Snippets/ALV-Editingandsavingtheeditedvaluesin+Database(OOPS)]
    [Re: Get Selected Rows in OOPS ALV;

  • Maintenance View: Loop at screen!

    hi,
    I created a view maintenance on Ztable.
    This table contains 3 fields.
    I want to display one of this fields in "Display Mode" when the user Create/change the table in sm30.
    There is an event in maintenace view that allow me to do this?
    Thank you
    Joseph

    Hi,
    Generate a table maintenance for Z table you created in SE11->Utilities->Table Maintenance Generator.Give appropriate authorisation group while genearting table maintenance.
    Once it's get generated.Then click function group->Main program.
    Uncomment the PBO Include which appears as commented.Give it suitable name.
    Then in the PBO write the following.,
    module display.
    module display output.
    LOOP AT SCREEN.
      if screen-name = 'ZZZtable-FIELDNAME'.
          screen-input = '0'.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    endmodule.                
    Hope it helps.If so,reward points.Otherwise ,get back.

  • HR ABAP: LOOP AT SCREEN: Multiple Fields Disabling.

    Experts,
    Am a new member in the world of SAP ABAP!
    Need ur advice regarding.
    Have coded following for disabling a field in PBO based on subtypes.
        IF p9235-subty = GC_AICTD.
          IF screen-name = 'P9235-ZZ_RC_MDE'.
            screen-active = 0.
            MODIFY SCREEN.
          ENDIF.
        ENDIF.
    This disables the particular field mentioned in the screen name.
    If i want more than on field names to be disabled under single validation, then what should i do?
    Your help to this fresher would be appreciated!
    Points will be definitely rewarded for your help and time...
    Thank you.
    Sundar.

    *&      Module  display  OUTPUT
          text
    MODULE display OUTPUT.
    *break-point.
    loop at screen.
    if create = 'X'.
      if screen-group1 = 'XXX'.
      screen-input = 1.
      modify screen.
      endif.
    endif.
    if display = 'X'.
      if screen-group2 = 'YYY'.
    screen-input = 0.
      modify screen.
      endif.
    endif.
      endloop.
    ENDMODULE.                 " display  OUTPUT
    but declare the group!

  • In Twitter & tweet contains TMI-when I click on link to open it I get an empty TMI.me screen. Started a few days ago. Tried Explorer & it works so it is definitely a Firefox problem. Can anyone tell me how to resolve it?

    When in Twitter & someone tweets using TMI - when I click on the link to open it I get an empty TMI.me screen. This is a new problem - started a few days ago. In frustration I tried Explorer today to see if I have the same problem there & I don't so it is definitely a Firefox problem. Can anyone tell me how to resolve it? Wld hate to have to use Explorer!

    Clear the cache and the cookies from sites that cause problems.
    "Clear the Cache":
    *Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    "Remove Cookies" from sites causing problems:
    *Tools > Options > Privacy > Cookies: "Show Cookies"
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • Need help for loop at screen

    Hi All,
    This is Rajani. I need help on LOOP AT SCREEN statement.
    I have 3 selection blocks in the selection screen.
    First block contains two radio buttions, the second block contains 6 parameters and the third block contains 3 parameters.
    If the first radiobutton is selected, then the parameters in the third block should be grayed out.
    In the similar way for the second radiobutton.
    Please let me know my mistake from the following code :
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
      PARAMETERS : P_SALES TYPE C RADIOBUTTON GROUP G1 MODIF ID R1,
                   P_OPS   TYPE C RADIOBUTTON GROUP G1 MODIF ID R1,
                   P_MONTH TYPE SPMON OBLIGATORY MODIF ID R1.
    SELECTION-SCREEN END   OF BLOCK B1.
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
      PARAMETERS : P_SADIS TYPE BZIRK MODIF ID M1,
                   P_CUGRP TYPE KDGRP MODIF ID M1,
                   P_SADCH TYPE VTWEG MODIF ID M1,
                   P_SADIV TYPE SPART MODIF ID M1,
                   P_CUPAR TYPE HIEZU04 MODIF ID M1,
                   P_MAGRP TYPE MVGR1 MODIF ID M1,
                   P_PRHIE TYPE PRODH1 MODIF ID M1.
      SELECT-OPTIONS:  S_MATNR FOR S889-MATNR.
      PARAMETERS :     P_PLANT TYPE WERKS_EXT.
    SELECTION-SCREEN END   OF BLOCK B2.
    SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-003.
        PARAMETERS :  P_WERKS TYPE WERKS_EXT MODIF ID M2,
                      P_MATGR TYPE PMNUX MODIF ID M2,
                      P_MRPCN TYPE DISPO MODIF ID M2.
    SELECTION-SCREEN END   OF BLOCK B3.
    *INITIALIZATION.
    AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
      IF SCREEN-GROUP1 = 'M1'.
        IF P_OPS = 'X'.
          SCREEN-INPUT = '0'.
        ENDIF.
        MODIFY SCREEN.
      ENDIF.
        IF SCREEN-GROUP1 = 'M2'.
        IF P_SALES = 'X'.
          SCREEN-INPUT = '0'.
        ENDIF.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.

    Hi,
    This is your expected solution.
    TABLES: mara.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS : p_sales TYPE c RADIOBUTTON GROUP g1 USER-COMMAND ucom   DEFAULT 'X',  "MODIF ID r1
    p_ops TYPE c RADIOBUTTON GROUP g1 .  "MODIF ID r1
    PARAMETERS: p_month TYPE spmon OBLIGATORY ." MODIF ID r1
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
    PARAMETERS : p_sadis TYPE bzirk MODIF ID m1,
    p_cugrp TYPE kdgrp MODIF ID m1,
    p_sadch TYPE vtweg MODIF ID m1,
    p_sadiv TYPE spart MODIF ID m1,
    p_cupar TYPE hiezu04 MODIF ID m1,
    p_magrp TYPE mvgr1 MODIF ID m1,
    p_prhie TYPE prodh1 MODIF ID m1.
    SELECT-OPTIONS: s_matnr FOR mara-matnr.
    PARAMETERS : p_plant TYPE werks_ext.
    SELECTION-SCREEN END OF BLOCK b2.
    SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
    PARAMETERS : p_werks TYPE werks_ext MODIF ID m2,
    p_matgr TYPE pmnux MODIF ID m2,
    p_mrpcn TYPE dispo MODIF ID m2.
    SELECTION-SCREEN END OF BLOCK b3.
    AT SELECTION-SCREEN.
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF p_sales = 'X'.
          IF screen-group1 = 'M2'.
            screen-input = '0'.
          ENDIF.
        ENDIF.
        IF p_ops IS NOT INITIAL.
          IF screen-group1 = 'M1'.
            screen-input = '0'.
          ENDIF.
        ENDIF.
        MODIFY SCREEN.
      ENDLOOP.
    Close this thread if you got soloution.
    Regards,
    Peranandam

  • Looping login screen in Crystal Reports for Visual Studio 2008

    Hello,
    I am using Visual Studio 2008 with the Crystal Reports Basic for Visual Studio 2008. Visual Studio and the Crystal Reports Basic Runtime for Visual Studio 2008 (x64) are installed on both the development and production boxes.  I am using Crystal Reports via Visual Studio and do not have the full blown version of Crystal Reports installed on my machine.
    We have used Visual Studio to create an aspx webpage and would like to use Crystal Reports to display a graph. The report displays fine in debug mode, but displays a looping login screen when moved into production on the web server. The web server is using Windows Server 2008 (x64) with IIS 7. We have tried passing the logon parameters to the crystal report during the page init event with the auto-bind feature enabled on the crystal report viewer. A MySQL database provides the data for the report. All ODBC data sources have been configured the same on both machines. 
    Any help would be greatly appreciated!  Thanks!

    Hello,
    Use a tool called ProcessMonitor from Microsoft and watch what happens when you try to log on.
    Also can you verify you created your DSN using the 64 bit ODBC Admin and that you are using a System DSN so IIS can find it.
    And that the MySQL ODBC drive is also 64 bit?
    If you can read ODBC trace logs you could enable it also and see what error you are getting.
    Thank you
    Don

  • Albums appear empty in full screen mode

    In full screen mode some of my albums show up as empty. These albums can be accessed from the regular (non-full screen) view. Once the album is accessed in regular screen mode, I can swith to full screen mode and see the photos, but when I hit the "All Albums" button, iPhoto (9.4.1) goes back to reporting that the ablum is empty. Anyone have any experience with fixing this issue?

    Can't edit so I'll have to reply...
    Big screw up at my end. I have albums in folders, and without that hierachical structure it was very easy for me to confuse one album with another. It turns out that all the albums were the same in both views. Empty in regular view and empty in full screen view, it's just I couldn't tell which was which.
    My bad.

  • How we can loop the screen table.

    Hi All,
    We are used loop the screen table but it is a structure how we are able to do this what sap doing behind this can any body please tell me.
    Thanks,
    Saleem.

    Hi
    SCREEN is a structure only.
    But when you create a screen or selection-screen; the program which controls your screen or selection-screen creates an internal table with header line of type SCREEN.
    So in your program SCREEN is an internal table, you can always loop it.
    To understand it better, write some parameters and select-options in a report program; in debugging mode see the details of SCREEN table.
    Regards
    Surya.

Maybe you are looking for

  • Error while loading shared libraries: libsqlplus.so

    Hi After upgrading from 11.1.0.6 to 11.1.0.7 on linux. I get the below error: cd $ORACLE_HOME/bin ./sqlplus ./sqlplus: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory There was no error m

  • N9 is better??? What can I do??

    Hallo everybody!! I need your help... thanks for your time reading that- and sorry if I am writing something out of the subject here. I have an older Nokia phone, N82 and I saved money to buy a N9 since last year that I saw it. I want a good camera N

  • Bookmarks failing to export to PDF properly FIXED!

    I have been plagued by the bug that has affected many others with my exported PDF having the random bookmark (or perhaps all bookmarks in the document) that point to either the wrong page or no page. This requires manually fixing the bookmarks with A

  • Query Not working with Keyword search

    I need to search based on the keywords from the client. See my query. The intent is to search the DB table the Users entered Keyword 'Har' I need to get from Columns "CompanyName","Franchise" and "Category " all the Records where the Country is USA,

  • Why i can't download on Nokia C2-03?

    I try to download files such as games or applications, but i got the errorr 006. What is that