How to assign FCT code to a field in module pool programming?

Hi All,
I have two fields on the screen. One is I/O field other is text field.
suppose i enter country code in I/O field i should get the name of country in  text field. I want to assign fct code to I/O field.
But in attribute popup it's not allowing to assign fct to the field.
Please Help.
Regards,
Mohammed Quddus.

Hi, as far as I know R/3 screen I/O fields does not have onkeyup event. So you can not achieve this without hitting enter. When you have to hit enter then no need for function code. You can not assign FCT for I/O fields. You can write required logic in your PAI after entering country code.
Thanks,
Siva

Similar Messages

  • How to delete the row in table control with respect to one field in module pool programming?

    Hi,
    Can I know the way to delete the row in table control with respect to one field in module pool programming
    Regards
    Darshan MS

    HI,
    I want to delete the row after the display of table control. I have created push button as delete row. If I click on this push button, the selected row should get deleted.
    I have written this code,
    module USER_COMMAND_9000 input.
    DATA OK_CODE TYPE SY-UCOMM.
    OK_CODE = SY-UCOMM.
    CASE OK_CODE.
         WHEN 'DELETE'.
            LOOP AT lt_source INTO ls_source WHERE mark = 'X'.
                APPEND LS_SOURCE TO LT_RESTORE.
                DELETE TABLE LT_SOURCE FROM LS_SOURCE.
                SOURCE-LINES = SOURCE-LINES - 1.
            ENDLOOP.
    But I'm unable to delete the selected rows, It is getting deleted the last rows eventhough I select the other row.
    So I thought of doing with respect to the field.

  • How to do ICON_EXPAND and ICON_COLLAPSE input fields in module pool screen?

    hi frnds.
    My problem is in module pool screen how to do ICON_EXPAND and ICON_COLLAPSE input fields in module pool screen?And how to do GUI STATUS and GUI TITLE? IN SE80.
      ITS URGENT.POINTS WILL BE REWADED.THANKS  IN ADVANCE.

    Hi,
    Go through this thread.
    [expand and collapse|expand and collapse]
    Cheers,
    Simha.

  • F4 help for the screen fields in module pool program

    Hi All,
      I have a requirement that, i want to provide F4 help for the 2 fields in module pool program. the fields are document number and fiscal year from rbkp table.
    i could provide search help for two fields.
    but how to select matching fiscal year for that document number.
    problem: i am getting fiscal year as first four digits of document number.
    please help me to solve this problem.
    Thanks & Regards,
    Namratha.V

    Hi,
       If your requirement is after selecting the document no from f4 help then the corresponding year should be updated in the document year field then use FM --> DYNP_VALUES_UPDATE
    In  this function module pass the screen no program & field for which u want to update value

  • F1 help on a field in module pool programming

    I want to create f1 help on a field in module pool programming. How to use POH event. where should i write the help documentation. Before using this f1 help on a field i have to set some properties on GUI interface Editor. Please clearly mention the steps i have to follow.

    PROCESS ON HELP-REQUEST.
    FIELD P_LFA1 MODULE HELP_F1_LIFNR.
    MODULE HELP_F1_LIFNR INPUT.
    PERFORM SHOW_HELP_F1 USING 'ZFAG_DOC1'.
    ENDMODULE. " help_f1_lifnr INPUT
    FORM SHOW_HELP_F1 USING P_OBJECT.
    Dati testo help
    DATA: T_LINE LIKE TLINE OCCURS 0,
    XHEAD LIKE THEAD,
    HELP_INFO LIKE HELP_INFO,
    TEXC LIKE SY-UCOMM OCCURS 0,
    V_OBJECT LIKE DOKHL-OBJECT.
    Costante
    DATA: PREF_SIMG(4) VALUE 'SIMG',
    DOCID_HY LIKE DOKHL-ID VALUE 'HY'.
    Testo
    CONCATENATE PREF_SIMG P_OBJECT INTO V_OBJECT.
    Estrazione testo
    CALL FUNCTION 'DOCU_GET_FOR_F1HELP'
    EXPORTING
    ID = DOCID_HY
    LANGU = SY-LANGU
    OBJECT = V_OBJECT
    IMPORTING
    HEAD = XHEAD
    TABLES
    LINE = T_LINE
    EXCEPTIONS
    RET_CODE = 1
    OTHERS = 2.
    CASE SY-SUBRC .
    WHEN 0.
    Visualizzazione testo
    GET CURSOR FIELD HELP_INFO-DYNPROFLD.
    HELP_INFO-DOCUID = DOCID_HY.
    HELP_INFO-DOCUOBJECT = V_OBJECT.
    HELP_INFO-SPRAS = SY-LANGU.
    HELP_INFO-PROGRAM = SY-REPID.
    HELP_INFO-DYNPRO = SY-DYNNR.
    HELP_INFO-DYNPPROG = SY-REPID.
    HELP_INFO-PFKEY = SY-PFKEY.
    HELP_INFO-FIELDNAME = HELP_INFO-DYNPROFLD.
    CALL FUNCTION 'HELP_DOCULINES_SHOW'
    EXPORTING
    HELP_INFOS = HELP_INFO
    OVERLAY_HEADER = XHEAD
    TABLES
    EXCLUDEFUN = TEXC
    HELPLINES = T_LINE.
    WHEN OTHERS. MESSAGE S720(SH).
    ENDCASE.
    ENDFORM. " SHOW_HELP_F1

  • How to Draw a graph Using layout In a module pool Program

    Hello Friends
                   How to Represent a Graph in the layout  in a module pool program.
    Plz suggest me.
    Thanking you all
    lavanya

    THIS IS AN EXAMPLE PROGRAM FOR GRAPHICS.
    Run this program & see whether it will be useful for u or not.
    before running dont forget to set the pf status.
    after copying double click the pf status & in application tool bar. give function code like this.
    PF07 - for 2d graph.
    PF06 - for 3d
    PF05 - for 4d
    DATA: BEGIN OF DATA OCCURS 1,
            P TYPE P,
          END OF DATA.
    --- options-table -
    DATA: BEGIN OF OPTS OCCURS 1,
             C(80) TYPE C,
          END OF OPTS.
    DATA: BEGIN OF TDIM1 OCCURS 1,
             C(80) TYPE C,
          END OF TDIM1.
    DATA: BEGIN OF TDIM2 OCCURS 1,
             C(80) TYPE C,
          END OF TDIM2.
    DATA: BEGIN OF TDIM3 OCCURS 1,
             C(80) TYPE C,
          END OF TDIM3.
    DATA: BEGIN OF MAX OCCURS 1,
             D1(3) TYPE P VALUE 4,
             D2(3) TYPE P VALUE 5,
             D3(3) TYPE P VALUE 6,
          END OF MAX.
    DATA: TYEAR1(5) VALUE '#1991',
          TYEAR2(5) VALUE '#1992',
          TYEAR3(5) VALUE '#1993',
          TYEAR4(5) VALUE '#1994'.
    DATA: TPROD1(9),
          TPROD2(9),
          TPROD3(9),
          TPROD4(9),
          TPROD5(9).
    TPROD1 = TEXT-P01.
    TPROD2 = TEXT-P02.
    TPROD3 = TEXT-P03.
    TPROD4 = TEXT-P04.
    TPROD5 = TEXT-P05.
    DATA: TLAND1(20),
          TLAND2(20),
          TLAND3(20),
          TLAND4(20),
          TLAND5(20),
          TLAND6(20).
    TLAND1 = TEXT-L01.
    TLAND2 = TEXT-L02.
    TLAND3 = TEXT-L03.
    TLAND4 = TEXT-L04.
    TLAND5 = TEXT-L05.
    TLAND6 = TEXT-L06.
    DATA: INDEX     LIKE  SY-INDEX.
    DATA: MAXD(3)    TYPE  P.
    DATA: TYP.
    FIELD-SYMBOLS: <F>.
    SET PF-STATUS 'GRAF'.
    PERFORM FILL_DATA.
    MAXD = MAX-D1 * MAX-D2.
    *{listdisplay
    display of a list:                                                   *
    for 5 countries each 4 colums (years) and 5 lines (products)
    WRITE: / TLAND1.
    INDEX = 1.
    PERFORM LISTE.
    SKIP.
    ULINE.
    WRITE: / TLAND2.
    INDEX = MAXD + 1.
    PERFORM LISTE.
    NEW-PAGE.
    WRITE: / TLAND3.
    INDEX = 2 * MAXD + 1.
    PERFORM LISTE.
    SKIP.
    ULINE.
    WRITE: / TLAND4.
    INDEX = 3 * MAXD + 1.
    PERFORM LISTE.
    NEW-PAGE.
    WRITE: / TLAND5.
    INDEX = 4 * MAXD + 1.
    PERFORM LISTE.
    SKIP.
    ULINE.
    WRITE: / TLAND6.
    INDEX = 5 * MAXD + 1.
    PERFORM LISTE.
    PF05: 4D-graphic, general function-module                            *
    AT PF05.
      REFRESH OPTS.
    --- first screen: selection -
      WRITE 'FIFRST = PU' TO OPTS-C. APPEND OPTS.
    --- 2D-graphic-type: perspective bars -
      WRITE 'P2TYPE = TD' TO OPTS-C. APPEND OPTS.
    --- kind of colours: regular  -
      WRITE 'P3CTYP = PL' TO OPTS-C. APPEND OPTS.
    *--- dimension 1
      REFRESH TDIM1.
      MOVE TYEAR1 TO TDIM1.
      APPEND TDIM1.
      MOVE TYEAR2 TO TDIM1.
      APPEND TDIM1.
      MOVE SPACE  TO TDIM1.
      APPEND TDIM1.
      MOVE TYEAR4 TO TDIM1.
      APPEND TDIM1.
    *--- dimension 2
      REFRESH TDIM2.
      MOVE SPACE  TO TDIM2.
      APPEND TDIM2.
      MOVE TPROD2 TO TDIM2.
      APPEND TDIM2.
      MOVE TPROD3 TO TDIM2.
      APPEND TDIM2.
      MOVE TPROD4 TO TDIM2.
      APPEND TDIM2.
      MOVE SPACE  TO TDIM2.
      APPEND TDIM2.
    *--- dimension 3
      REFRESH TDIM3.
      MOVE TLAND1 TO TDIM3.
      APPEND TDIM3.
      MOVE SPACE  TO TDIM3.
      APPEND TDIM3.
      MOVE TLAND3 TO TDIM3.
      APPEND TDIM3.
      MOVE TLAND4 TO TDIM3.
      APPEND TDIM3.
      MOVE SPACE  TO TDIM3.
      APPEND TDIM3.
      MOVE SPACE  TO TDIM3.
      APPEND TDIM3.
      CALL FUNCTION 'GRAPH_MATRIX'
           EXPORTING
                TITL  = TEXT-VGL
                VALT  = 'DM'
                DIM1  = TEXT-J00
                DIM2  = TEXT-P00
                DIM3  = TEXT-L00
           TABLES
                DATA  = DATA
                TDIM1 = TDIM1
                TDIM2 = TDIM2
                TDIM3 = TDIM3
                OPTS  = OPTS.
    PF06: 3D-graphic general function-module                             *
    AT PF06.
      REFRESH OPTS.
    --- first screen: selection -
      WRITE 'FIFRST = PU' TO OPTS-C. APPEND OPTS.
    --- 2D-graphic-Type: perspective bars -
      WRITE 'P2TYPE = TD' TO OPTS-C. APPEND OPTS.
    --- kind of colours: regular -
      WRITE 'P3CTYP = PL' TO OPTS-C. APPEND OPTS.
    *--- dimension 1
      REFRESH TDIM1.
      MOVE TYEAR1 TO TDIM1.
      APPEND TDIM1.
      MOVE SPACE  TO TDIM1.
      APPEND TDIM1.
      MOVE TYEAR3 TO TDIM1.
      APPEND TDIM1.
      MOVE TYEAR4 TO TDIM1.
      APPEND TDIM1.
    *--- dimension 2
      REFRESH TDIM2.
      MOVE TPROD1 TO TDIM2.
      APPEND TDIM2.
      MOVE SPACE  TO TDIM2.
      APPEND TDIM2.
      MOVE TPROD3 TO TDIM2.
      APPEND TDIM2.
      MOVE SPACE  TO TDIM2.
      APPEND TDIM2.
      MOVE TPROD5 TO TDIM2.
      APPEND TDIM2.
      REFRESH TDIM3.
      CALL FUNCTION 'GRAPH_MATRIX'
           EXPORTING
                TITL  = TEXT-VGL
                VALT  = 'DM'
                DIM1  = TEXT-J00
                DIM2  = TEXT-P00
           TABLES
                DATA  = DATA
                TDIM1 = TDIM1
                TDIM2 = TDIM2
                TDIM3 = TDIM3
                OPTS  = OPTS.
    PF07: 2D-graphic general function-module                             *
    AT PF07.
      REFRESH OPTS.
    --- first screen: selection -
      WRITE 'FIFRST = PU' TO OPTS-C. APPEND OPTS.
    --- 2D-graphic-type perspective bars -
      WRITE 'P2TYPE = TD' TO OPTS-C. APPEND OPTS.
    --- kind of colour: regular -
      WRITE 'P3CTYP = PL' TO OPTS-C. APPEND OPTS.
    *--- dimension 1
      REFRESH TDIM1.
      MOVE TYEAR1 TO TDIM1.
      APPEND TDIM1.
      MOVE SPACE  TO TDIM1.
      APPEND TDIM1.
      MOVE TYEAR3 TO TDIM1.
      APPEND TDIM1.
      MOVE TYEAR4 TO TDIM1.
      APPEND TDIM1.
      REFRESH TDIM2.
      REFRESH TDIM3.
      CALL FUNCTION 'GRAPH_MATRIX'
           EXPORTING
                TITL  = TEXT-VGL
                VALT  = 'DM'
                DIM1  = TEXT-J00
           TABLES
                DATA  = DATA
                TDIM1 = TDIM1
                TDIM2 = TDIM2
                TDIM3 = TDIM3
                OPTS  = OPTS.
          FORM LISTE                                                    *
          displays a list with turnover figures                         *
          (products and years)                                          *
    FORM LISTE.
      DATA: CNT_MOD LIKE SY-TABIX.
      DATA: CNT_DIV LIKE SY-TABIX.
      WRITE: / TEXT-P00,22 TYEAR1,39 TYEAR2,56 TYEAR3, 73 TYEAR4.
      SKIP 2.
      DO MAXD TIMES.
        READ TABLE DATA INDEX INDEX.
        IF SY-SUBRC NE 0. EXIT. ENDIF.
        INDEX = INDEX + 1.
        CNT_MOD = SY-INDEX MOD MAX-D1.
        CNT_DIV = SY-INDEX DIV MAX-D1.
        IF CNT_MOD EQ 1.
          CASE CNT_DIV.
            WHEN 0.
              WRITE: / TPROD1, ' '.
            WHEN 1.
              WRITE: / TPROD2, ' '.
            WHEN 2.
              WRITE: / TPROD3, ' '.
            WHEN 3.
              WRITE: / TPROD4, ' '.
            WHEN 4.
              WRITE: / TPROD5, ' '.
          ENDCASE.
        ENDIF.
        WRITE: DATA-P.
      ENDDO.
    ENDFORM.
          FORM FILL_DATA                                                *
          fills the datatable                                           *
    FORM FILL_DATA.
      DATA-P = 153470.
      APPEND DATA.
      DATA-P = 243470.
      APPEND DATA.
      DATA-P = 124567.
      APPEND DATA.
      DATA-P = 179037.
      APPEND DATA.
      DATA-P = 234980.
      APPEND DATA.
      DATA-P = 287513.
      APPEND DATA.
      DATA-P = 253430.
      APPEND DATA.
      DATA-P = 223440.
      APPEND DATA.
      DATA-P =  24567.
      APPEND DATA.
      DATA-P = 180037.
      APPEND DATA.
      DATA-P = 129830.
      APPEND DATA.
      DATA-P = 145530.
      APPEND DATA.
      DATA-P = 132470.
      APPEND DATA.
      DATA-P = 453470.
      APPEND DATA.
      DATA-P =  24456.
      APPEND DATA.
      DATA-P = 119807.
      APPEND DATA.
      DATA-P = 288710.
      APPEND DATA.
      DATA-P = 166656.
      APPEND DATA.
      DATA-P = 300430.
      APPEND DATA.
      DATA-P = 723110.
      APPEND DATA.
      DATA-P =  22767.
      APPEND DATA.
      DATA-P = 195522.
      APPEND DATA.
      DATA-P =  38970.
      APPEND DATA.
      DATA-P =  89635.
      APPEND DATA.
      DATA-P = 166970.
      APPEND DATA.
      DATA-P = 401470.
      APPEND DATA.
      DATA-P =  29967.
      APPEND DATA.
      DATA-P = 112957.
      APPEND DATA.
      DATA-P =  37860.
      APPEND DATA.
      DATA-P =  77450.
      APPEND DATA.
      DATA-P = 253150.
      APPEND DATA.
      DATA-P = 343570.
      APPEND DATA.
      DATA-P = 768867.
      APPEND DATA.
      DATA-P = 236790.
      APPEND DATA.
      DATA-P = 122750.
      APPEND DATA.
      DATA-P = 328760.
      APPEND DATA.
      DATA-P = 292150.
      APPEND DATA.
      DATA-P = 356570.
      APPEND DATA.
      DATA-P = 268867.
      APPEND DATA.
      DATA-P =  36790.
      APPEND DATA.
      DATA-P = 125680.
      APPEND DATA.
      DATA-P = 178893.
      APPEND DATA.
      DATA-P = 333150.
      APPEND DATA.
      DATA-P = 373570.
      APPEND DATA.
      DATA-P = 168867.
      APPEND DATA.
      DATA-P = 226790.
      APPEND DATA.
      DATA-P = 278940.
      APPEND DATA.
      DATA-P = 177784.
      APPEND DATA.
      DATA-P = 234150.
      APPEND DATA.
      DATA-P = 296570.
      APPEND DATA.
      DATA-P = 233867.
      APPEND DATA.
      DATA-P =  16790.
      APPEND DATA.
      DATA-P = 125590.
      APPEND DATA.
      DATA-P = 208760.
      APPEND DATA.
      DATA-P = 113150.
      APPEND DATA.
      DATA-P = 388570.
      APPEND DATA.
      DATA-P = 565867.
      APPEND DATA.
      DATA-P = 211790.
      APPEND DATA.
      DATA-P = 277480.
      APPEND DATA.
      DATA-P = 277489.
      APPEND DATA.
      DATA-P = 53470.
      APPEND DATA.
      DATA-P = 321560.
      APPEND DATA.
      DATA-P = 452456.
      APPEND DATA.
      DATA-P = 174695.
      APPEND DATA.
      DATA-P = 277590.
      APPEND DATA.
      DATA-P = 177490.
      APPEND DATA.
      DATA-P = 153470.
      APPEND DATA.
      DATA-P = 467560.
      APPEND DATA.
      DATA-P = 222456.
      APPEND DATA.
      DATA-P = 198695.
      APPEND DATA.
      DATA-P =  99470.
      APPEND DATA.
      DATA-P = 100340.
      APPEND DATA.
      DATA-P = 11470.
      APPEND DATA.
      DATA-P = 323560.
      APPEND DATA.
      DATA-P = 434456.
      APPEND DATA.
      DATA-P = 224695.
      APPEND DATA.
      DATA-P = 277490.
      APPEND DATA.
      DATA-P = 467890.
      APPEND DATA.
      DATA-P = 953470.
      APPEND DATA.
      DATA-P =  67560.
      APPEND DATA.
      DATA-P = 298456.
      APPEND DATA.
      DATA-P =  98695.
      APPEND DATA.
      DATA-P = 577900.
      APPEND DATA.
      DATA-P = 199490.
      APPEND DATA.
      DATA-P = 18470.
      APPEND DATA.
      DATA-P = 390560.
      APPEND DATA.
      DATA-P = 411456.
      APPEND DATA.
      DATA-P =  94695.
      APPEND DATA.
      DATA-P = 182000.
      APPEND DATA.
      DATA-P = 260570.
      APPEND DATA.
      DATA-P = 367356.
      APPEND DATA.
      DATA-P = 231850.
      APPEND DATA.
      DATA-P = 436645.
      APPEND DATA.
      DATA-P = 346650.
      APPEND DATA.
      DATA-P =  82500.
      APPEND DATA.
      DATA-P = 300560.
      APPEND DATA.
      DATA-P = 467109.
      APPEND DATA.
      DATA-P = 161850.
      APPEND DATA.
      DATA-P = 356470.
      APPEND DATA.
      DATA-P = 198840.
      APPEND DATA.
      DATA-P = 199000.
      APPEND DATA.
      DATA-P = 340570.
      APPEND DATA.
      DATA-P = 127356.
      APPEND DATA.
      DATA-P = 591850.
      APPEND DATA.
      DATA-P = 287460.
      APPEND DATA.
      DATA-P = 299770.
      APPEND DATA.
      DATA-P =  12500.
      APPEND DATA.
      DATA-P = 230560.
      APPEND DATA.
      DATA-P = 437109.
      APPEND DATA.
      DATA-P = 191850.
      APPEND DATA.
      DATA-P =  36780.
      APPEND DATA.
      DATA-P =  78789.
      APPEND DATA.
      DATA-P = 282000.
      APPEND DATA.
      DATA-P = 270570.
      APPEND DATA.
      DATA-P = 567356.
      APPEND DATA.
      DATA-P =  31850.
      APPEND DATA.
      DATA-P = 92410.
      APPEND DATA.
      DATA-P = 121350.
      APPEND DATA.
      DATA-P = 67356.
      APPEND DATA.
      DATA-P = 431891.
      APPEND DATA.
    ENDFORM.

  • How to insert data into a  Ztable by using module pool programming??

    Hi,
    I am new to ABAP, Actually I have made a Ztable now I want to insert data by using the module pool programming. In which there are all field in the first screen and there is a save button. So when ever i press SAVE button it shud update the Ztable with new entries.But actually I am not getting How can i update that??can you please send me the code for inserting data.
    Thanks in Advance.
    Edited by: Swapna Ram on Feb 17, 2008 12:01 AM

    Swapna,
    Check this thread...
    Custom Table updation thru table control
    ALso check this..
    Dialog programming

  • 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

  • I want to go back from mandatory field in module pool program

    Hi
    i am doing tab strip control in module pool program.i want to go back from the selection field, which is a mandatory, to the main program by pressing f3.but i am nt able to get the output.can anybody pls help me.
    Amayika

    Hi
    1. For your BACK or CANCEL button on menu bar, give Button
    Ftype "E".
    2. In PAI : Write below Modules.
    PROCESS AFTER INPUT.
    MODULE CANCEL AT EXIT-COMMAND.
    MODULE BACK AT EXIT-COMMAND.
    double click on it.Inside of modules write below code.
    MODULE CANCEL INPUT.
    IF OK_CODE = 'CANCEL'.
    CLEAR OK_CODE.
    LEAVE PROGRAM.
    ENDIF.
    ENDMODULE.
    MODULE BACK INPUT.
    IF OK_CODE = 'BACK'.
    CLEAR: OK_CODE, INPUT1, INPUT2.
    LEAVE TO SCREEN 100.
    ENDIF.
    ENDMODULE.

  • How to create selections-screens to display PO using module pool program

    All,
    I'm new to module pool programming. Can any one please provide me where to create selections screens to display existing purchase orders using the below selection criteria in thr module pool program.,
    SELECT-OPTIONS : S_LIFNR FOR EKKO-LIFNR,
                     S_BSART FOR EKKO-BSART,
                     S_BUKRS FOR EKKO-BUKRS,
                     S_WERKS FOR EKPO-WERKS OBLIGATORY,
                     S_BEDAT FOR SY-DATUM,
                     S_EINDT FOR EKET-EINDT,
                     S_EBELN FOR EKKO-EBELN,
                     S_MATNR FOR EKPO-MATNR.
    provide me step by step to do this.

    Hi,
    Thanks for the reply can you please let me know.
    How can I create the ranges
    like low and high in the selection.
    Using se51 i was able to do only one i,e
    example I need
    purchase order number----
    f4 -
    f4
    Can please tell me how to do this

  • Search Help For a Field in Module Pool Programming

    Hi,
    I have a field called status in Module Pool for which i need to write a search help.
    This is the piece of code i have written.
    TYPES: BEGIN OF ty_status,
             stat type i,
             status type string,
        END OF ty_status.
      DATA: lt_emp_status TYPE STANDARD TABLE OF ty_status,
            lw_emp_status TYPE ty_status.
      REFRESH lt_emp_status.
      lw_emp_status-stat = '1'.
      lw_emp_status-status = 'Draft'.
      APPEND lw_emp_status TO lt_emp_status.
      CLEAR lw_emp_status.
      lw_emp_status-stat = '2'.
      lw_emp_status-status = 'Employee Review'.
      APPEND lw_emp_status TO lt_emp_status.
      CLEAR lw_emp_status.
      REFRESH lt_emp_status.
       CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'STATUS'
          value_org       = 'S'
        TABLES
          value_tab       = lt_emp_status
          return_tab      = t_return
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS          = 3.
      IF sy-subrc = 0.
        READ TABLE t_return INDEX 1.
        MOVE t_return-fieldval TO LV_EMP_status.
      ENDIF.
    But i am getting the following error.
    An exception occurred that is explained in detail below.
    The exception, which is assigned to class 'CX_SY_ASSIGN_CAST_ILLEGAL_CAST', was
      not caught in
    procedure "F4IF_INT_TABLE_VALUE_REQUEST" "(FUNCTION)", nor was it propagated by
      a RAISING clause.
    Since the caller of the procedure could not have anticipated that the
    exception would occur, the current program is terminated.
    The reason for the exception is:
    The error occurred at a statement of the form
       ASSIGN f TO <fs> CASTING.
       ASSIGN f TO <fs> CASTING TYPE t.
    or
       ASSIGN f TO <fs> CASTING LIKE f1.
    or
       at table statements with the addition
       ASSIGNING <fs> CASTING.
    The following error causes are possible:
    1. The type of field f or the target type determined by <fs>, t or f1
    contains data references, object references, strings or internal tables
    as components.
    Could some one help me how to resolve this issue.
    Thanks in advance.

    Hi,
    Please see this sample code below:
    *To fetch the classification data on the sel screen
    DATA: BEGIN OF IT_KLAH OCCURS 0,
          CLINT TYPE CLINT,
          CLASS TYPE KLASSE_D,
          END OF IT_KLAH.
      SELECT CLINT CLASS FROM KLAH UP TO 500 ROWS
      INTO TABLE IT_KLAH.
      IF SY-SUBRC <> 0 .
        MESSAGE TEXT-006 TYPE 'E'.
      ELSE.
        CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
    DDIC_STRUCTURE = ' '
        RETFIELD = 'CLASS'
    PVALKEY = ' '
        DYNPPROG = SY-REPID
        DYNPNR = SY-DYNNR
        DYNPROFIELD = 'p_s_clascn_low'      "i had to put the f4 help on the selection screen's select option low value,
                                                                     "here basically you have to give the internal table name inside quotes in which
                                                                     "you want to retrieve your data
        VALUE_ORG = 'S'
        DISPLAY = ' '
        TABLES
        VALUE_TAB = IT_KLAH.
      ENDIF.
    Hope it helps,
    Regards,
    Mansi

  • F4 help for the Date field in Module-Pool program

    Hi,
    I have a requirement wherein the user shud be allowed to choose a date on the calendar using F4 help and after choosing, it shud get displayed as dd.mm.yyyy format in the field. Is there any functional module to implement this.
    Thanks in Advance,
    Saranya.

    Hi,
    Please try the below code in your prgm.
    You have to write the below code in the POV of the required field.
    ***INCLUDE MZDATE_POV_DATEI01 .
    *&      Module  pov_date  INPUT
          text
    module pov_date input.
    DATA: li_ret_tab LIKE ddshretval OCCURS 0 WITH HEADER LINE.
    CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
    EXPORTING
    tabname = ' '
    fieldname = ' '
    searchhelp = 'BU_DATE_CHAR'
    TABLES
    return_tab = li_ret_tab
    EXCEPTIONS
    field_not_found = 1
    no_help_for_field = 2
    inconsistent_help = 3
    no_values_found = 4
    OTHERS = 5.
    IF sy-subrc IS INITIAL.
    READ TABLE li_ret_tab INDEX 1.
    IF sy-subrc IS INITIAL.
    wrk_date = li_ret_tab-fieldval. "The required field
    ENDIF.
    ENDIF.
    endmodule.                 " pov_date  INPUT
    Hope it suits ur requirement.
    Reward points if useful.
    Thanks and regards,
    Litta.

  • Dynamic change of fields in Module Pool program?

    Dear Friends,
    I defined a check list with values ABC and 123.
    If I select ABC, there are 4 fields will be displayed these all are char fields.
    If I select 123, there are 4 fields are replacing the above mentioned 4 fields at runtime. In that, one  Date field is there, but it is replacing with char value.
    How can I change dynamically from char to date vise versa at runtime?
    PLease help me out.
    thank you
    sekahr

    FM for converting char to numc : CHAR_NUMC_CONVERSION
    for numc to char CALL FUNCTION 'MOVE_CHAR_TO_NUM'

  • How to update a dbtab via table contols in module pool programs ?

    HI All ,
         I am creating a transaction with 2 screens.the 2nd screen displays the list of a dbtable according to some of the selections made on the 1st screen. In my 2nd screen I want to provide the option to the user to update the db table with a new row. Can anyone guide me in solving the problem?
    Thanks  in Advance ...
    Ranjita

    You can use the following code in the PAI of the screen.
    LOOP AT itab.
      MODULE modify_from_screen.
    ENDLOOP.
    MODULE modify_from_screen INPUT.
      MODIFY itab FROM wa INDEX tctrl-current_line.
      IF sy-subrc NE 0.
        APPEND wa TO itab.
      ENDIF.
    ENDMODULE.
    itab - The Internal table.
    wa - The name of the structure on the screen
    tctrl - Name of the table control
    Use this itab to save to your database table using the statement:
    MODIFY dbtab FROM TABLE itab.
    Regards,
    Manoj

  • How to make the field as mandatory in module pool program.

    Hi Experts,
    Could you please advice me in making a screen field as mandatory input field in module pool programming.
    Thanks in advance.

    Or you could add a check in a PAI module to check if there is some value, if not give error message.
    module check_value.
      if lv_value is initial.
        message e001(00) with 'Enter a value'.
      endif.
    endmodule
    In the PAI screen flow logic...
    Process after input.
    field lv_value module check_value.
    Regards,
    Rich Heilman

Maybe you are looking for

  • How can I stop safari from auto completing url's on my iphone 4 and ipad2?

    How can I stop safari from auto completing url's on my iphone 4 and ipad2?  On both devices I have cleared history, I have gone into settings-safari-and cleared history and cleared cookies & data, tried turning my devices on and off and I also have p

  • Why is it playong fine in QT but not FCP

    i just render a small sequence in 8-bit uncompressed. If i play the rendered Mov file in QT, it plays fine but if i import it in FCP and lay it on a sequence using the same setting as the mov ( 8 bit uncompresed ) it's jerky and often stop playback..

  • How to play video repeatedly and with no audio

    Hello all, I use the following code to play video in Flex: public function startPlayback(event:CairngormEvent) : void      if (model.nsDemoRemotePlay != null )                                * Stop and close previous NetStream.                       

  • I purchase a free app but at the same time apple charge to my account?????

    who shall i contact to find out how to settle my problem, i purchase a free apps but apple charge me 9.99 on my account.????

  • Fm MD_PLANNED_ORDER_CREATE

    Hi ,   I am using the FM MD_PLANNED_ORDER_CREATE , to create planned orders , when i execute the program i get the message Planned Order xxxx Will be created , but when i check for that in the table PLAF ,there is no such entry . Can you please sugge