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.

Similar Messages

  • 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.

  • 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 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.

  • 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

  • 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

  • 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 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

  • How to give the application server file path in the module pool programming

    Hi,
         Could somebody help me how to provide the application server file path in module pool programming once the logo is uploaded to sap system.
      For eg I have imported a logo name ‘owens’ into sap system by using transaction ‘se78’; now I need to call the path in the below url,
    if container2 is initial.
    CREATE OBJECT CONTAINER2
      EXPORTING
        CONTAINER_NAME              = 'PICTURE_CONTAINER2'.
    CREATE OBJECT PICTURE2
      EXPORTING
        PARENT = CONTAINER2.
    CALL METHOD PICTURE2->SET_DISPLAY_MODE
      EXPORTING
        DISPLAY_MODE = CL_GUI_PICTURE=>display_mode_fit_center
      EXCEPTIONS
        ERROR        = 1.
    CALL METHOD PICTURE2->LOAD_PICTURE_FROM_URL
      EXPORTING
        URL    = " ? "
      EXCEPTIONS
        ERROR  = 1
        Others = 2.
    endif.
    Thanks in advance
    Deepu

    hi Deepu,
    Use FM '/SAPDMC/LSM_F4_FRONTEND_FILE' for fetching the data from the application server path/presentation server path
    Regards,
    Santosh

  • How to draw a graph step by step ?

    Hi, sirs,
    Can you tell me how to draw a graph step by step by using Labview 6.0 ? On one step, I create two variables : one variable is used for X-axis, and other variable is used for Y-axis. Can you give me a simple example ?
    Thanks a lot.

    Try this example out.
    Attachments:
    plotxy.vi ‏24 KB

  • How to draw a line using JSP?

    Does anyone know how to draw a line using a JSP? Any help is much appreciated.
    Regards,
    Navin Pathuru.

    Graphics classes are useless in JSP files; you can only output HTML tags to the client browser.
    You should be able to give just about any presentation look that you need with HTML and CSS. Have you played with styles? Here's a simple example that works in IE 5+ and Netscape 4.7:
    <HTML>
    <HEAD>
    <STYLE>
    .box {
    border-style:solid;
    border-color:black;
    border-right-width: 1px;
    border-top-width: 1px;
    border-left-width: 1px;
    border-bottom-width: 1px;
    .line {
    border-right-width: 1px;
    border-top-width: 0px;
    border-left-width: 0px;
    border-bottom-width: 0px;
    border-style: solid;
    border-color: red;
    width:1pt;
    height:100%;
    </STYLE>
    </HEAD>
    <BODY>
    <TABLE CELLPADDING=1 CELLSPACING=0 WIDTH=100>
    <TR><TD ALIGN=CENTER><SPAN CLASS="box">Field One</SPAN></TD></TR>
    <TR HEIGHT=50><TD ALIGN=CENTER><SPAN CLASS="line">�</SPAN></TD></TR>
    <TR><TD ALIGN=CENTER><SPAN CLASS="box">Field Two</SPAN></TD></TR>
    <TR HEIGHT=50><TD ALIGN=CENTER WIDTH=50%><SPAN CLASS="line">�</SPAN></TD></TR>
    <TR><TD ALIGN=CENTER><SPAN CLASS="box">Field Three</SPAN></TD></TR>
    </TABLE>
    </BODY>
    </HTML>
    Have fun!

  • How to use module pool program in my custom report?

    Hi,
    I am developing a custom report in abap. I want to fetch data from a standard module pool program.I want output of this standard module pool program to be used in my standad report.Submit cannot be used with module pool programs. How can i do this?Can u please suggest?

    HI friend,
    For this you can directly use the table fields i.e. each and every module pool screen fields will be having the table name along with its fields (which you can see by double clicking the field and selecting technical settings button) and since it is a standard module pool program that will get populated directly. So you can get the screen field values directly from the table. I think this will help. Please try and let us know wheather it is solved.
    Thanks and regards,
    Sri Hari Anand Kumar
    Edited by: srihari.kumar on Apr 6, 2011 3:31 PM

  • 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

  • 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 use one module pool program in another module pool programming?

    Hi
    I have one moodule pool program.
    In one of my screen i want to use some code which already developed in another module pool program.
    Is there any direct way for using one module pool programcode  in another module pool program.
    If there any approaches for this plz help me in this issue.

    Dear,
    If you want to use the code.
    first you can write your code in a subroutine in module pool program 1
    and then you can use it from module pool  program 2 by
    perform subroutine_name(program_name)
    using P_1
    changing C_1
    if you wan to use one module pool data into other module pool.
    so that is another requirement.

Maybe you are looking for

  • Help required on ALV REPORT

    Hi, Please help with a solution: my requirement is to add the following to an existing program. i need to add 3 fields from a new table(a table which is not used in the program). the fields are : Vendor Part No. : Field ZWTYVND-Z_WTY_MAT_VPN Mail To

  • Computer Cannot Find Printer Attached to TC USB

    I have a 500 gb Time Capsule which has all the latest firmware and which I kind of hate. Currently the device has an HP Photosmart C4480 attached to it via the rear USB port. The Time Capsule is blissfully ignorant of the attachment. When I enter the

  • What apple product is good for gaming

    just need to know which is better for gaming macbook pro 17 inch or the mac pro  quad-core????????? i only have a $3000 doller limite???????

  • Muse: How to create an auto-enlarging slideshow

    Hi, how can I create a slideshow like this Château de Dournes ? (It's created with EverWeb.) I mean: Auto-run, click to enlarge > a new frame opens, perfectly adapted to the photos' size & format (portrait / landscape)- Thanks a lot! Hp

  • IOS 8 updated on my iPhone and icons in games are so small.

    I updated my iPhone to IOS8 and now the icons are really small.