How to Use F4 help in Module Pool Programming??????

Hi Friends,
This is Jagadeesh, I have an issue Module Pool Programming. Any of you can go through on this and can give an required answer.
Issue is as follows,
I have an Input/Output field for that i need to give f4 help, based on that field the related data should sit in to my table control. The thing is there is no relation between the input/output field and the table control fields.
Is this possible? If so how can i do this.

Hi Jagadeesh,
For F4 Values on Screen:
PROCESS ON VALUE_REQUEST
using module call starting with FIELD i.e FIELD field MODULE module
There are number of function modules that can be used for the purpose, but these
can fullfill the task easily or combination of them.
DYNP_VALUE_READ
F4IF_FIELD_VALUE_REQUEST
F4IF_INT_TABLE_VALUE_REQUEST
POPUP_WITH_TABLE_DISPLAY
DYNP_VALUE_READ
This function module is used to read values in the screen fields. Use of this
FM causes forced transfer of data from screen fields to ABAP fields.
There are 3 exporting parameters
DYNAME = program name = SY-CPROG
DYNUMB = Screen number = SY-DYNNR
TRANSLATE_TO_UPPER = 'X'
and one importing TABLE parameter
DYNPFIELDS = Table of TYPE DYNPREAD
The DYNPFIELDS parameter is used to pass internal table of type DYNPREAD
to this FM and the values read from the screen will be stored in this table.This
table consists of two fields:
FIELDNAME : Used to pass the name of screen field for which the value is to
be read.
FIELDVALUE : Used to read the value of the field in the screen.
e.g.
DATA: SCREEN_VALUES TYPE TABLE OF DYNPREAD ,
SCREEN_VALUE LIKE LINE OF SCREEN_VALUES.
SCREEN_VALUE-FIELDNAME = 'KUNNR' . * Field to be read
APPEND SCREEN_VALUE TO SCREEN_VALUES. * Fill the table
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
DYNAME = SY-CPROG
DYNUMB = SY-DYNNR
TRANSLATE_TO_UPPER = 'X'
TABLES
DYNPFIELDS = SCREEN_VALUES.
READ TABLE SCREEN_VALUES INDEX 1 INTO SCREEN_VALUE.Now the screen value for field KUNNR is in the SCREEN_VALUE-FIELDVALUE and can be used for further processing like using it to fill the internal table to be used as parameter in F4IF_INT_TABLE_VALUE_REQUEST ETC.
F4IF_FIELD_VALUE_REQUEST
This FM is used to display value help or input from ABAP dictionary.We have to pass the name of the structure or table(TABNAME) along with the field name(FIELDNAME) . The selection can be returned to the specified screen field if three
parameters DYNPNR,DYNPPROG,DYNPROFIELD are also specified or to a table if RETRN_TAB is specified.
CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
EXPORTING
TABNAME = table/structure
FIELDNAME = 'field name'
DYNPPROG = SY-CPROG
DYNPNR = SY-DYNR
DYNPROFIELD = 'screen field'
IMPORTING
RETURN_TAB = table of type DYNPREAD
F4IF_INT_TABLE_VALUE_REQUEST
This FM is used to dsiplay values stored in an internal table as input
help.This FM is used to program our own custom help if no such input help
exists in ABAP dictionary for a particular field. The parameter VALUE_TAB is used to pass the internal table containing input values.The parameter RETFIELD
is used to specify the internal table field whose value will be returned to the screen field or RETURN_TAB.
If DYNPNR,DYNPPROG and DYNPROFIELD are specified than the user selection is passed to the screen field specified in the DYNPROFIELD. If RETURN_TAB is specified the selectionis returned in a table.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = field from int table whose value will be returned
DYNPPROG = SY-CPROG
DYNPNR = SY-DYNNR
DYNPROFIELD = 'screen field'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = internal table whose values will be shown.
RETURN_TAB = internal table of type DDSHRETVAL
EXCEPTIONS
parameter_error = 1
no_values_found = 2
others = 3.
POPUP_WITH_TABLE_DISPLAY
This FM is used to display the contents of an internal table in a popup window.The user can select a row and the index of that is returned in the CHOISE
parameter.The VALUETAB is used to pass the internal table.
A suitable title can be set using TITLETEXT parameter. The starting and end position of the popup can be specified by the parameters STARTPOS_COL / ROW and ENDPOS_ROW / COL .
CALL FUNCTION 'POPUP_WITH_TABLE_DISPLAY'
EXPORTING
ENDPOS_COL =
ENDPOS_ROW =
STARTPOS_COL =
STARTPOS_ROW =
TITLETEXT = 'title text'
IMPORTING
CHOISE =
TABLES
VALUETAB =
EXCEPTIONS
BREAK_OFF = 1
OTHERS = 2.
e.g.
DATA: w_choice TYPE SY-TABIX.
DATA: BEGIN OF i_values OCCURS 0 WITH HEADER LINE,
values TYPE I,
END OF i_values.
PARAMETRS : id TYPE I.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR id
i_values-values = '0001'.
APPEND i_values.
i_values-values = '0002'.
APPEND i_values.
i_values-values = '0003'.
APPEND i_values.
i_values-values = '0004'.
APPEND i_values.
CALL FUNCTION 'POPUP_WITH_TABLE_DISPLAY'
EXPORTING
ENDPOS_COL = 40
ENDPOS_ROW = 12
STARTPOS_COL = 20
STARTPOS_ROW = 5
TITLETEXT = 'Select an ID'
IMPORTING
CHOISE = w_choice
TABLES
VALUETAB = i_values
EXCEPTIONS
BREAK_OFF = 1
OTHERS = 2.
CHECK w_choice > 0.
READ TABLE i_values INDEX w_choice....now we can process the selection as it is contained
...in the structure i_values.
Other FM that may be used to provide input help is HELP_START .
regards,
Dj
reward for all useful answers.

Similar Messages

  • How to use table control in module pool programming

    Hi
    I want to use a table control to fetch some data from mara table.
    Please guide me with the procedure and the steps which I can follow to complete my program correctly.
    thanks
    Lalit Gupta

    As [vinraaj|http://forums.sdn.sap.com/profile.jspa?userID=3968041] wrote, call transaction SE51, there is a Wizard to help you generate the table control, it will create the table control and some includes with PBO/PAI modules > Read [Using the Table Control Wizard|http://help.sap.com/saphelp_bw/helpdata/en/6d/150d67da1011d3963800a0c94260a5/frameset.htm]
    Also there is a tutorial in the wiki, read [Learn Making First Table Control |http://wiki.sdn.sap.com/wiki/display/ABAP/LearnMakingFirstTableControl] by [Krishna Chauhan|http://wiki.sdn.sap.com/wiki/display/~nc0euof]
    Regards,
    Raymond

  • Can we use Initilization event in module pool program?

    Hi All,
    Can we use Initialization event in module pool program? If not why?
    Thanks In Advance!!!!!!!!!

    The runtime environment creates the INITIALIZATION event and calls the corresponding event block (if it has been defined in the ABAP program).
    http://help.sap.com/saphelp_nw70/helpdata/EN/fc/eb2d67358411d1829f0000e829fbfe/content.htm
    SEE THE ABOVE LINK...THINK IT WILL SOLVE ALL YOUR DOUBTS
    REGARDS
    RACHEL

  • How to populate list box in module pool program

    How to populate list box in module pool program.
    Please give me reply as soon as posible
    regards,
    Venu.

    hi,
    go thrugh the folling code .
    TABLES sdyn_conn.
    DATA   ok_code TYPE sy-ucomm.
    Global data
    TYPES: BEGIN OF type_carrid,
             carrid type spfli-carrid,
             carrname type scarr-carrname,
           END OF type_carrid.
    DATA itab_carrid TYPE STANDARD TABLE OF type_carrid.
    *& Processing Blocks called by the Runtime Environment                 *
    Event Block START-OF-SELECTION
    START-OF-SELECTION.
      CALL SCREEN 100.
    Dialog Module PBO
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'SCREEN_100'.
    ENDMODULE.
    Dialog Modules PAI
    MODULE cancel INPUT.
      LEAVE PROGRAM.
    ENDMODULE.
    MODULE user_command_0100 INPUT.
      CASE ok_code.
        WHEN 'SELECTED'.
          MESSAGE i888(sabapdocu) WITH sdyn_conn-carrid.
      ENDCASE.
    ENDMODULE.
    Dialog Module POV
    MODULE create_dropdown_box INPUT.
      SELECT carrid carrname
                    FROM scarr
                    INTO CORRESPONDING FIELDS OF TABLE itab_carrid.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
                retfield        = 'CARRID'
                value_org       = 'S'
           TABLES
                value_tab       = itab_carrid
           EXCEPTIONS
                parameter_error = 1
                no_values_found = 2
                OTHERS          = 3.
      IF sy-subrc <> 0.
      ENDIF.
    ENDMODULE.
    the following code should be included in flow logic of screen
    process on value-request.
      field scarr-carrname  module create_dropdown_box.
    in module pool select list box.
    hope it is useful.
    regards,
    sreelakshmi.

  • How to save a varaints in module pool programming

    Hi All,
    How to save a varaints in module pool programming.
    Thanks in Advance.
    GS.

    Hi,
    Forgot my previous reply.
    Just now I checked.
    Create transaction[say.,zzz_test1] using SE93 [choose the option Program and screen] for your module pool program.
    Then use SHDS transaction to create a variant[say zzz_v1] for the transaction you created above.
    Then use SE93 [choose the option Transaction with Variant] to create another transaction zzz_test2 by mentioning the module pool program name and zzz_test1 transaction which you created and zzz_v1 variant which you created.
    Then if you run the transaction ZZZ_test2,then you can see the variant values.
    I created just now all these and it works.
    Hope this is clear.
    If not,get back.

  • How to provide select-option in module pool programming

    Hi all,
    How to provide select-option in module pool programming.
    If any body knows let me immediately.
    Thanks
    sudheer

    Hi Sudheer,
    Unfortunately there is no standard way of having a select-option in a module pool program.
    What you can try is having two fields and creating a range in your program and populating the range at runtime with respective value and trying to simulate some functionality of the select-option.
    Hope it helps.
    Thanks, Debasish

  • How to download  and upload a module pool program ?

    hi i am a sudent.can anyone suggest me how to download and upload a module pool program?
    Moderator message: please search for available information/documentation.
    Edited by: Thomas Zloch on May 29, 2011 12:45 PM

    Hi,
    You cannot just download and upload module pool programs .
    There are 2 different ways.
    1. Copy all the includes and and create the same in the target system. You can download and upload the the Screen.
      But GUI status you have to manually create.
    2. If you have completely saved the module-pool program in one Workbench request(including Z tables u have used) in the original system ,just  release the workbench request and copy the data file and co file and upload to the target system ( use CG3Y & CG3Z).
    If the workbench is a Local Request save it in a Transport of copies and then move.
    Regards
    Aromal R

  • How to save Custom control records module pool program ?

    Hi guru ,
    1. How to save Custom control records module pool program ?
    I wrote multiple lines of record in custom control
    Who to save that records ?
    thanking you.
    Regards,
    Subash.

    Hi Subasha,
    Please check the format below since it is based on a working code
    **************data declarations
    TYPES: BEGIN OF TY_EDITOR,
    EDIT(254) TYPE C,
    END OF TY_EDITOR.
    data: int_line type table of tline with header line.
    data: gw_thead like thead.
    data: int_table type standard table of ty_editor.
    You should create a text for uniquely identifying the text you are saving each time so that it doesn't get overwritten
    For this a key combination must be decidedd to uniquely identify the test..here it is loc_nam
    ****************fill header..from SO10( t-code )
    GW_THEAD-TDNAME = loc_nam. " unique key for the text
    GW_THEAD-TDID = 'ST'. " Text ID
    GW_THEAD-TDSPRAS = SY-LANGU.
    GW_THEAD-TDOBJECT = 'ZXXX'. "name of the text object created
    *Read Container and get data to int_table
    CALL METHOD EDITOR ->GET_TEXT_AS_R3TABLE
    IMPORTING
    TABLE = int_table
    EXCEPTIONS
    ERROR_DP = 1
    ERROR_CNTL_CALL_METHOD = 2
    ERROR_DP_CREATE = 3
    POTENTIAL_DATA_LOSS = 4
    others = 5.
    IF SY-SUBRC 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    loop data from int_table and save to int_line-tdline appending it.
    *save the text
    CALL FUNCTION 'SAVE_TEXT'
    EXPORTING
    HEADER = GW_THEAD
    TABLES
    LINES = InT_LINE
    EXCEPTIONS
    ID = 1
    LANGUAGE = 2
    NAME = 3
    OBJECT = 4
    OTHERS = 5.
    IF SY-SUBRC 0.
    ENDIF.
    The code shown above is ok and working fine for save also,hope that the above sample with helps you solve the problem
    Please check and revert,
    Reward if helpful
    Regards
    Byju

  • Using FM -- Reuse_alv_grid_display in module pool programming

    Hi expert,
    am using reuse_alv_grid_display FM in module pool programming.
    i want decalre field catalog and layout kindly provide me the declaration.
    i have use
    data : gs_layout type lvc_s_layo
            gt_fieldcat type lvc_t_fcat
             gs_fieldcat type lvc_s_fcat
    buts giving me error in Extended program check.
    kidly help

    In the top include, specify
    TYPE-POOLS: slis.

  • 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 use dropdown list in module pool

    Hi guys,
    I have provided  a dropdown list in my  screen in my module pool program.
    How should I insert values in the dropdown list.
    Regards
    Mac

    HI,
    Check this code.
    PROCESS AFTER INPUT
    PROCESS ON VALUE-REQUEST.
      FIELD ZDEPT-DEPTNO MODULE create_dropdown.
    *** DOUBLE CLICK ON CREATE_DROPDOWN
    MODULE create_dropdown INPUT.
      SELECT EMPNAME
                    DEPTNAME
                    FROM YDEPT
                    INTO CORRESPONDING FIELDS OF TABLE itab_details.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
                retfield        = 'DEPTNO'
                value_org       = 'S'
           TABLES
                value_tab       = itab_details
           EXCEPTIONS
                parameter_error = 1
                no_values_found = 2
                OTHERS          = 3.
      IF sy-subrc  0.
      ENDIF.
    ENDMODULE.
    HERE IN PAI DOUBLE CLICK THE MODULE THEN WRITE THE ABOVE CODE IT SHOULD WORK.
    YDEPT IS THE TABLE I CREATED TO STORE DEPARTMENT NUMBERS.
    ZDEPT IS THE STRUCTURE OF THE TABLE.
    IF YOU ARE STILL UNCLEAR
    PLEASE CHECK
    'DEMO_DROPDOWN_LIST_BOX' PROGRAM IN SE51 AND SCREEN NUMBER IS 100
    Regards and Best wishes.

  • 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 create a ListBox in module pool program in 3.1i system ?

    Hi All,
    How to create a ListBox of type module pool program in 3.1i system ?
    when i tried creating, the listbox option is disabled.
    Thanks in advance.
    Edited by: gulab zehra on Aug 20, 2009 1:26 PM

    Hi,
    please go through this...
    LIST BOX                    
          Drop down list box can be created in a dialog screen(SE51) as well as selection screen.
          In screen painter to create a input/output field into list box we use  'L" as a value for dropdown attribute for the i/o field.  In screen painter to determine the type of method that will be used to fill the value list we use the attribute value list. If it is blank, the value list will be filled by the first column of the input help assigned to the screen field. This input help can be defined in the ABAP Dictionary, on screen using SELECT,VALUES screen statements or in event POV (PROCESS ON VALUE-REQUEST ) and the input help that will be passed to the field should consists of 2 columns ,the key column is filled automatically by the system. SAP recommends value list field should be blank.
    or
    The value  can be 'A' meaning that the value list will be filled in the event PBO(PROCESS BEFORE OUTPUT) or before the screen is displayed.In this method we use function module VRM_SET_VALUES to fill the values and pass it to the i/o field. If a function code is attached to the list box the selection of a value triggers a PAI otherwise PAI will not trigger.  LIST BOX in SELECTION SCREEN
        List Box is created in selection screen using PARAMETERS statement with
    AS LISTBOX addition other attributes like VISIBLE LENGTH (width of listbox) can be specified with the declaration. PARAMETERS name AS LISTBOX VISIBLE LENGTH n.
       The function module VRM_SET_VALUES is used to fill the value list associated with a List Box .This FM uses types which are declared in type group VRM. So we should declare TYPE-POOLS VRM before using this FM.
    Some important types declared in the VRM type group are
    VRM_ID
       It refers to the name of the input/output field associated with list box
    VRM_VALUES
      It refers to the internal table consisting of two fields TEXT(80C) and KEY(40)C
    that will be used to create the list values.
    CALL FUNCTION  'VRM_SET_VALUES'
      EXPORTING
          ID                  = name of screen element, it is of TYPE VRM_ID
          VALUES      = internal table containing values, of TYPE VRM_VALUES
    Thanks
    Ashu Singh

  • How to create Long Text in Module Pool Program

    Hi all,
    I want to develop a new module pool program and I want to use Long text screen in this program and also want this text will store in table.I never develop such type of module pool before.This long text will like sales order long text.Please let me know the steps how I can develop such type of program and how I save long text huge data in table.
    Thanks & Regards
    Nirmal

    Hai ,
    here you have to use custom control, for this
    DATA: line(256) TYPE c,
          text_tab LIKE STANDARD TABLE OF line,
          field LIKE line.
    1)  Create custom control in your screen
    2)   CREATE OBJECT: container EXPORTING container_name = 'TEXTEDIT',   "--> (this is custom control name in screen)
                       editor    EXPORTING parent = container.
    3)  CALL METHOD editor->get_text_as_stream  "This method reads data from custom control , inserts into itab 'text_tab' 
             IMPORTING       
              text = text_tab.                                       "
          READ TABLE text_tab  INTO line INDEX 1. read the text into wa 'line'
    if you want more clarity , see  'ABAPDOCU' >ABAP USER DIALOGS>    COMPLEXSCREEN ELEMENTS-->  DEMO CUSTOM_CONTROL

  • How to extract the data from module pool program to Excel Sheet?

    Hi Guys
            I am having a requirement to transfer the data from Module pool screen to excel sheet directly.
            This is an urgent requirement.
            So plz reply me with some coding examples.
            I will give points for that.

    This report extract excel file. From that concept you can easily extract data from module pool program also by coding in PAI of the screen.
    REPORT ztest1 .
    * this report demonstrates how to send some ABAP data to an
    * EXCEL sheet using OLE automation.
    include ole2incl.
    * handles for OLE objects
    data: h_excel type ole2_object,        " Excel object
          h_mapl type ole2_object,         " list of workbooks
          h_map type ole2_object,          " workbook
          h_zl type ole2_object,           " cell
          h_f type ole2_object,            " font
          h_c type ole2_object.            " color
    DATA: FILENAME LIKE RLGRAP-FILENAME.
    tables: spfli.
    data  h type i.
    * table of flights
    data: it_spfli like spfli occurs 10 with header line.
    *&   Event START-OF-SELECTION
    start-of-selection.
    * read flights
      select * from spfli into table it_spfli.
    * display header
      uline (61).
      write: /     sy-vline no-gap,
              (3)  'Flg'(001) color col_heading no-gap, sy-vline no-gap,
              (4)  'Nr'(002) color col_heading no-gap, sy-vline no-gap,
              (20) 'Von'(003) color col_heading no-gap, sy-vline no-gap,
              (20) 'Nach'(004) color col_heading no-gap, sy-vline no-gap,
              (8)  'Zeit'(005) color col_heading no-gap, sy-vline no-gap.
      uline /(61).
    * display flights
      loop at it_spfli.
        write: / sy-vline no-gap,
                 it_spfli-carrid color col_key no-gap, sy-vline no-gap,
                 it_spfli-connid color col_normal no-gap, sy-vline no-gap,
                 it_spfli-cityfrom color col_normal no-gap, sy-vline no-gap,
                 it_spfli-cityto color col_normal no-gap, sy-vline no-gap,
                 it_spfli-deptime color col_normal no-gap, sy-vline no-gap.
      endloop.
      uline /(61).
    * tell user what is going on
      call function 'SAPGUI_PROGRESS_INDICATOR'
         exporting
    *           PERCENTAGE = 0
               text       = text-007
           exceptions
                others     = 1.
    * start Excel
      create object h_excel 'EXCEL.APPLICATION'.
    *  PERFORM ERR_HDL.
      set property of h_excel  'Visible' = 1.
    *  CALL METHOD OF H_EXCEL 'FILESAVEAS' EXPORTING #1 = 'c:kis_excel.xls'
    *  PERFORM ERR_HDL.
    * tell user what is going on
      call function 'SAPGUI_PROGRESS_INDICATOR'
         exporting
    *           PERCENTAGE = 0
               text       = text-008
           exceptions
                others     = 1.
    * get list of workbooks, initially empty
      call method of h_excel 'Workbooks' = h_mapl.
      perform err_hdl.
    * add a new workbook
      call method of h_mapl 'Add' = h_map.
      perform err_hdl.
    * tell user what is going on
      call function 'SAPGUI_PROGRESS_INDICATOR'
         exporting
    *           PERCENTAGE = 0
               text       = text-009
           exceptions
                others     = 1.
    * output column headings to active Excel sheet
      perform fill_cell using 1 1 1 200 'Carrier id'(001).
      perform fill_cell using 1 2 1 200 'Connection id'(002).
      perform fill_cell using 1 3 1 200 'City from'(003).
      perform fill_cell using 1 4 1 200 'City to'(004).
      perform fill_cell using 1 5 1 200 'Dep. Time'(005).
      loop at it_spfli.
    * copy flights to active EXCEL sheet
        h = sy-tabix + 1.
        if it_spfli-carrid cs 'AA'.
          perform fill_cell using h 1 0 000255000 it_spfli-carrid.
        elseif it_spfli-carrid cs 'AZ'.
          perform fill_cell using h 1 0 168000000 it_spfli-carrid.
        elseif it_spfli-carrid cs 'JL'.
          perform fill_cell using h 1 0 168168000 it_spfli-carrid.
        elseif it_spfli-carrid cs 'LH'.
          perform fill_cell using h 1 0 111111111 it_spfli-carrid.
        elseif it_spfli-carrid cs 'SQ'.
          perform fill_cell using h 1 0 100100100 it_spfli-carrid.
        else.
          perform fill_cell using h 1 0 000145000 it_spfli-carrid.
        endif.
        if it_spfli-connid lt 400.
          perform fill_cell using h 2 0 255000255 it_spfli-connid.
        elseif it_spfli-connid lt 800.
          perform fill_cell using h 2 0 077099088 it_spfli-connid.
        else.
          perform fill_cell using h 2 0 246156138 it_spfli-connid.
        endif.
        if it_spfli-cityfrom cp 'S*'.
          perform fill_cell using h 3 0 155155155 it_spfli-cityfrom.
        elseif it_spfli-cityfrom cp 'N*'.
          perform fill_cell using h 3 0 189111222 it_spfli-cityfrom.
        else.
          perform fill_cell using h 3 0 111230222 it_spfli-cityfrom.
        endif.
        if it_spfli-cityto cp 'S*'.
          perform fill_cell using h 4 0 200200200 it_spfli-cityto.
        elseif it_spfli-cityto cp 'N*'.
          perform fill_cell using h 4 0 000111222 it_spfli-cityto.
        else.
          perform fill_cell using h 4 0 130230230 it_spfli-cityto.
        endif.
        if it_spfli-deptime lt '020000'.
          perform fill_cell using h 5 0 145145145 it_spfli-deptime.
        elseif it_spfli-deptime lt '120000' .
          perform fill_cell using h 5 0 015215205 it_spfli-deptime.
        elseif it_spfli-deptime lt '180000' .
          perform fill_cell using h 5 0 000215205 it_spfli-deptime.
        else.
          perform fill_cell using h 5 0 115115105 it_spfli-deptime.
        endif.
      endloop.
    * EXCEL FILENAME
      CONCATENATE SY-REPID '_' SY-DATUM+6(2) '_' SY-DATUM+4(2) '_'
                  SY-DATUM(4) '_' SY-UZEIT '.XLS' INTO FILENAME.
      CALL METHOD OF H_MAP 'SAVEAS' EXPORTING #1 = FILENAME.
      free object h_excel.
      perform err_hdl.
    *       FORM FILL_CELL                                                *
    *       sets cell at coordinates i,j to value val boldtype bold       *
    form fill_cell using i j bold col val.
      call method of h_excel 'Cells' = h_zl
        exporting
          #1 = i
          #2 = j.
      perform err_hdl.
      set property of h_zl 'Value' = val .
      perform err_hdl.
      get property of h_zl 'Font' = h_f.
      perform err_hdl.
      set property of h_f 'Bold' = bold .
      perform err_hdl.
      set property of h_f 'Color' = col.
      perform err_hdl.
    endform.                    "FILL_CELL
    *&      Form  ERR_HDL
    *       outputs OLE error if any                                       *
    *  -->  p1        text
    *  <--  p2        text
    form err_hdl.
      if sy-subrc <> 0.
        write: / 'OLE-Automation Error:'(010), sy-subrc.
        stop.
      endif.
    endform.                    " ERR_HDL

Maybe you are looking for

  • Can not see the icons in the switcher

    Hi, This is R12.1.3 I have a switcher in the custom page and I set a couple of icon files I need to use, verified that those are under JDEV_USER_HOME\jdev\myhtml\OA_MEDIA But icons don't show up. Following other forum threads I tried couple of thins

  • Can we practice SAP EP on ECC 6.0..!

    Hi, Please guide me..! Actually I am learning SAP EP online from SAP. When I checked with my company for an IDES version of EP server. They are giving me the SAP ECC 6.0 IDES version details. Now I got confused that I was practicing my training sessi

  • HFM missing tables, won't start after a restart of services.

    Posted this on MOSC community, also posting here. We recently added servers (foundation, hfm web, hfm app and planning) to our DEV environment. Things seemed to running okay on both HFM app servers until we tried to run the copy utility. Immediately

  • 100% width pages header??  (Help please, presentation tomorrow!)

    Hello, For the life of me I cannot figure out how to get pages to create a header that spans 100%. Getting the header to start at the absolute top of the document was easy. But it's constrained by the general page margins. I want to create a nice let

  • Error when generating java classes from object types

    Hi, I'm using JDeveloper version 10.1.3.0.2 I created an object type in the database, the definition is: TYPE domain_cls IS OBJECT ( domain_idx           NUMBER(3) ) NOT INSTANTIABLE NOT FINAL I tried to create a java class for this object using JDev