Control Mandatory fields on custom screen in Module pool program

Hello all,
I have developed a custom screen on which I have a table control with 5 fields. I wanted to make the first three fields mandatory. So instead of selecting the entry as "required" from the screen attributes for these input fields, I have looped at table screen in PBO and based on the screen name and screen group I have set the field screen-required = 1. By doing this, I could make these 3 fields mandatory.
Now, when I enter the data for the first line and press enter, it is asking me to fill the required fields in the second line and so on.How can I avoid this without having to remove the mandatory symbol in the subsequent lines?
There is an altenative way of achieving this by not making the fields mandatory on the screen but while saving we can check if the value is entered and raise a message. In this scenario the user would not know that they are obligatory fields until he hits save button.
For example, in standard transaction VK12, if we select condition type K005 and go to the maintenance, we see that material is obligatory.
After entering material in first line and when I hit enter, it does not ask me enter the material in the second and subsequent lines even though it is a mandatory field.
I want to achive this functionality in my custom screen also.
Can anyone let me know how to handle this?
Thanks,
Sandeep.

sandeep akula wrote:
I have developed a custom screen on which I have a table control with 5 fields. I wanted to make the first three fields mandatory. So instead of selecting the entry as "required" from the screen attributes for these input fields, I have looped at table screen in PBO and based on the screen name and screen group I have set the field screen-required = 1
Why didn't you set these fields as required on the attributes? That has to be the easiest way.
Rob

Similar Messages

  • Call report selection screen in module pool program with tab strip control

    Hi,
    Could anyone explain in detail to call report selection screen in module pool program with tab strip control.
    Thanks
    Mano

    Hi,
    Refer std program:
    demo_sel_screen_in_tabstrip.
    demo_sel_screen_with_tabstrip.
    Call your program with SUBMIT stmt form module program.
    Reward points if this Helps.
    Manish

  • Uploding sub screens in module pool programs

    HI,
       Can any one help in uploading sub screens in module pool program .
    Regards,
    Mahendra.

    Hi
    Debugging of module pool is same as reports, use /h or put breakpoint
    but u shud know what u want to check
    there are generally two event used in module pool
    PBO
    This event is used before displaying the screen,It is used to clear fields table, show table control, tabstrip and most important conditionally modify the scrren .
    PAI
    is used to validate the fields which are entered on the screen with database values and then fetch records from table.
    i mean all values to make available in internal table
    now u would be sure which part u want to debug.
    <REMOVED BY MODERATOR>
    Regards,
    Chandru
    Edited by: Alvaro Tejada Galindo on Feb 19, 2008 6:19 PM

  • Is it possible to print the current screen in Module pool program(Dynpro)?

    Is it possible to print the current screen in Module pool program(Dynpro)?
    I create a Module pool program , and customer hope can print the screen when they click print button, Is it possible?

    Does the customer want a screen shot or what? Please elaborate on your requirement.
    Maybe you should create a smartform first, which is called when one clicks on print button. But in fact, we need a bit more info than this.

  • How to get the cursor position from screen in module pool program

    Hi,
    I am doing the module pool program, I have one table control in one screen.
    I have to give functionality to the user that when the user enters first record in the table control and after filling the last field
    when he presses enter the cursor will have to come in the starting field of the second record.
    I know the logic , but i m bit confused.
    Can any body help me to solve this....
    thanks

    Hi,
    Check this code,
    Write it in the PBO
    MODULE SET_CURSOR_WERTKONTRAKT.
    MODULE SET_CURSOR_WERTKONTRAKT OUTPUT.
      PERFORM SET_CURSOR USING 'VBAP-ZWERT'.
    ENDMODULE.                 " SET_CURSOR_WERTKONTRAKT  OUTPUT
    FORM SET_CURSOR USING US_FELDNAME.
      DATA: DA_TFILL LIKE SY-TFILL.
      DESCRIBE TABLE IVBAP LINES DA_TFILL.
    FCODE 'Create Position':
    ==> Cursor to the first free line set to make the new position
    Can be created directly
        IF DA_TFILL EQ 0.
          SET CURSOR FIELD US_FELDNAME LINE 1.   -> set cursor position
        ELSE.
          SET CURSOR FIELD US_FELDNAME LINE 2.
        ENDIF.
    Product proposal actively
    Set ==> cursor in the first row
      IF DPP_ACTIVE   EQ CHARX AND
         XVBAP_UMFANG_OPV IS INITIAL.
    in the 'target volume' if available
        IF KOPGR_MIT_ZMENG CS TVAK-KOPGR.
            SET CURSOR FIELD 'VBAP-ZMENG' LINE 1.
            EXIT.
        ELSE.
    Else in the field 'Order quantity'
          SET CURSOR FIELD 'RV45A-KWMENG' LINE 1.
          EXIT.
        ENDIF.
      ENDIF.
    Hope it helps you,
    Regards,
    Abhijit G. Borkar

  • Checking Records in multiple screens using module pool programming

    Hi,
        I created student registration form using module pool programming.In first SCREEN i designed like the Below.
              Name:     <INPUT/OUTPUT Field>
             Emailid:    <INPUT/OUTPUT Field>
             Password:<INPUT/OUTPUT Field>
              CREATE<Push Button>    SIGNIN<Push Button>       cancel<Push Button>
    in  screen 1000 I created like the above screen and i wrote the code for it.It's successfully inserted records in ZSTUDENT database.
    BUT
        when i call the second screen 2000.I design the screen like below.And database table is ZSTU_LOGIN.
          username : <INPUT/OUTPUT Field>
         password  : <INPUT/OUTPUT Field>
             LOGIN<push Button>   EXIT<Push Button>
    AND i created Third screen 3000.Like full of detail of student details like First Name,Last Name,DOB,Education Details,Contact Details etc...
    BUT I'm facing the pbm is
                  whatever the record is stored in table ZSTUDENT-Name & password when i call the screen 2000 that USERNAME & PASSWORD are same
    Then go to THIRD screen 3000.BUT i wrote the code for second screen 2000 by using SELECT statement.without my code check it will go to third
    screen 3000 By the Statement of Call screen 3000.
    PLZ any one help me HOW to CHECK the Exact Record From second Screen 2000 to First Screen 1000.
    HOW to Check the code AND can u provide me any code available.
    thanks,
    Anusha

    Hi vikram,
        I wrote the code for screen 2000 like below.
    MODULE STATUS_2000 OUTPUT.
    *  SET PF-STATUS 'xxxxxxxx'.
    *  SET TITLEBAR 'xxx'.
       TABLES : ZSTUDENT_ENTER.
      TYPES: BEGIN OF ST_TAB1,
          USERNAME TYPE ZSTUDENT_ENTER-USERNAME,
         PASSWORD1 TYPE ZSTUDENT_ENTER-PASSWORD1,
         END OF ST_TAB1.
       DATA : W_TAB1 TYPE ZSTUDENT_ENTER.
       DATA : IT_TAB1 TYPE STANDARD TABLE OF ZSTUDENT_ENTER.
       DATA : USERNAME TYPE CHAR50,
             PASSWORD1 TYPE CHAR25.
    ENDMODULE.                 " STATUS_2000  OUTPUT
    *&      Module  USER_COMMAND_2000  INPUT
    *       text
    MODULE USER_COMMAND_2000 INPUT.
    CLEAR W_TAB1.
       MOVE-CORRESPONDING W_TAB TO W_TAB1.
    IF SY-SUBRC EQ 0.
       SELECT SINGLE MAILID PASSWORD
         INTO CORRESPONDING FIELDS OF W_TAB
           FROM ZSTUDENT_INFO
           WHERE USERNAME = W_TAB-MAILID AND
                PASSWORD1 = W_TAB-PASSWORD.
           CALL SCREEN 2000.
           ENDSELECT.
                 ELSEIF SY-SUBRC NE 0.
               MESSAGE 'INVALID USERNAME/PASSWORD'.
               ELSEIF SY-UCOMM = 'LOGIN'.
                 CALL SCREEN 3000.
                 ENDIF.
    ENDMODULE.                 " USER_COMMAND_2000  INPUT
    But i could not found whether code is write or not.
    syntax error is USERNAME is Unknown.
    could solve me my pbm anybody.....
    Thanks,
    Anusha

  • Making a screen in module pool program web based

    I have developed a module pool program with screens and flow logic. I want to make that application web based. Is there any option to make it web based or I have to write the fresh application in bsp. Please suggest

    Sucheta,
    You unfortuantely need to re-write that application as BSP.  If you separated your business logic from the screen logic, then all you will need to do is rewrite the screen logic and not the whole application.
    Take care,
    Stephen

  • How to remove the print popup screen from module pool program

    Hi,
    In my project i am having one module pool program in which 7-8 screens are there.
    In the initial screen after entering the equipment number when i am executing the program then after loading second screen
    it is showing one screen is coming which is asking to print the content of the page.
    I want to remove this screen (printing popup) but i am not able to get the code or setting for it.
    Please help me to solve this problem.
    Thanks and regards.

    I think this is more to do with ABAP than EP so, the corresponding sections of forum could prove more helpful on this...
    Thanks,
    H

  • CURRENCY FIELD IN TABLE CONTROLLS OF MODULE POOL PROGRAM

    Hi All.
    I am fasing an issue in module pool.
    I am using a table controll to display the data on the screen.
    There is  one field of currency type .
    the amount in that field is -ve(Negative) then the program giving a short dump by saying that the problem is  in the conversion.
    if the field is + ve(means  no sign) it's executing fine.
    Can any body help me to solve this issue,
    Thanks in advance,
    regards,
    venkat

    Hi Venkat,
    Open the screen painter (SE51) and go to the currency field in the table control on the screen. In the "TEXT" field in the toolbar, delete a character (_) and type in "V" as the last character. The issue should be solved.
    Regards,
    Manoj

  • Selection screen in module pool programming..

    hi,
    I designed some screen elements for KUNNR and MATNR and handled their value selection thru POV request.
    I want to select data from my table using these values. Will a simple select statement with AND condition on these values work ? I doubt as even if the user does not enter value for one of these, my select is giong to fail. for e.g. he enters value for KUNNR but not for MATNR.
    If that is so then shud i need to design a screen which must display select options like for KUNNR, MATNR etc ? if yes then the value that is displayed there when user selects F4 must be controlled by me. how to design this in module pool ?? where to write statements related to selection screen definition and how to handle its selection ?
    thks

    it is possible.
    I am involved in this topics check my post for one method .
    https://forums.sdn.sap.com/click.jspa?searchID=14529204&messageID=1412188
    https://forums.sdn.sap.com/click.jspa?searchID=14529204&messageID=1501162
    in the above post there is alternative by Rich. that is simple and easy.
    Regards
    Vijay Babu Dudla

  • How to create dynamic screen using module pool programming

    Hi,
    Could anybody help me how to create dynamic screens?
    I am developing a screen with HR Person with assignment info. If PERNR have multiple assignments, i need to show all the details one by one. How to show the details on screen. I need to call one by one assignment information dynamically.
    Please suggest me how to do, apart from using table controls.
    Thanks,
    Kamal

    You may have the below options:
    1) Table Control
    2) Individual fields
    3) ALV
    4) pop-up screen

  • Split screen in module pool programming

    Hi Sap GURUS,
    Please can you provide me some help on  how to create the spilt screen ( similar to IDOC screen WE05 transaction ) screen. left side the idoc nubmer are available, on click of particular IDOC, detials would be displayed in right side sceen.  I need to develope the screen like this.
    You inputs are highly appricated.
    Thanks in advance.
    Regards
    Harikrishna

    Check out this code:
    1) First create a docking container.
    2) Docking will hold your tree
    3) double clicking on the tree will open a screen on the right side.
    This program only demonstrates how to create a docking container and split it...
    REPORT  z_sourav_splitter.
    TYPE-POOLS:cndp.
    DATA: docking TYPE REF TO cl_gui_docking_container,
          splitter TYPE REF TO cl_gui_splitter_container,
          picture_control_1 TYPE REF TO cl_gui_picture,
          picture_control_2 TYPE REF TO cl_gui_picture,
          dock_sub_cont1 TYPE REF TO cl_gui_container,
          dock_sub_cont2 TYPE REF TO cl_gui_container,
          url1 TYPE cndp_url,                " URL-field in screen 200
          url2 TYPE cndp_url.               " URL-field in screen 200
    PARAMETERS: p TYPE char1.
    AT SELECTION-SCREEN OUTPUT.
      IF docking IS NOT BOUND.
    * create the docking container
        CREATE OBJECT docking
           EXPORTING
    *      parent                      =
           repid                       = sy-repid
           dynnr                       = sy-dynnr
           side                        = docking->dock_at_left
           extension                   = 200
    *      style                       =
    *      lifetime                    = lifetime_default
    *      caption                     =
    *      metric                      = 0
    *      ratio                       =
    *      no_autodef_progid_dynnr     = 'X'
    *      name                        =
          EXCEPTIONS
            cntl_error                  = 1
            cntl_system_error           = 2
            create_error                = 3
            lifetime_error              = 4
            lifetime_dynpro_dynpro_link = 5
            OTHERS                      = 6
        IF sy-subrc = 0.
          CHECK splitter IS NOT BOUND.
          CREATE OBJECT  splitter
               EXPORTING
                 link_dynnr        = sy-dynnr
                 link_repid        = sy-repid
    *          shellstyle        =
    *          left              =
    *          top               =
    *          width             =
                 height            = 50
    *          metric            = cntl_metric_dynpro
                 align             = 15
                 parent            = docking
                 rows              = 2
                 columns           = 1
    *          no_autodef_progid_dynnr =
    *          name              =
               EXCEPTIONS
                 cntl_error        = 1
                 cntl_system_error = 2
                 OTHERS            = 3
          IF sy-subrc = 0.
            CALL METHOD splitter->get_container
              EXPORTING
                row       = 1
                column    = 1
              RECEIVING
                container = dock_sub_cont1.
            CREATE OBJECT picture_control_1
              EXPORTING
                parent = dock_sub_cont1.
            CALL FUNCTION 'DP_PUBLISH_WWW_URL'
              EXPORTING
                objid                 = 'DEMOWORD97SAPLOGO'
                lifetime              = cndp_lifetime_transaction
              IMPORTING
                url                   = url1
              EXCEPTIONS
                dp_invalid_parameters = 1
                no_object             = 2
                dp_error_publish      = 3
                OTHERS                = 4.
    * load image
            IF sy-subrc = 0.
              CALL METHOD picture_control_1->load_picture_from_url_async
                EXPORTING
                  url = url1.
            ENDIF.
            CALL METHOD splitter->get_container
              EXPORTING
                row       = 2
                column    = 1
              RECEIVING
                container = dock_sub_cont2.
            CREATE OBJECT picture_control_2
              EXPORTING
                parent = dock_sub_cont2.
            CALL FUNCTION 'DP_PUBLISH_WWW_URL'
              EXPORTING
                objid                 = 'ENJOYSAP_LOGO'
                lifetime              = cndp_lifetime_transaction
              IMPORTING
                url                   = url2
              EXCEPTIONS
                dp_invalid_parameters = 1
                no_object             = 2
                dp_error_publish      = 3
                OTHERS                = 4.
    * load image
            IF sy-subrc = 0.
              CALL METHOD picture_control_2->load_picture_from_url_async
                EXPORTING
                  url = url2.
            ENDIF.
          ENDIF.
        ENDIF.
      ENDIF.

  • Refresh customization screen in module pool programming

    Hello Colleagues,
    I have a requirement where in i have to refresh the customization screen of table.
    Detail: i have generated table maintenance screen of  table 'XYZ'.  Now from this screen i am launching one pop-up screen.
    within this pop-up screen i am modifying this table 'XYZ'. So when i close the pop-up i wanted to see the refreshed value in my maintenance screen of table 'XYZ'.
    Could you please help?
    Regards,
    Virat

    define the table global to the entire program.
    in PAI of Pop up, modify the internal table with the changed values..
    in PBO of the main screen, always check is data exists, then clear and update from the modified table.

  • F4 Help In Module Pool Program

    Hi experts,
         How to create F4 help for an input field on selection screen in module pool program.'
    I have developed a module pool program. On selection screen
    when i  press F4 on vbeln field then it should display and the order numbers along with item numbers i.e both VBELN AND POSNR VALUES.
    Thanks & Regards
    Neelesh

    hi,
    try this one.......
    PROCESS ON VALUE-REQUEST.                                
      FIELD ZVLOAD_PROD_COMB-LOC_NO  MODULE VALUE_LOC_NO.        
    code inside MODULE -
    VALUE_LOC_NO
      DATA : BEGIN OF INT_TAB_ID OCCURS 0,
                TAB_ID TYPE ZALOAD_PROD_COMB-TAB_ID,
             END OF INT_TAB_ID.
      DATA : LOC_MAX TYPE ZALOAD_PROD_COMB-TAB_ID.
      CLEAR INT_TAB_ID.
      REFRESH INT_TAB_ID.
      SELECT MAX( TAB_ID) INTO (LOC_MAX) FROM ZALOAD_PROD_COMB.
      COUNT = LOC_MAX + 1.
      DO 10 TIMES.
        MOVE COUNT TO INT_TAB_ID-TAB_ID.
        APPEND INT_TAB_ID.
        COUNT = COUNT + 1.
      ENDDO.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
         RETFIELD            = 'TAB_ID'                        u201C Internal table field name
         DYNPPROG         = 'PROG_NAME                  u201C Program name
         DYNPNR              = SY-DYNNR
         DYNPROFIELD   =  'TAB_ID'                        u201C Field where u need F4 help
         VALUE_ORG       = 'S'
       WINDOW_TITLE  = u2018Any descriptionu2019
        TABLES
          VALUE_TAB      = INT_TAB_ID.                   u201C Internal table name
      IF SY-SUBRC <> 0.
            MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    reward points if useful.......:-)
    and mark the post answered once ur problem is solved ....

  • How to deactivate the screen fields dynamically in Module Pool Program?

    Hi guys,
         How to <b>activate & deactivate the screen fields</b> of a <b>module pool program</b>
    <b>dynamically</b> through program. Like Change mode and display mode in a single
    screen.

    Hi,
    Make use of a Variable,say gv_flag, for both Activate and Deactivate functionalities. As many times you hit the same button, change this variable value. For example, let us say first time you hit this button, assign value 'X' to this variable. Second time you hit this button, assign value ' ' to this variable. In PBO based the variable value  you have to Activate and Deactivate.
    PBO.
      if gv_flag = 'X'.  " Activate
        loop at screen.
          if screen-fname = 'ITAB1-MATNR'.
             screen-input = '1'.
             modify screen.
          endif.
        endloop.
      elseif gv_flag = ' '.   " Deactivate
          if screen-fname = 'ITAB1-MATNR'.
             screen-input = '0'.
             modify screen.
          endif.
        endloop.
      endif.
    PAI.
      case sy-ucomm.
         when 'ACDC'.   " Activate/Deactivate
             if gv_flag = 'X'.
               gv_flag = ' '.
             else.
               gv_flag = 'X'.
             endif.
      endcase.
    thanks,
    sksingh

Maybe you are looking for

  • Production Order Issue with Qty conflict

    Hi Friends, i have a issue with a production order fro which we built the product and the finished goods is moved to storage location, i have status set on my Production order as REL  PRT  CNF  DLV  PRC  GMPS MACM SETC. My order was for 1unit,In the

  • Account assigment in PO

    Hi, Can any one help me, about the following point: When creating a Purchasing Order with account asigment category F, in the GL account field appears a default value and I can not change it manualy,. It´s needed that this field does not have a defau

  • Chart axis problem

    I am writing data to a simple x-y chart where x values are cycle numbers (1,2,3,4....etc) and y values are times in seconds. The total number of cycles sent to the chart can be 100,000+, but I only need the last one hundred. I have therefore set the

  • CC crash on dvaworkspace.dll

    Hello, I am trying a trial of Premiere Pro CC, but it crashes as soon as I open a new project or load an existing one (CUDA or software). I tried internal and external disk, and the problem persists. The error is always with dvaworkspace.dll and I ca

  • How to reinstall CS4 into my Mac Pro 13" (2013/2014)?

    Hi Ladies and Gentlemen, So I bought CS4 Design Premium some time back, my macbook (white non unibody) crashed on me in 2012/13.. sad I KNOW, a long with all my documents so I thought. Went to a computer guy, and he managed to recover all my programs