Skip to Content

Requirement Details : Maintain data or particular columns in table depending upon Country Value

Solution :  1. Create 2 screens for your Z program via SE51.. First screen with certain fields from Ztable and other with certain fields as per your requirement

                2. Create table control via wizard with Scroll button checked for both the screens

                3. Create PF status for both custom screens in your status PBO module of respective screens

                4. Make sure you have buttons like New entry , Delete  and Display/change same as we have in SM30 maintenance tool and we can use

                    standard buttons for BACK , SAVE , CANCEL , EXIT.

                5. in TABLE_INIT_OUTPUT and User command module of respective table controls write code depending upon  User Command i.e. SY-UCOMM

                5.1. For new entries :

                       loop at screen.

                           screen-input = 1.

                           modify screen.

                       endloop.

                 5.2.  For display/change : here we will loop key fields onwards i.e. they are non editable while maintaining entries e.g. if we have first 3 as key then

                         loop at screen where index GT 3.

                             if screen-name eq ‘ZABC’ and screen-input = 1.

                                     screen-input = 0.

                                     modify screen.

                              else

                                    screen-input = 1.

                                     modify screen.

                           endif.

                       endloop.

                      likewise repeat for fields other than key fields make sure screen-name is in  upper case.

               5.3.  For Delete/Save : Please use insert , modify and delete and make sure to perform these operations on table control itab as well.

            6. When coming back from custom screens please make use of call selection screen statement and set screen 0/ leave to screen 0 statements.

P.S. : Make sure here my requirement was based on country so I will call custom screen base on country value and then on BACK please set screen 0 to

          ensure proper functionality working.

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply