Module Pool clear screen field

Hi,
I have a screen i fetch the data to it and process the screen data to do GR.
Problem is for one field, screen retaining the old transaction data. All the time user happen to come out of the transaction and transact again to get the proper value.
i suspect it is becasu eof screen cache..
Does anyone faced this kind of problem?

Hi,
In the PBO ofthe screen, give CLEAR statement for the particular screen field,
or give a pushbutton 'reset' and write the following in PAI..
WHEN 'RESET'.   "Resets the  input ields in the screen
      CLEAR t5.
      CLEAR t6.
      CLEAR t7.
      CLEAR t8.
   endcase.
where,
t5,t6,t7,t8 are input fields.
hope this helps u,
Arunsri

Similar Messages

  • Module Pool - Refresh Screen Fields Progmatically

    Hello All!
    I have a slightly frustrating problem. I have built a Module Pool application to display shipments and their underlying deliveries (various information from each).
    I have structured the application as follows
    An object to store the Data. This object has an internal table of Shipments and an internal table of Deliveries. The tables are related by TKNUM. When the application needs to display a shipment, it requests the shipment's information and the underlying deliveries information from the object. The object is structured to move through the shipments with methods like "GetFirstHeader", "GetPrevHeader", "GetNextHeader", "GetLastHeader". These return the data for the application to use.
    The Deliveries are displayed in a CL_SALV_TABLE, the Shipment information is displayed in textbox type fields above the table.
    The form for display has buttons to trigger the "Move" methods of the data object. This currently will retrieve the new data from the object, modify the fields and the alv grid and then go back through PBO (I'm assuming because a button was pressed). This works well. It will bring in the new data and refresh the screen everything is fine.
    I also have a button to print the currently displayed Shipment and Deliveries. This Print is handled through a SmartForm.
    The area that is giving me troubles is my other button. Since the Application can store a range of shipments at once, I have a "Print All" button. This button moves to the first shipment in the data object,
    calls the Print Form, then moves through the rest of the data object calling the Print Form for each Shipment Displayed. This happens from one button push. The problem I am running into is that the screen does not refresh when the data changes during this movement through the data objects. I believe this is due to the PBO module not being triggered yet. My question is, is there a way to refresh the screen progmatically?
    I have tried SET USER-COMMAND to move through the data, instead of calling the "GetFirstHeader" and "GetNextHeader" method directly, but that has some unpredictable behavior (works in debug, not in regular execution). I have also tried a LEAVE SCREEN statement, as that would trigger the PBO, since the Next Screen is set to the same screen number, but that kills execution of that block of code at the LEAVE SCREEN STATEMENT.
    I am including my code from my PAI module that runs this processing, hopefully that will help.
    << unformatable code removed >>
    Moderator message - Please go through your code and post only what is relevant to your question.
    Edited by: Rob Burbank on Apr 28, 2009 1:44 PM

    MODULE USER_COMMAND_9999 INPUT .
      CASE OK_CODE .
        WHEN 'NEXT' .
          PERFORM Next .
          PERFORM GetGridData .
          PERFORM RefreshALV .
        WHEN 'PREV' .
          PERFORM Prev .
          PERFORM GetGridData .
          PERFORM RefreshALV .
        WHEN 'EXIT' .
          SET SCREEN 0 .
        WHEN 'PRNT' .
          PERFORM Print .
        WHEN 'PRNA' .
          PERFORM PrintAll .
        WHEN 'BACK' .
          PERFORM HideInitials .
          SET SCREEN '1000' .
        WHEN 'CANC' .
          SET SCREEN '1000' .
        WHEN 'FRST' .
          PERFORM First .
          PERFORM GetGridData .
          PERFORM RefreshALV .
        WHEN 'LAST' .
          PERFORM Last .
          PERFORM GetGridData .
          PERFORM RefreshALV .
        WHEN 'CFAX' .
          PERFORM Show6000 .
      ENDCASE .
    ENDMODULE .
    FORM PrintAll .
      DATA sPromptB TYPE STRING .
      DATA sPromptM TYPE STRING .
      DATA sPromptE TYPE STRING .
      DATA sPromptF TYPE STRING .
      DATA cAnswer  TYPE C LENGTH 1 .
      IF NOT oLTend->isEmpty( ) = 1 .
        sPromptB = text-995 .
        sPromptM = ITOTSHIPNUM .
        sPromptE = text-994 .
        CONCATENATE sPromptB sPromptM sPromptE INTO sPromptF SEPARATED BY SPACE .
        CALL FUNCTION 'POPUP_TO_CONFIRM'
          EXPORTING
            TITLEBAR                    = 'Print All?'
            TEXT_QUESTION               = sPromptF
            DISPLAY_CANCEL_BUTTON       = ' '
          IMPORTING
            ANSWER                      = cAnswer
          EXCEPTIONS
            TEXT_NOT_FOUND              = 1
            OTHERS                      = 2 .
        IF SY-SUBRC <> 0 .
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4 .
        ENDIF .
        IF cAnswer = '1' .
          PERFORM First .
          PERFORM GetGridData .
          PERFORM RefreshALV .
          " >>> Need Screen Refreshed right here
          PERFORM Print .
          DO .
            PERFORM Next .
            PERFORM GetGridData .
            PERFORM RefreshALV .
            " >>> Need Screen Refreshed right here
            PERFORM Print .
            IF oLTend->GetIndex( ) = oLTend->GetCount( ) .
              EXIT .
            ENDIF .
          ENDDO .
        ENDIF .
      ENDIF .
    ENDFORM .
    That is the general flow. Hope that helps, if more info is needed, let me know.

  • Module Pool Programming : Screen Fields.

    Hello
    i have 2 fields in a screen. Field1 and Field2
    i enter the field1 and want to set the f4 help for second field field2 on the basis of the input in field1.
    but when i enter field1 and press f4 help for field2, it doesnot work because the field1 values are not passed when i use process on value request for field2 .
    please help .... what am i missing.
    Thanks

    Hi ,
    you have to use "DYNP_VALUES_READ" function mdule to read the field1 value to process in "F4IF_INT_TABLE_VALUE_REQUEST" function module.
    check the code below
    declare one internal table like this.
    data dynpro_values type table of dynpread.
    add the fields which you want to read.
    field_value-fieldname = Z_POLCY-BUKRS'.
      append field_value to dynpro_values.
      field_value-fieldname = 'Z_POLCY-WERKS'.
      append field_value to dynpro_values.
    call function 'DYNP_VALUES_READ'
                exporting
                  dyname                         = progname
                  dynumb                         = dynnum
                  translate_to_upper             = 'X'
              REQUEST                        = ' '
              PERFORM_CONVERSION_EXITS       = ' '
              PERFORM_INPUT_CONVERSION       = ' '
              DETERMINE_LOOP_INDEX           = ' '
                        tables
                          dynpfields             = dynpro_values
             exceptions
               invalid_abapworkarea           = 1
               invalid_dynprofield            = 2
               invalid_dynproname             = 3
               invalid_dynpronummer           = 4
               invalid_request                = 5
               no_fielddescription            = 6
               invalid_parameter              = 7
               undefind_error                 = 8
               double_conversion              = 9
               stepl_not_found                = 10
               others                         = 11
      if sy-subrc <> 0.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      else.
        call function 'F4IF_INT_TABLE_VALUE_REQUEST'
           exporting
            DDIC_STRUCTURE         = ' '
                 retfield               = 'POLTYPE'
            PVALKEY                = ' '
                 dynpprog               = progname
                 dynpnr                 = dynnum
                 dynprofield            = 'z_POLCY-POLTYPE'
            STEPL                  = 0
            WINDOW_TITLE           =
            VALUE                  = ' '
                 value_org              = 'S'
            MULTIPLE_CHOICE        = ' '
            DISPLAY                = ' '
            CALLBACK_PROGRAM       = ' '
            CALLBACK_FORM          = ' '
           tables
                 value_tab              = it_poltype
            FIELD_TAB              =
            RETURN_TAB             =
            DYNPFLD_MAPPING        = it_ret
          exceptions
                parameter_error        = 1
                no_values_found        = 2
                others                 = 3
        if sy-subrc <> 0.
          message id sy-msgid type sy-msgty number sy-msgno
                  with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        endif.
      endif.
    regards
    shibu
    *check the code for syntax i  just given one prototype

  • SELECT-OPTIONS in Module Pool Sub-Screen

    Hi,
    I have been working on a Module-Pool Development, in the header portion of the Screen, I have provided a Selection-Screen as a Sub-Screen because the requirement specifies to display a SELECT-OPTION in the Header Area.
    Now the problem is that, when working with the Screen, as soon as I press <ENTER> the Main Screen re-calls the Selection-Screen in the Sub-Screen area and all the entries made in the Selection-Screen are reset/erased.
    Kindly provide a solution either to stop the <ENTER> action to re-call the sub-screen. Or on any alternate method(s) to  provide a SELECT-OPTION on a Module Pool based Screen UI.
    MAIN SCREEN Code:
    *  PROCESS BEFORE OUTPUT
    PROCESS BEFORE OUTPUT.
    *~  Set PF-STATUS and TiTLE for Screen 100
      MODULE status_0100.
    *~  Call the Subscreen Dynamically
      CALL SUBSCREEN subscr1 INCLUDING sy-cprog gv_dynnr1.
      CALL SUBSCREEN subscr2 INCLUDING sy-cprog gv_dynnr2.
    *  PROCESS AFTER INPUT
    PROCESS AFTER INPUT.
    *~  Handle the Exit Commands of Screen 100
      MODULE user_command_0100 AT EXIT-COMMAND.
    *~  Handle the User Command(s) for screen 100
      MODULE user_action_0100.
      CALL SUBSCREEN subscr1.
      CALL SUBSCREEN subscr2.
    So whenever <ENTER> is pressed, the PBO re-calls:
    CALL SUBSCREEN subscr1 INCLUDING sy-cprog gv_dynnr1.
    and the Selection-Screen is reset.
    Regards,
    Nishant Nayyar.

    Haii Nishant,
    This problem was earlier solved by one of the members and after going through it i have now created a select-option in the Subscreen. Just create two input fields, name them as if they were low and high (for convinience as in case of select-option).
    U now need to create a table of type rstabfield.
    Ex: gt_rstab_bukrs type rstabfield.
    Now create a button and assign a Fcode for it. When you click on this button then u need to implement the ranges functionality as in select-option. For that use the following function module:
    CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
    EXPORTING
      TITLE                   = ' '
       TEXT                    = ''
       SIGNED                  = 'X'
       SEARCH_HELP             = 'H_T001'
       TAB_AND_FIELD           = gt_rstab_bukrs
      TABLES
        RANGE                   = rg_bukrs1.
    Hope it helps.
    Best Regards,
    rama

  • Module Pool Selection Screen

    The user wants the custom module pool selection screen to look like a list selection screen.  Meaning that they want to have the multiple selection box come up at the end of the field.  I don't think that this is possible but maybe someone has some ideas

    Use code like the following in your TOP include.
    Note that we have defined screen 500 in the code.
    Now in your transaction code for this module pool set this as the openingscreen. Please revert in case of any clarifications.
    Code.
    =AF---
    selection-screen : begin of screen 500 as window.
    selection-screen : begin of block abc with frame title text-001.
    select-options : s_bukrs for mseg-bukrs no intervals no-extension
    obligatory.
    parameter : p_postdt like mkpf-budat obligatory.
    select-options : s_vendor for mseg-lifnr.
    selection-screen : end of block abc.
    selection-screen : begin of block def with frame title text-002.
    parameter : c_fore radiobutton group g1 default 'X',
    c_back radiobutton group g1 .
    selection-screen : end of block def.
    selection-screen : end of screen 500.
    at selection-screen.
    if sy-ucomm = 'CRET'.
    perform get_data.
    endif.

  • Calling a module pool program screen to an executable program

    Hi gurus,
    I have created a executable program to use selection-screen and want to see my output in module pool program where I have designed table control according to my requirement.
    How can I call the module-pool program screen from an executable program?
    Any help?
    Regards
    Mac

    Hi Mac,
    I think you can proceed with a report program alone . There you create a screen with the table control to populate your result.
    In the report program, after getting values for internal table for your display, just call the said screen.
    i.e.
    CALL SCREEN <screen number>.
    Hope this may help you.
    Regards,
    Smart Varghese

  • Selection screen as subscreen in module pool main screen

    hello
    i having problem with a module pool  and a selection screen subscreen , i have my main screen 100 in my module pool
    i create a sub screen area , then in my top include i define a seleccion screen as subscreen  150
    i define some paramets and select-options ( for the select-options feature is because i choose use the subscreen )
    so far here is OK , the problem is when i fill the subscreen data and press a pushbutton define in the main screen ( 100 )
    the field are getting cleared ( BTW i call the subscreen in the PBO of the main screen ( 100 ) using call SUBSCREEN SUB_AREA INCLUDING SY-REPID '150'. ) so my question is how i can do for save the data filled in the subscreen ?
    thanks

    i find the solution of my own question:
    in the first line of the PAI event of the main screen ( where you call the subscreen ) need add 'call subscreen SUB_AREA_NAME_HERE.

  • Interval in the module pool selection screen

    Hi Experts,
       I am creating selection screen in module pool program. I know how to set search help for each field.
    But if I have select-options like fields, how can I have "Interval button". Is there any fuction module for that? should I use ranges?
    Thanks and regards,
    Venkat

    Hi,
    Follow these steps:-
    To implement select-options in module pool, first design two input/output fields (textboxes) for the low and high value of the field and name it as <field_name>-low and <field_name>-high.
    Create a button next the high value textbox and keep its sutaible function code.
    Now, to call the pop-up on this button click, we have to call the same pop-up as in standard      select-options. For this we have to use the function module COMPLEX_SELECTIONS_DIALOG.
    For this FM we have to pass the table name, field name and the range for the field whose range needs to fill when using the popup screen.
    To pass the table name and field name details into the FM, we have to declare as:
    DATA : tab TYPE rstabfield.
    This structure comprises of table name and field name.
    Pass these details in program as:-
    u2003
    *-- clear table and field details
      CLEAR tab.
    *-- append for range depending on the button clicked
    *   either for sales order or line item
      CASE sy-ucomm.
        WHEN 'VBELN'.
          tab-tablename = 'VBAP'.
          tab-fieldname = 'VBELN'.
    *--To call the popup screen for the field use code:-
      CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
        EXPORTING
          title             = text-002  u201Ctitle text
          text              = ' '
          signed            = 'X'
          search_help       = v_shelp u201Csearch help if required
          tab_and_field     = tab u201Ctable and field name details
        TABLES
          range             = r_vbeln u201Crange for the associated field
        EXCEPTIONS
          no_range_tab      = 1
          cancelled         = 2
          internal_error    = 3
          invalid_fieldname = 4
          OTHERS            = 5.
    Hope this helps you.
    Regards,
    Tarun

  • How to Change the Font Size in Module Pool Selection Screen?

    Hi,
    There is a module pool, and I need to change the font size mentioned in the selection screen. Could you plaese tell me, how will I be able to do that?

    Hi ,
    If you are asking for text field , then check the options avaliable in Display tab of Attributes.
    Hope this helps you.

  • Probelm in module pool selection screen

    Hi,
    I wanted to create transaction variant for my selection screen which i have to design through module pool
    if use the following code im not able to get the screen fields during trancation varian creation
    call screen 1001.
    SELECTION-SCREEN BEGIN OF SCREEN 101.
      SELECTION-SCREEN BEGIN OF BLOCK BL1.
       select-options:s_matnr for mara-matnr.
      SELECTION-SCREEN END  OF  BLOCK BL1.
    Kindly giv me a solution for the above query.
    Thanks In Advance,
    Santhiya B

    Hi,
    The easy way out is use a report program so you can have a normal selection screen and enjoy the variant capability for free. You can then do a 'call screen' so the rest of your processing will behave like a dialog program.
    If that's not possible, here's another option. It's not elegant, but I've done it. If others have better ways, please do share.
    1) Create a dummy program (ZXXXVARI). In this program, all it needs is the selection fields similar to what you have in your module pool.
    2) Add buttons to your dialog screen so users can choose variants, save variant, etc.
    3) Define internal array VALUTAB LIKE RSPARAMS.
    4) When user wants to save their selection, populate VALUTAB, then call FUNCTION 'RS_CREATE_VARIANT' EXPORTING CURR_REPORT = "ZXXXVARI", etc., or call function 'RS_CHANGE_CREATED_VARIANT', depending on whether the variant already exists on the table VARI or not.
    5) When user wants to choose a variant to use, just display the variants in VARI under his id. Once he selects a variant, CALL FUNCTION 'RS_VARIANT_CONTENTS' to retrieve the values saved and put them on the dialog screen.

  • Checkbox positioning issue in module pool program screen

    Hello All,
    I am facing one issue with the checkbox positioning in module pool program.I have designed the screen in 'SAP Signature Theme' and the checkbox position looks fine (while tested the screen in SE80) as shown below.
    Test Result from 'SAP Signature Theme':
    But the lead has a different theme in his SAP system and he got the below result where the checkbox automatically shifts right with the same code and screen design as shown below.
    Test Result from'Enjoy'  theme :
    Could you please help me resolve this strange issue as soon as possible.
    Thanks in advance!!!
    Thanks & Regards,
    Hafizul

    Hi Bhaskar,
    Sure , in fact this is has been created by dragging and dropping of the the standard checkbox template availabe in the layout,no custom code has been written for this.
    Please find the layout properties for this checkbox below.
    P9021-COMPLI_CONF is one character field.
    Please let me know if you need any other details on the same.
    Thanks & Regards,
    Hafizul

  • Urgent : Smartforms: Direct printing from module pool/dialog screen

    Hi all,
    i have a module pool screen where in from a screen i have some inputs from the user and after saving user wud click on a button called print which shud print a slip containing the screen data.now for this purpose i have made a smartform which on execution of it's driver program fetches data from DB table and puts on to SF.
    NOW MY ISSUE IS AS SOON AS THE USER PRESSES PRINT THE SMARTFORM SHUD DIRECTLY GET PRINTED.
    WAITING FOR ANSWERS
    THANKS AND REGARDS,
    SSACHIN SONI

    cool dude that wrked,thx giving u full points.i have on emore issue if u can  help:
    this driver program needs an input for which i've made a selection screen for testing but as i need to launch it frm mod pool screen i want that this program shud automatically get data(thr's only 1 field ) and shud nt get stopped at the selection screen.
    thanks
    sachin

  • Module pool initial screen

    Hi experts,
                     I am doing a module pool program, in the initial screen there a filed licence number. i have created it and raised an error message if the user enters incorrect licence number. The problem is when i enter incorrect licence number it's getting grayed out, rather tha resting it.
            the code i have written is below
    SELECT SINGLE zz_licno
             FROM zlec_master
             INTO zlec_master-zz_licno
             WHERE zz_licno = zlec_master-zz_licno.
      IF sy-subrc <> 0.
      MESSAGE e000(zmj) WITH 'ENTER VALID LICENCE NUMBER'.
      ENDIF.
    plz suggest me the best solution.
    thanks and regards,
    alson.

    hi muthukumaran,
                       i postin u my complete code in PAI. plz suggest where to use the code suggested by u. As i am new to module pool plz help in solving the issue.
    the code is as follows:
    MODULE user_command_0100 INPUT.
      CASE sy-ucomm.
        WHEN 'BACK'.
          LEAVE PROGRAM.
      ENDCASE.
      IF NOT zlec_master-zz_licno IS INITIAL.
        SELECT SINGLE zz_licno
              FROM zlec_master
              INTO zlec_master-zz_licno
              WHERE zz_licno = zlec_master-zz_licno.
        IF sy-subrc <> 0.
          MESSAGE e000(zmj) WITH 'ENTER VALID LICENCE NUMBER'.
        ENDIF.
      ENDIF.
      IF NOT zlec_master-zz_licno IS INITIAL.
        SELECT zz_licno
               zz_lec
               zadd_line_1
               zadd_line_2
               zadd_line_3
               zlandline_no
               zmobile_no
               zlicence_val_dt
               FROM zlec_master
               INTO CORRESPONDING FIELDS OF TABLE itab
               WHERE zz_licno = zlec_master-zz_licno.
      ENDIF.
      CALL SCREEN 200.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    thanks and regards
    alson.

  • Module pool program screen validation

    Hi all,
              Help me in the issue . I am performing some validations on fields in the module pool screen ,  When i give an error message , all the fields are greyed and user cannot input any values after that . How to solve this problem . i tr

    Hi Eric ,
    It should work,
    Refer to the links below , it will help
    Re: After Giving Error Message how to make Field Ready For Input Again in MIRO
    Re: Input fields not editable after error message displayed
    Meanwhile I am writing a code to see why is it not working for you.
    Also see where have you written a  chain End chain .. PBO ? PAI ? Let us know the code you have written.
    Regards,
    Uma
    Edited by: UmaDave on Jun 14, 2010 7:40 AM

  • Clear Screen Field

    Dear Friends
    I have a Screen and 6 drop down boxes are there with different table references.
    I have use PROCESS ON VALUE-REQUEST block for the getting there serch help values with use FM 'F4IF_INT_TABLE_VALUE_REQUEST'
    my question is when i select One drop down belows are must be clear. that means
    if I select Drop down 2 ==== Drop down 3,4,5,6 must be clear
    if I select Drop down 5 ==== Drop down 5,6 must be clear
    i use in PAI event like CLEAR <Field Name> but its not working
    Can you anyone give me a solution to clear this issue
    Thanks and Regards

    Have a search through the ABAP UI forum for function module 'DYNP_VALUES_UPDATE' examples - you can use this in the way you want to update the value of other screen fields during a POV event i.e. in the F4 for another field.
    If you scroll down through:
    Re: getting the description
    you'll see an example I posted of using this to set text for an associated field, but clear (set to space) should work equally well.
    Jonathan

Maybe you are looking for

  • JDBC MS Access--- cannot extract entry with null value with data type Meta

    I'm trying to extract a data entry with null value by using JDBC. The database is MS Access. The question is how to extract null entry with data type memo? The following code works when the label has data type Text, but it throws sqlException when th

  • Receiving, opening, saving attachment​s WARNING long post

    In some ways, this post is more of a reminder to myself on how to deal with attachments that I've discovered so far and hopefully it will help some other confused souls. I'm betting that like most people on this forum, your interest in the Playbook i

  • How to make the fields of BPM object not saved in database.

    Is it possible to declare some attributes of BPM object not saved in database. For example: Order has attribute orderId and date, user (other attributes)... we only want OBPM save orderId. We want the other attributes could be saved and retrieved by

  • Runtime error in  SQL statement

    hello, I have a runtime during selection from database table due to large ranges in where condition. for example: select * from cosp into corresponding   fields of table gt_cosp    where objnr in r_objnrs                  and lednr = lv_lednr        

  • IPhoto Slideshow on iPod

    Is it possible to copy a slideshow created in iPhoto 08 to a video iPod?