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

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.

  • 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!

  • 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

  • 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.

  • I just purchased monthly plan for creative cloud.  I understood the plan included photoshop.  But no idea how to open photoshop app.  just keep looping into screens which instruct me to purchase creative cloud.  hugely frustrating.   on hold forever with

    i just purchased monthly plan for creative cloud.  I understood the plan included photoshop.  But no idea how to open photoshop app.  just keep looping into screens which instruct me to purchase creative cloud.  hugely frustrating.   on hold forever with customer service.

    First check to see your plan is active: Adobe ID
    Try launching Photoshop choosing Trial instead of a purchase.
    Mac             /Applications/Photoshop CC/Photoshop CC.app
    Windows  C:\Program files\Adobe\Adobe Photoshop CC\Photoshop CC.exe
    Then once inside, go to Help > Sign in...  There, use the email address and password for your account and it should activate.
    If that does not work, could you tell me what version of PS you have and what os version you are using?

  • Looping through screens in BDC

    Hi All,
    I am trying to create a BDC program in which I have one requirement of looping through screens (PO10 - Relationships Tab).
    I have to loop through each relationship until i get B-012 relationship. So how to achieve this requirement. Please help
    Thanks,
    Shailesh

    Hi Shailesh,
    You have not specified what you are trying to achieve by looping through to that relationship. If you are trying to change the relationship then you can directly create and system by default will delimit the old relationship based on the Time Constraint.
    Regards
    Bala

  • 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

Maybe you are looking for

  • What are the best settings to convert .mts files to Prores

    Hi friends, Trying to figure out some settings. I am a novice editor so please forgive lame terminology in advance: I have footage shot on a Canon Vixia HF M500. I am editing in Premiere Pro CC on a MAC with OS 10 Mavericks. I tried editing directly

  • Help needed to solve "java.io.NotSerializableException: java.util.Vector$1"

    hi to all, i am using a session less bean A to querry a Entity Bean B , which inturns calls another EntityBean C , finally a ' find' method is invoked on the EntityBean C, In this a vector is created which holds 3 different vectors at different index

  • BPEl Human Activity Issue - Reject case is not working

    Hi All, I have bpel processs. It is works like this: It has a human task for approval from manager with ACCEPT or REJECT as outcomes. Once the manager Accepts the request, the initiator (say applicant) should get a email updating the status as accept

  • Connecting an Iphone to an Imac

    I download ICreate mag to my Iphone. How can I connect my Iphone to my Imac so I can read it on my Imac. There is a mini DVI port on my Imac is it possible? What would I need to connect the Iphone to my television? I would prefer to use my Imac. Than

  • Cost center determination

    Dear SAP gurus, In my present client the requirement is to determine cost centers based on performing unit. As we know in NCOP the Cost center is determined by Requesting unit /Requesting nursing unit. I tried for several devlopments but the cost cen