How to display Internal Table in ALV?

Hi all,
can anyone teach me the simple way to insert my internal table records to ALV by providing me the sample codes from the start of declaration to the end? Below is how i define my internal table:
DATA: DOM_NAME(40) TYPE C,
       P_TABLE(40) TYPE C.
TYPES: BEGIN OF ITAB6,
       FIELDNAME TYPE DD03M-FIELDNAME,
END OF ITAB6.
P_TABLE = 'ABC'
DOM_NAME = 'TRY'
DATA: ITAB6 TYPE STANDARD TABLE OF ITAB6 WITH HEADER LINE.
    SELECT FIELDNAME FROM DD03M INTO TABLE ITAB6 WHERE TABNAME = P_TABLE AND
    DOMNAME = DOM_NAME.
Hope that anyone can just start the part of alv from the continuation of my codes. cus i went through others thread but it seem to be confusing me. thx! hope to get replies asap.

hai
copy this program and past in to the wk bench....(se38)
thn execute  it...
REPORT ZALVTEST2_RNJ .
*ABAP LIST VIEWER
This is a basic ALV with the followings:-
- Page Heading
- Page No
- Sub-Total
- Grand Total
*REPORT ZALV.
TYPE-POOLS: SLIS.
DATA: G_REPID LIKE SY-REPID,
GS_PRINT            TYPE SLIS_PRINT_ALV,
GT_LIST_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER,
GT_EVENTS           TYPE SLIS_T_EVENT,
GT_SORT             TYPE SLIS_T_SORTINFO_ALV,
GS_LAYOUT           TYPE SLIS_LAYOUT_ALV,
GT_FIELDCAT         TYPE SLIS_T_FIELDCAT_ALV,
FIELDCAT_LN LIKE LINE OF GT_FIELDCAT,
COL_POS TYPE I.
DATA: BEGIN OF ITAB,
  FIELD1(5) TYPE C,
  FIELD2(5) TYPE C,
  FIELD3(5) TYPE P DECIMALS 2,
END OF ITAB.
DATA: BEGIN OF ITAB1 OCCURS 0.
  INCLUDE STRUCTURE ITAB.
DATA: END OF ITAB1.
DATA: BEGIN OF ITAB_FIELDCAT OCCURS 0.
  INCLUDE STRUCTURE ITAB.
DATA: END OF ITAB_FIELDCAT.
Print Parameters
PARAMETERS:
            P_PRINT  AS CHECKBOX DEFAULT ' ', "PRINT IMMEDIATE
            P_NOSINF AS CHECKBOX DEFAULT 'X', "NO SELECTION INFO
            P_NOCOVE AS CHECKBOX DEFAULT ' ', "NO COVER PAGE
            P_NONEWP AS CHECKBOX DEFAULT ' ', "NO NEW PAGE
            P_NOLINF AS CHECKBOX DEFAULT 'X', "NO PRINT LIST INFO
            P_RESERV TYPE I.                  "NO OF FOOTER LINE
INITIALIZATION.
G_REPID = SY-REPID.
PERFORM PRINT_BUILD    USING GS_PRINT.      "Print PARAMETERS
START-OF-SELECTION.
TEST DATA
MOVE 'TEST1' TO ITAB1-FIELD1.
MOVE 'TEST1' TO ITAB1-FIELD2.
MOVE '10.00' TO ITAB1-FIELD3.
APPEND ITAB1.
MOVE 'TEST2' TO ITAB1-FIELD1.
MOVE 'TEST2' TO ITAB1-FIELD2.
MOVE '20.00' TO ITAB1-FIELD3.
APPEND ITAB1.
DO 50 TIMES.
  APPEND ITAB1.
ENDDO.
END-OF-SELECTION.
PERFORM BUILD.
PERFORM EVENTTAB_BUILD CHANGING GT_EVENTS.
PERFORM COMMENT_BUILD  CHANGING GT_LIST_TOP_OF_PAGE.
PERFORM CALL_ALV.
FORM BUILD.
DATA FIELD CATALOG
Explain Field Description to ALV
DATA: FIELDCAT_IN TYPE SLIS_FIELDCAT_ALV.
CLEAR FIELDCAT_IN.
FIELDCAT_LN-FIELDNAME = 'FIELD1'.
FIELDCAT_LN-TABNAME   = 'ITAB1'.
*FIELDCAT_LN-NO_OUT    = 'X'.  "FIELD NOT DISPLAY, CHOOSE FROM LAYOUT
FIELDCAT_LN-KEY       = ' '.   "SUBTOTAL KEY
FIELDCAT_LN-NO_OUT    = ' '.
FIELDCAT_LN-SELTEXT_L = 'HEAD1'.
APPEND FIELDCAT_LN TO GT_FIELDCAT.
CLEAR FIELDCAT_IN.
FIELDCAT_LN-FIELDNAME = 'FIELD2'.
FIELDCAT_LN-TABNAME   = 'ITAB1'.
FIELDCAT_LN-NO_OUT    = 'X'.
FIELDCAT_LN-SELTEXT_L = 'HEAD2'.
APPEND FIELDCAT_LN TO GT_FIELDCAT.
CLEAR FIELDCAT_IN.
FIELDCAT_LN-FIELDNAME     = 'FIELD3'.
FIELDCAT_LN-TABNAME       = 'ITAB1'.
FIELDCAT_LN-REF_FIELDNAME = 'MENGE'. "<- REF FIELD IN THE DICTIONNARY
FIELDCAT_LN-REF_TABNAME   = 'MSEG'.  "<- REF TABLE IN THE DICTIONNARY
FIELDCAT_LN-NO_OUT        = ' '.
FIELDCAT_LN-DO_SUM        = 'X'.   "SUM UPON DISPLAY
APPEND FIELDCAT_LN TO GT_FIELDCAT.
DATA SORTING AND SUBTOTAL
DATA: GS_SORT TYPE SLIS_SORTINFO_ALV.
CLEAR GS_SORT.
GS_SORT-FIELDNAME = 'FIELD1'.
GS_SORT-SPOS      = 1.
GS_SORT-UP        = 'X'.
GS_SORT-SUBTOT    = 'X'.
APPEND GS_SORT TO GT_SORT.
CLEAR GS_SORT.
GS_SORT-FIELDNAME = 'FIELD2'.
GS_SORT-SPOS      = 2.
GS_SORT-UP        = 'X'.
*GS_SORT-SUBTOT    = 'X'.
APPEND GS_SORT TO GT_SORT.
ENDFORM.
FORM CALL_ALV.
ABAP List Viewer
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = G_REPID
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_STRUCTURE_NAME = 'ITAB1'
IS_LAYOUT =  GS_LAYOUT
IT_FIELDCAT = GT_FIELDCAT[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
  IT_SORT = GT_SORT[]
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
  IT_EVENTS = GT_EVENTS[]
IT_EVENT_EXIT =
  IS_PRINT = GS_PRINT
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = ITAB1
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
ENDFORM.
HEADER FORM
FORM EVENTTAB_BUILD CHANGING LT_EVENTS TYPE SLIS_T_EVENT.
CONSTANTS:
GC_FORMNAME_TOP_OF_PAGE TYPE SLIS_FORMNAME VALUE 'TOP_OF_PAGE'.
*GC_FORMNAME_END_OF_PAGE TYPE SLIS_FORMNAME VALUE 'END_OF_PAGE'.
  DATA: LS_EVENT TYPE SLIS_ALV_EVENT.
  CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
       EXPORTING
            I_LIST_TYPE = 0
       IMPORTING
            ET_EVENTS   = LT_EVENTS.
  READ TABLE LT_EVENTS WITH KEY NAME =  SLIS_EV_TOP_OF_PAGE
                           INTO LS_EVENT.
  IF SY-SUBRC = 0.
    MOVE GC_FORMNAME_TOP_OF_PAGE TO LS_EVENT-FORM.
    APPEND LS_EVENT TO LT_EVENTS.
  ENDIF.
define END_OF_PAGE event
READ TABLE LT_EVENTS WITH KEY NAME =  SLIS_EV_END_OF_PAGE
                         INTO LS_EVENT.
IF SY-SUBRC = 0.
  MOVE GC_FORMNAME_END_OF_PAGE TO LS_EVENT-FORM.
  APPEND LS_EVENT TO LT_EVENTS.
ENDIF.
ENDFORM.
FORM COMMENT_BUILD CHANGING GT_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER.
  DATA: GS_LINE TYPE SLIS_LISTHEADER.
  CLEAR GS_LINE.
  GS_LINE-TYP  = 'H'.
  GS_LINE-INFO = 'HEADER 1'.
  APPEND GS_LINE TO GT_TOP_OF_PAGE.
  CLEAR GS_LINE.
  GS_LINE-TYP  = 'S'.
  GS_LINE-KEY  = 'STATUS 1'.
  GS_LINE-INFO = 'INFO 1'.
  APPEND GS_LINE TO GT_TOP_OF_PAGE.
  GS_LINE-KEY  = 'STATUS 2'.
  GS_LINE-INFO = 'INFO 2'.
  APPEND GS_LINE TO GT_TOP_OF_PAGE.
CLEAR GS_LINE.
GS_LINE-TYP  = 'A'.
GS_LINE-INFO = 'ACTION'.
APPEND GS_LINE TO  GT_TOP_OF_PAGE.
ENDFORM.
FORM TOP_OF_PAGE.
  CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
       EXPORTING
            IT_LIST_COMMENTARY = GT_LIST_TOP_OF_PAGE.
  WRITE: SY-DATUM, 'Page No', SY-PAGNO LEFT-JUSTIFIED.
ENDFORM.
FORM END_OF_PAGE.
  WRITE at (sy-linsz) sy-pagno CENTERED.
ENDFORM.
PRINT SETTINGS
FORM PRINT_BUILD USING LS_PRINT TYPE SLIS_PRINT_ALV.
  LS_PRINT-PRINT              = P_PRINT.  "PRINT IMMEDIATE
  LS_PRINT-NO_PRINT_SELINFOS  = P_NOSINF. "NO SELECTION INFO
  LS_PRINT-NO_COVERPAGE       = P_NOCOVE. "NO COVER PAGE
  LS_PRINT-NO_NEW_PAGE        = P_NONEWP.
  LS_PRINT-NO_PRINT_LISTINFOS = P_NOLINF. "NO PRINT LIST INFO
  LS_PRINT-RESERVE_LINES      = P_RESERV.
ENDFORM.
*END OF ZALV PROGRAM
regard
nawa

Similar Messages

  • How to display internal table content to table control

    hi experts
            I am very new to dialog programming
            I have the Internal table in a report program containing data that needs to be displayed in table  control.
          Can you explain in step by step.
         Thanks in advance.
    Regards
    Rajaram

    Hi Raja
    Dialog-driven programs, or any program started using a transaction code, are known as SAP transactions, or just transactions. The term "transaction" is used in several different contexts in the IT world. In OLTP (Online Transaction Processing), where several users are working in one system in dialog mode, the term "transaction" stands for a user request. In conjunction with database updates, it means a change in state in the database.
    Programs with type M can only be started using a transaction code, in which an initial screen is defined. Programs with type 1 can be started either using a transaction code, or by entering the program name in one of the transactions SE38 or SA38. Screens call dialog modules in the associated ABAP program from their flow logic. Type M programs serve principally as containers for dialog modules, and are therefore known as module pools. Type 1 programs, or function modules can also switch to dialog mode by calling screens using the CALL SCREEN statement. The program code of the corresponding executable program or function pool must then contain the corresponding dialog modules.
    Programs that are partially or wholly dialog-driven cannot be executed in the background. They are therefore sometimes referred to as dialog programs.
    <u><b>Transaction code</b></u>
    The transaction code starts a screen sequence. You create transaction codes in the Repository Browser in the ABAP Workbench or using Transaction SE93. A transaction code is linked to an ABAP program and an initial screen. As well as using a transaction code, you can start a screen sequence from any ABAP program using the CALL SCREEN statement.
    <u><b>Screens</b></u>
    Each dialog in an SAP system is controlled by one or more screens. These screens consist of a screen mask and its flow logic. Since the flow logic influences the program flow, screens are sometimes referred to as "dynamic programs". You create screens using the Screen Painter in the ABAP Workbench. Each screen belongs to an ABAP program.
    The screen has a layout that determines the positions of input/output fields and other graphical elements such as checkboxes and radio buttons. The flow logic consists of two parts:
    Process Before Output (PBO). This defines the processing that takes place before the screen is displayed.
    Process After Input (PAI). This defines the processing that takes place after the user has chosen a function on the screen.
    All of the screens that you call within an ABAP program must belong to that program. The screens belonging to a program are numbered. For each screen, the system stores the number of the screen which is normally displayed next. This screen sequence can be either linear or cyclic. From within a screen chain, you can even call another screen chain and, after processing it, return to the original chain. You can also override the statically-defined next screen from within the dialog modules of the ABAP program.
    <u><b>GUI status</b></u>
    Each screen has a GUI status. This controls the menu bars, standard toolbar, and application toolbar, with which the user can choose functions in the application. Like screens, GUI statuses are independent components of an ABAP program. You create them in the ABAP Workbench using the Menu Painter.
    <b><u>ABAP Program</u></b>
    Each screen and GUI status in the R/3 System belongs to one ABAP program. The ABAP program contains the dialog modules that are called by the screen flow logic, and also process the user input from the GUI status. ABAP programs that use screens are also known as dialog programs. In a module pool (type M program); the first processing block to be called is always a dialog module. However, you can also use screens in other ABAP programs, such as executable programs or function modules. The first processing block is then called differently; for example, by the runtime environment or a procedure call. The screen sequence is then started using the CALL SCREEN statement.
    Dialog modules are split into PBO modules and PAI modules. Dialog modules called in the PBO event are used to prepare the screen, for example by setting context-specific field contents or by suppressing fields from the display that are not needed. Dialog modules called in the PAI event are used to check the user input and to trigger appropriate dialog steps, such as the update task.
    <b><u>Passing Data Between ABAP Programs and Screens</u></b>
    How are fields from ABAP programs displayed on the screen? And how is user input on the screen passed back to the ABAP program? Unlike in list programming, you cannot write field data to the screen using the WRITE statement. Instead, the system transfers the data by comparing the names of screen fields with the names of the ABAP fields in the program. If it finds a pair of matching names, the data is transferred between the screen and the ABAP program. This happens immediately before and immediately after displaying the screen.
    <u><b>
    Field Attributes</b></u>
    For all screen fields of a dialog screen, field attributes are defined in the Screen Painter. If a field name in the screen corresponds to the name of an ABAP Dictionary field, the system automatically establishes a reference between these two fields. Thus, a large number of field attributes for the screen are automatically copied from the ABAP Dictionary. The field attributes together with data element and domain of the assigned Dictionary field form the basis for the standard functions the screen executes in a dialog (automatic format check for screen fields, automatic value range check, online help, and so on).
    <u><b>Error Dialogs</b></u>
    Another task of the screen processor is to conduct error dialogs. Checking the input data is carried out either automatically using check tables of the ABAP Dictionary or by the ABAP program itself. The screen processor includes the error message into the received screen and returns the screen to the user. The message may be context-sensitive, that is, the system replaces placeholders in the message text with current field contents. In addition, only fields whose contents is related to the error and for which a correction may solve the error can accept input. See also Messages on Screens.
    <b>
    <u>Data Consistency</b></u>
    To keep data consistent within complex applications, ABAP offers techniques for optimizing database updates that operate independent of the underlying database and correspond to the special requests of dialog programming. See also Programming Database Updates.
    TRANSACTION CODES
    MENU PAINTER : SE 41.
    SCREEN PAINTER : SE 51 .
    BOTH : SE 80 .
    &#61672; ONLY EXISTING PROGRAMS CAN BE VIEWED IN SE 41 , SO USE SE 38 .
    CONCEPT :
    STEPS :
    1. GIVE TRANSACTION CODE SE 38 , CREATE A REPORT NAMED
    " ZVRPRDIALOGTEST2 " . SAVE , CHECK , ACTIVATE IT .
    2. THEN GIVE CODE SE 51. GIVE SAME PROGRAM NAME AS SE38 .
    GIVE SCREEN NUMBER , PRESS CREATE .
    3. GIVE SHORT DESCRIPTION . THEN CLICK ELEMENT LIST .
    4. THE SCREEN COMES , TYPE " OKCODE " .
    5. CLICK FLOW LOGIC , THE SCREEN COMES .
    6. one screen will come.
    7. SAVE . CHECK , ACTIVATE .
    8. CLICK LAYOUT . SCREN PAINTER SCREEN COMES .
    9. PRESS " F6 " . TYPE TABLE NAME , PRESS ENTER . THE SCREEN COMES .
    10 . TO SELECT THE DESIRED FIELDS , CLICK THE " TO SELECT " AREA IN
    EACH ROW , PRESS ENTER .
    11 . AFTER CLICKING , PRESS ENTER .
    12. THE FINAL SELECTION WIL COME
    13 . GIVE THE NESSARY BUTTONS IN THE SCREEN PAINTER .
    14 . DOUBLE CLICK IN EACH BUTTON GIVE LABLE , FUNCTION CODE .
    15 . THE FINAL SCREEN WIL COME
    16 . SAVE . CHECK .ACTIVATE. TO CHECK SCREEN PRESS F8.
    17 . TO WRITE CODING : PRESS FLOW LOGIG .
    18 . THE SCREEN COMES .
    19 . DOUBLE CLICK FIRST EVENT ( MODULE STATUS _ 3000 ).
    20 . PBO MODULE WINDOW COMES , PRESS TICK MARK .
    21 . EDITOR COMES . SAVE .
    TYPING PROGRAM IN THE EDITOR
    Steps :
    THE EDITOR WILL BE AS SHOWN ABOVE , NOW TYPE THE FOLLOWING CODE .
    NOTE :
    BEFORE TYPING CODE : TAKE COMMENTS FROM , THEN TYPE LIKE :
    SET PF_STATUS ' PRSTATUS '
    SET TITLEBAR 'PRTITLE' .
    *& Module STATUS_3000 OUTPUT
    * text
    TABLES : ZVTIKFS.
    DATA BEGIN OF INT_TAB OCCURS 0.
    INCLUDE STRUCTURE ZVTIKFS.
    DATA END OF INT_TAB.
    DATA OKCODE LIKE SY-UCOMM.
    DATA INDEX TYPE I VALUE 1.
    * MODULE STATUS_3000 OUTPUT *
    MODULE STATUS_3000 OUTPUT.
    SET PF-STATUS 'PRSTATUS'. "COMMENTS TOOK
    SET TITLEBAR 'PRTITLE1'. " COMMENTS TOOK
    SELECT * FROM ZVTIKFS INTO TABLE INT_TAB.
    READ TABLE INT_TAB INDEX INDEX.
    ZVTIKFS-NAME = INT_TAB-NAME.
    ZVTIKFS-ADDRESS = INT_TAB-ADDRESS.
    ZVTIKFS-PHONE = INT_TAB-PHONE.
    ZVTIKFS-AREA = INT_TAB-AREA.
    ENDMODULE. " STATUS_3000 OUTPUT
    *& Module USER_COMMAND_3000 INPUT
    * text
    MODULE USER_COMMAND_3000 INPUT.
    CASE OKCODE.
    WHEN 'INS'.
    INSERT ZVTIKFS.
    WHEN 'DEL'.
    DELETE ZVTIKFS.
    WHEN 'PRE'.
    INDEX = INDEX - 1.
    IF INDEX < 1.
    INDEX = 1.
    ENDIF.
    WHEN 'NEX'.
    INDEX = INDEX + 1.
    IF INDEX > SY-DBCNT.
    INDEX = SY-DBCNT.
    ENDIF.
    WHEN 'EXI'.
    LEAVE PROGRAM.
    ENDCASE.
    ENDMODULE. " USER_COMMAND_3000 INPUT
    NEXT :
    SAVE , CHECK , ACTIVATE .
    TO COME TO DESIGN MENU
    <b>STEPS :</b>
    1 . TRANSACTION CODE : SE 80 . OBJECT NAVIGATOR WINDOW COMES .
    NOTE : IF YOUR REOORT DOSENOT COME DO THE FOLLOWING PROCESS
    <u><b>Vey useful link:</b></u>http://sap.mis.cmich.edu/sap-abap/abap09/index.htm
    <u><b>Other links:</b></u>
    http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb2d40358411d1829f0000e829fbfe/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/10/e7dbde82ba11d295a40000e8353423/content.htm
    <u><b>For Screens</b></u>
    http://help.sap.com/saphelp_47x200/helpdata/en/e4/2adbef449911d1949c0000e8353423/content.htm
    <u><b>Screen elements</b></u>
    http://help.sap.com/saphelp_47x200/helpdata/en/47/e07f5f2b9911d2954f0000e8353423/content.htm
    <u><b>Processing Screens</b></u>
    http://help.sap.com/saphelp_47x200/helpdata/en/47/e07f682b9911d2954f0000e8353423/content.htm
    <u><b>Complex Screen elements</b></u>
    http://help.sap.com/saphelp_47x200/helpdata/en/fd/02da2a61d811d295750000e8353423/content.htm
    <b><u>DIALOG Programming</u></b>
    http://help.sap.com/saphelp_webas630/helpdata/en/9f/db9cdc35c111d1829f0000e829fbfe/content.htm
    http://www.sapdevelopment.co.uk/dialog/dialoghome.htm
    http://www.sap-img.com/
    http://help.sap.com/saphelp_46c/helpdata/en/08/bef2dadb5311d1ad10080009b0fb56/content.htm
    http://www.sapgenie.com/links/abap.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c9/5472fc787f11d194c90000e8353423/frameset.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/52/670ba2439b11d1896f0000e8322d00/frameset.htm
    http://www.allsaplinks.com/dialog_programming.html
    http://sap.mis.cmich.edu/sap-abap/abap09/
    http://www.sapdevelopment.co.uk/dialog/dialoghome.htm
    http://help.sap.com/saphelp_webas630/helpdata/en/9f/db9cdc35c111d1829f0000e829fbfe/content.htm
    http://sap.mis.cmich.edu/abap-00/
    http://www.allsaplinks.com/files/using_table_in_screen.pdf
    http://help.sap.com/saphelp_46c/helpdata/en/08/bef2dadb5311d1ad10080009b0fb56/content.htm
    http://www.sapgenie.com/links/abap.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c9/5472fc787f11d194c90000e8353423/frameset.htm
    http://www.sapdevelopment.co.uk/dialog/dialoghome.htm
    http://help.sap.com
    http://www.sapgenie.com/abap/example_code.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/52/670ba2439b11d1896f0000e8322d00/frameset.htm
    http://www.allsaplinks.com/dialog_programming.html
    http://www.sapbrain.com/TUTORIALS/default.html
    http://www.sappoint.com/abap/spmp.pdf
    http://sappoint.com/abap.html
    http://www.sap-img.com/abap.htm
    http://sap.ittoolbox.com/code/archives.asp?i=10&t=450&a=t
    http://www.sapdevelopment.co.uk/dialog/dialoghome.htm
    http://www.sap-img.com/abap/
    http://www.sapdevelopment.co.uk/dialog/dialoghome.htm
    http://www.sap-img.com/
    http://www.sappoint.com/faq/faqdiapr.pdf
    http://www.allsaplinks.com/dialog_programming.html
    Reward all helpfull answers
    Regards
    Pavan

  • How to display internal table or DDIC data into Form

    Hi
         can anybody help me that how can i show the field data from internal table or DDIC into SAPscript form.
    Pls let me know the example of both se38 code and text element screen.

    Why cant u refer a standard sapscript program.
    refer form RVORDER01
    in SE38 refer program RVADOR01
    Thi sis simple example.
    DATA: IT_INVOICEDETAIL LIKE TABLE OF ZINVOICEDETAIL WITH HEADER LINE.
    DATA: TOTAL LIKE ZINVOICEDETAIL-AMOUNT,
          CARRY LIKE ZINVOICEDETAIL-AMOUNT.
    SELECT * FROM ZINVOICEDETAIL INTO TABLE IT_INVOICEDETAIL.
    CALL FUNCTION 'OPEN_FORM'
    EXPORTING
       FORM                              = 'ZDEMO1'.
       CALL FUNCTION 'WRITE_FORM'
    EXPORTING
       ELEMENT                        = 'HEAD'
      FUNCTION                       = 'SET'
       TYPE                           = 'TOP'
       WINDOW                         = 'MAIN'.
    LOOP AT IT_INVOICEDETAIL.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
       ELEMENT                        = 'BOX'
       WINDOW                         = 'MAIN'.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
       ELEMENT                        = 'ITEM'
       WINDOW                         = 'MAIN'.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
       ELEMENT                        = 'SUMMARY'
      FUNCTION                       = 'SET'
       TYPE                           = 'BOTTOM'
       WINDOW                         = 'MAIN'.
    ENDLOOP.
    CALL FUNCTION 'CLOSE_FORM'.
    In SE71 form u have to create the text element.
    BOX, ITEM,SUMMARY.
    /E  ITEM.
    P1 &IT_INVOICEDETAIL-TOTAL&

  • Need a POP-UP which can display internal table data in ALV format

    HI All,
    I need to display INTERNAL TABLE values through a POP-UP. Only condition is that the window with the internal table data should be in ALV format and not in TEXT only format.
    To clarify, I used FM 'POPUP_WITH_TABLE_DISPLAY_OK'   and  'POPUP_WITH_TABLE_DISPLAY', but both display the data in TEXT format and there is no provision to put the FIELD names there. Everthing needs to be put into internal table and it displays it in text format.
    So I want a FM where I can display internal tabel data in ALV format( same format that would appear if you creata search help for a filed and output window would have all the ALV features like SORT buttons etc.
    Hope there is some FM to achieve this ALV format data thing.
    Thanks in advance for all your help.
    Regards
    FX3

    check this
    REPORT y_demo_alv_3.
    TYPE-POOLS: slis.
    DATA: BEGIN OF i_outtab OCCURS 0.
            INCLUDE STRUCTURE sflight.
    DATA:   w_chk TYPE c.                  "For multiple selection
    DATA: END OF i_outtab.
    *       I_OUTTAB TYPE SFLIGHT OCCURS 0,
    DATA: i_private TYPE slis_data_caller_exit,
          i_selfield TYPE slis_selfield,
          W_exit(1) TYPE c.
    PARAMETERS: p_title TYPE sy-title.
    START-OF-SELECTION.
      SELECT * FROM sflight INTO TABLE i_outtab.
      CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
           EXPORTING
                i_title                 = p_title
                i_selection             = 'X'
                i_zebra                 = 'X'
    *           I_SCREEN_START_COLUMN   = 0
    *           I_SCREEN_START_LINE     = 0
    *           I_SCREEN_END_COLUMN     = 0
    *           I_SCREEN_END_LINE       = 0
                i_checkbox_fieldname    = 'W_CHK'
    *           I_LINEMARK_FIELDNAME    =
    *           I_SCROLL_TO_SEL_LINE    = 'X'
                i_tabname               = 'I_OUTTAB'
                i_structure_name        = 'SFLIGHT'
    *           IT_FIELDCAT             =
    *           IT_EXCLUDING            =
    *           I_CALLBACK_PROGRAM      =
    *           I_CALLBACK_USER_COMMAND =
    *            IS_PRIVATE             = I_PRIVATE
         IMPORTING
                es_selfield             = i_selfield
                e_exit                  = w_exit
           TABLES
                t_outtab                = i_outtab
           EXCEPTIONS
                program_error           = 1
                OTHERS                  = 2.
      IF sy-subrc <> 0.
    *    MESSAGE i000(0k) WITH sy-subrc.
      ENDIF.
    *****the internal table is modified with a cross sign for marking the
    ***rows selected
      LOOP AT i_outtab WHERE w_chk = 'X'.
        WRITE: /  i_outtab-carrid, i_outtab-price.
      ENDLOOP.

  • How to Populate Internal table data to Table Control in a Report Program

    Dear All,
           How to Populate Internal table data to Table Control in a Report Program? It is a pure report program with out any Module pool coding involved, which is just used to display data. Till now it is being displayed in a report. Now the user wants the data to be displayed in a table control. Could someone tell me how to go about with this.
    Thanks in Advance,
    Joseph Reddy

    If you want to use a table control, you will need to create a screen.
    In your report....
    start-of-selection.
    perform get_data.  " Get all your data here
    call screen 100. " Now present to the user.
    Double click on the "100" in your call screen statement.  This will forward navigate you to the screen.  If you have not created it yet, it will ask you if you want to create it, say yes.  Go into screen painter or layout of the screen.  Use the table control wizard to help you along the process.  It will write the code for you.  Since it is an output only table control, it will be really easy with not a lot of code. 
    A better way to present the data to the user would be to give it in a ALV grid.  If you want to go that way, it is a lot easier.  Here is a sample of the ALV function module.  You don't even have to create a screen.
    report zrich_0004
           no standard page heading.
    type-pools slis.
    data: fieldcat type slis_t_fieldcat_alv.
    data: begin of imara occurs 0,
          matnr type mara-matnr,
          maktx type makt-maktx,
          end of imara.
    * Selection Screen
    selection-screen begin of block b1 with frame title text-001 .
    select-options: s_matnr for imara-matnr .
    selection-screen end of block b1.
    start-of-selection.
      perform get_data.
      perform write_report.
    *  Get_Data
    form get_data.
      select  mara~matnr makt~maktx
                into corresponding fields of table imara
                  from mara
                   inner join makt
                     on mara~matnr = makt~matnr
                        where mara~matnr in s_matnr
                          and makt~spras = sy-langu.
    endform.
    *  WRITE_REPORT
    form write_report.
      perform build_field_catalog.
    * CALL ABAP LIST VIEWER (ALV)
      call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                it_fieldcat = fieldcat
           tables
                t_outtab    = imara.
    endform.
    * BUILD_FIELD_CATALOG
    form build_field_catalog.
      data: fc_tmp type slis_t_fieldcat_alv with header line.
      clear: fieldcat. refresh: fieldcat.
      clear: fc_tmp.
      fc_tmp-reptext_ddic    = 'Material Number'.
      fc_tmp-fieldname  = 'MATNR'.
      fc_tmp-tabname   = 'IMARA'.
      fc_tmp-outputlen  = '18'.
      fc_tmp-col_pos    = 2.
      append fc_tmp to fieldcat.
      clear: fc_tmp.
      fc_tmp-reptext_ddic    = 'Material'.
      fc_tmp-fieldname  = 'MAKTX'.
      fc_tmp-tabname   = 'IMARA'.
      fc_tmp-outputlen  = '40'.
      fc_tmp-col_pos    = 3.
      append fc_tmp to fieldcat.
    endform.
    Regards,
    Rich Heilman

  • How to display the fields in ALV Output without using Field catalog?

    How to display the fields in ALV Output without using Field catalog?
    Could you pls tell me the coding?
    Akshitha.

    Hi,
    u mean without building field catalog. is it? I that case, we can use the FM REUSE_ALV_FIELDCATALOG_MERGE.
    data: itab type table of mara.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
    i_program_name = sy-repid
    i_structure_name = itab
    CHANGING
    ct_fieldcat = lt_fieldcat[]
    EXCEPTIONS
    inconsistent_interface = 1
    program_error = 2
    OTHERS = 3.
    *Pass that field catalog into the fillowing FM
    call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program      = gd_repid
                i_grid_title            = 'REPORTING'
                is_layout              = gt_layout
                it_fieldcat             = lt_fieldcat[]
           tables
                t_outtab                = itab.

  • Need to display Internal table records on screen without using table contro

    Hi Experts,
    I have a requirement to display internal table on screen which is having three columns (Material no, Serial No and quantity).
    But I can't use table control as it is not supported by hand held devices.
    They are going to use this transaction on hand held devices.
    Thanks In advance.
    Gaurav

    You should be able to use the good old STEP LOOP processing for this... create your three fields in the row then convert them to a STEP-LOOP.
    You can look up in the help how to work with STEP-LOOPs if you are not familiar with it. It was the way to manage table-like information before the age of table controls

  • Can we get the data from two internal tables in ALV.

    hi friends i would like to display the data using two internal tables using alv grid.please guide me.

    Hi,
    ALV would be having a specific layout say :
    MATNR
    MAKTX
    QTY
    Now, if you have two internal tables, then do they have a different structure. If they have different structures, then what kind of ALV layout you expect. The ALV output should be as per the structure of 1st or 2nd internal table.
    If both internal table have same layout, then populate the data from 2nd internal table into 1st internal table and pass the 1st internal table ( it will have data of both internal tables) to ALV.
    Best regards,
    Prashant

  • How to  write  internal table data vertically . Records vertically.

    Hi pals,
          How to write internal table records vertically .
    suppose the records are
    a1 a2 a3
    b1 b2 b3
    we need to display
    a1  b1
    a2  b2
    a3  b3
    Thanks in advance.
    balaji.T

    Just check the code
    DATA: BEGIN OF itab OCCURS 0,
            f1 TYPE i,
            f2 TYPE i,
            f3 TYPE i,
          END OF itab.
    DATA pos TYPE i.
    "Define your lines where you want to print here...
    DATA line1 TYPE i VALUE 10.
    DATA line2 TYPE i VALUE 12.
    DATA line3 TYPE i VALUE 14.
    itab-f1 = '1'.
    itab-f2 = '10'.
    itab-f3 = '100'.
    APPEND itab.
    itab-f1 = '2'.
    itab-f2 = '20'.
    itab-f3 = '200'.
    APPEND itab.
    itab-f1 = '3'.
    itab-f2 = '30'.
    itab-f3 = '300'.
    APPEND itab.
    itab-f1 = '4'.
    itab-f2 = '40'.
    itab-f3 = '400'.
    APPEND itab.
    loop at itab.
    write : / itab-f1,itab-f2,itab-f3.
    endloop.
    LOOP AT itab.
      pos = pos + 10.
      SKIP TO LINE line1.
      POSITION pos.
      WRITE itab-f1.
      SKIP TO LINE line2.
      POSITION pos.
      WRITE itab-f2.
      SKIP TO LINE line3.
      POSITION pos.
      WRITE itab-f3.
    ENDLOOP.

  • How to Send Internal table to SAP Spool using Function Modules or Methods?

    Hi Experts,
    How to Send Internal table to SAP Spool using Function Modules or Methods?
    Thanks ,
    Kiran

    This is my code.
    I still get the no ABAP list data for the spool, even tho I can see it sp01?
    REPORT  Z_MAIL_PAYSLIP.
    * Declaration Part *
    tables: PERNR, PV000, T549Q, V_T514D, HRPY_RGDIR.
    infotypes: 0000, 0001, 0105, 0655.
    data: begin of ITAB occurs 0,
      MTEXT(25) type C,
      PERNR like PA0001-PERNR,
      ABKRS like PA0001-ABKRS,
      ENAME like PA0001-ENAME,
      USRID_LONG like PA0105-USRID_LONG,
    end of ITAB.
    data: W_BEGDA like HRPY_RGDIR-FPBEG,
          W_ENDDA like HRPY_RGDIR-FPEND.
    data: RETURN like BAPIRETURN1 occurs 0 with header line.
    data: P_INFO like PC407,
          P_FORM like PC408 occurs 0 with header line.
    data: P_IDX type I,
          MY_MONTH type T549Q-PABRP,
          STR_MY_MONTH(2) type C,
          MY_YEAR type T549Q-PABRJ,
          STR_MY_YEAR(4) type C,
          CRLF(2) type x value '0D0A'.
    data: W_CMONTH(10) type C.
    data: TAB_LINES type I,
          ATT_TYPE like SOODK-OBJTP.
    data: begin of P_INDEX occurs 0,
            INDEX type I,
    end of P_INDEX.
    constants: begin of F__LTYPE, "type of line
       CMD like PC408-LTYPE value '/:',  "command
       TXT like PC408-LTYPE value 's',   "textline
    end of F__LTYPE.
    constants: begin of F__CMD, "commands
      NEWPAGE like PC408-LINDA value '',
    end of F__CMD.
    data: P_LIST like ABAPLIST occurs 1 with header line.
    *data: OBJBIN like SOLISTI1 occurs 10 with header line,
    data: OBJBIN like  LVC_S_1022 occurs 10 with header line,
          DOCDATA like SODOCCHGI1,
          OBJTXT like SOLISTI1 occurs 10 with header line,
          OBJPACK like SOPCKLSTI1 occurs 1 with header line,
          RECLIST like SOMLRECI1 occurs 1 with header line,
          OBJHEAD like SOLISTI1 occurs 1 with header line,
          it_mess_att LIKE solisti1 OCCURS 0 WITH HEADER LINE,
          gd_buffer type string,
          l_no_of_bytes TYPE i,
          l_pdf_spoolid LIKE tsp01-rqident,
          l_jobname     LIKE tbtcjob-jobname.
    data: file_length  type int4,
          spool_id     type rspoid,
          line_cnt     type i.
    *-------------------------------------------------------------------* * INITIALIZATION *
    OBJBIN = ' | '.
    append OBJBIN.
    OBJPACK-HEAD_START = 1.
    data: S_ABKRS like PV000-ABKRS.
    data: S_PABRP like T549Q-PABRP.
    data: S_PABRJ like T549Q-PABRJ.
    * SELECTION SCREEN                                                  *
    selection-screen begin of block BL1.
    parameters: PAY_VAR like BAPI7004-PAYSLIP_VARIANT default 'ESS_PAYSLIPS' obligatory.
    selection-screen end of block BL1.
    START-OF-SELECTION.
      s_ABKRS = PNPXABKR.
      S_PABRP = PNPPABRP.
      s_pabrj = PNPPABRJ.
      w_begda = PN-BEGDA.
      w_endda = PN-ENDDA.
    get pernr.
    *                                 "Check active employees
      rp-provide-from-last p0000 space pn-begda  pn-endda.
      CHECK P0000-STAT2 IN PNPSTAT2.
    *                                 "Check Payslip Mail flag
      rp-provide-from-last p0655 space pn-begda  pn-endda.
      CHECK P0655-ESSONLY = 'X'.
      rp-provide-from-last p0001 space pn-begda  pn-endda.
    *                                 "Find email address
      RP-PROVIDE-FROM-LAST P0105 '0030' PN-BEGDA PN-ENDDA.
      if p0105-usrid_LONG ne ''.
        ITAB-PERNR      = P0001-PERNR.
        ITAB-ABKRS      = P0001-ABKRS.
        ITAB-ENAME      = P0001-ENAME.
        ITAB-USRID_LONG = P0105-USRID_LONG.
        append itab.
        clear itab.
      endif.
      "SY-UCOMM ='ONLI'
    END-OF-SELECTION.
    *------------------------------------------------------------------* start-of-selection.
      write : / 'Payroll Area        : ', S_ABKRS.
      write : / 'Payroll Period/Year : ',STR_MY_MONTH,'-',STR_MY_YEAR. write : / 'System Date : ', SY-DATUM.
      write : / 'System Time         : ', SY-UZEIT.
      write : / 'User Name           : ', SY-UNAME.
      write : / SY-ULINE.
      sort ITAB by PERNR.
      loop at ITAB.
        clear : P_INFO, P_FORM, P_INDEX, P_LIST, OBJBIN, DOCDATA, OBJTXT, OBJPACK, RECLIST, TAB_LINES.
        refresh : P_FORM, P_INDEX, P_LIST, OBJBIN, OBJTXT, OBJPACK, RECLIST.
    *                                                  Retrieve Payroll results sequence number for this run
        select single * from HRPY_RGDIR where PERNR eq ITAB-PERNR
                                        and FPBEG ge W_BEGDA
                                        and FPEND le W_ENDDA
                                        and SRTZA eq 'A'.
    *                                                  Produce payslip for those payroll results
        if SY-SUBRC = 0.
          call function 'GET_PAYSLIP'
            EXPORTING
              EMPLOYEE_NUMBER = ITAB-PERNR
              SEQUENCE_NUMBER = HRPY_RGDIR-SEQNR
              PAYSLIP_VARIANT = PAY_VAR
            IMPORTING
              RETURN          = RETURN
              P_INFO          = P_INFO
            TABLES
              P_FORM          = P_FORM.
          check RETURN is initial.
    *                                                 remove linetype from generated payslip
          loop at p_form.
            objbin = p_form-linda.
            append objbin.
            line_cnt = line_cnt + 1.
          endloop.
          file_length = line_cnt * 1022.
    *                                                 create spool file of paylsip
          CALL FUNCTION 'SLVC_TABLE_PS_TO_SPOOL'
            EXPORTING
              i_file_length = file_length
            IMPORTING
              e_spoolid     = spool_id
            TABLES
              it_textdata   = objbin.
          IF sy-subrc EQ 0.
            WRITE spool_id.
          ENDIF.
          DESCRIBE table objbin.
          DATA PDF LIKE TLINE OCCURS 100 WITH HEADER LINE.
          CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
            EXPORTING
              SRC_SPOOLID                    = spool_id
              NO_DIALOG                      = ' '
              DST_DEVICE                     = 'MAIL'
    *      PDF_DESTINATION                =
    *    IMPORTING
    *      PDF_BYTECOUNT                  = l_no_of_bytes
    *      PDF_SPOOLID                    = l_pdf_spoolid
    *      LIST_PAGECOUNT                 =
    *      BTC_JOBNAME                    =
    *      BTC_JOBCOUNT                   =
            TABLES
              PDF                            = pdf
            EXCEPTIONS
              ERR_NO_ABAP_SPOOLJOB           = 1
              ERR_NO_SPOOLJOB                = 2
              ERR_NO_PERMISSION              = 3
              ERR_CONV_NOT_POSSIBLE          = 4
              ERR_BAD_DESTDEVICE             = 5
              USER_CANCELLED                 = 6
              ERR_SPOOLERROR                 = 7
              ERR_TEMSEERROR                 = 8
              ERR_BTCJOB_OPEN_FAILED         = 9
              ERR_BTCJOB_SUBMIT_FAILED       = 10
              ERR_BTCJOB_CLOSE_FAILED        = 11
              OTHERS                         = 12
          IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
    *Download PDF file C Drive
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename = 'C:\itab_to_pdf.pdf'
          filetype = 'BIN'
        TABLES
          data_tab = pdf.
    * Transfer the 132-long strings to 255-long strings
    *  LOOP AT pdf.
    *    TRANSLATE pdf USING ' ~'.
    *    CONCATENATE gd_buffer pdf INTO gd_buffer.
    *  ENDLOOP.
    *  TRANSLATE gd_buffer USING '~ '.
    *  DO.
    *    it_mess_att = gd_buffer.
    *    APPEND it_mess_att.
    *    SHIFT gd_buffer LEFT BY 255 PLACES.
    *    IF gd_buffer IS INITIAL.
    *      EXIT.
    *    ENDIF.
    *  ENDDO.
          OBJHEAD = 'Objhead'.
          append OBJHEAD.
    * preparing email subject
          concatenate W_ENDDA(6)
                    ' Payslip-'
                    ITAB-ENAME+0(28)
                    ITAB-PERNR+4(4) ')'
                 into DOCDATA-OBJ_DESCR.
          DOCDATA-OBJ_NAME = 'Pay Slip'.
          DOCDATA-OBJ_LANGU = SY-LANGU.
          OBJTXT = 'Pay Slip.'.
          append OBJTXT.
    *prepare email lines
          OBJTXT = DOCDATA-OBJ_DESCR.
          append OBJTXT.
          OBJTXT = 'Please find enclosed your current payslip.'.
          append OBJTXT.
    * Write Attachment(Main)
    * 3 has been fixed because OBJTXT has fix three lines
          read table OBJTXT index 3.
    *    DOCDATA-DOC_SIZE = ( 3 - 1 ) * 255 + strlen( OBJTXT ).
          clear OBJPACK-TRANSF_BIN.
          OBJPACK-HEAD_START = 1.
          OBJPACK-HEAD_NUM = 0.
          OBJPACK-BODY_START = 1.
          OBJPACK-BODY_NUM = 3.
          OBJPACK-DOC_TYPE = 'RAW'.
          append OBJPACK.
    * Create Message Attachment
          ATT_TYPE = 'PDF'.
          describe table OBJBIN lines TAB_LINES.
          read table OBJBIN index TAB_LINES.
    *    OBJPACK-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + strlen( OBJBIN ).
          OBJPACK-TRANSF_BIN = 'X'.
          OBJPACK-HEAD_START = 1.
          OBJPACK-HEAD_NUM = 0.
          OBJPACK-BODY_START = 1.
          OBJPACK-BODY_NUM = TAB_LINES.
          OBJPACK-DOC_TYPE = ATT_TYPE.
          OBJPACK-OBJ_NAME = 'ATTACHMENT'.
          OBJPACK-OBJ_DESCR = 'Payslip'.
          append OBJPACK.
    * Create receiver list refresh RECLIST.
          clear RECLIST.
          RECLIST-RECEIVER = itab-USRID_long.
          translate RECLIST-RECEIVER to lower case.
          RECLIST-REC_TYPE = 'U'.
          append RECLIST.
    * Send the document
    *SO_NEW_DOCUMENT_ATT_SEND_API1
          call function 'SO_DOCUMENT_SEND_API1'
            exporting
              DOCUMENT_DATA = DOCDATA
              PUT_IN_OUTBOX = 'X'
              COMMIT_WORK = 'X'
    * IMPORTING
    *   SENT_TO_ALL =
    *   NEW_OBJECT_ID =
            tables
              PACKING_LIST  = OBJPACK
              OBJECT_HEADER = OBJHEAD
              CONTENTS_BIN  = pdf
              CONTENTS_TXT  = OBJTXT
    *   CONTENTS_HEX =
    *   OBJECT_PARA =
    *   OBJECT_PARB =
              RECEIVERS = RECLIST
            exceptions
              TOO_MANY_RECEIVERS = 1
              DOCUMENT_NOT_SENT = 2
              DOCUMENT_TYPE_NOT_EXIST = 3
              OPERATION_NO_AUTHORIZATION = 4
              PARAMETER_ERROR = 5
              X_ERROR = 6
              ENQUEUE_ERROR = 7
              others = 8.
          if SY-SUBRC NE 0.
            ITAB-MTEXT = 'Message Not Sent to : '.
          else.
            ITAB-MTEXT = 'Message Sent to : '.
          endif.
    *    else.
    *      ITAB-MTEXT = 'Message Not Sent to : '.
    *    endif.
        else.
          "SY-SUBRC Not = 0
          ITAB-MTEXT = 'Payroll data not found : '.
        endif.
        "end of SY-SUBRC = 0.
        modify ITAB.
      endloop. "end loop at ITAB
      sort ITAB by MTEXT PERNR.
      loop at ITAB.
        at new MTEXT.
          uline.
          write : / ITAB-MTEXT color 4 intensified on.
          write : / 'Emp. Code' color 2 intensified on,
                 12 'Emp. Name' color 2 intensified on,
                 54 'Email ID' color 2 intensified on.
        endat.
        write : / ITAB-PERNR, 12 ITAB-ENAME, 54 ITAB-USRID_LONG.
      endloop.

  • How to add internal table fileds in Text module in smart forms

    Hi Friends,
        How to add internal table fileds in Text module in smart forms?
    Thanks & Regards,
    Vallamuthu.M

    Hi Vallamuthu ,
    how did you solve your problem?
    thanks,

  • How to display a table control in a report

    hi
    how to display a table control in a report

    create a screen in your report.
    Call that screen in your report.
    While designing your screen, use Table control creation wizard to create table control on that screen.
    http://www.planetsap.com/online_pgm_main_page.htm

  • How to get internal table from SAP Data Provider C#

    Hello.
    ABAP:
       DATA: lt_t001 TYPE TABLE OF t001.
       DATA: url(1000) TYPE c.
      SELECT * INTO TABLE lt_t001 FROM t001.
      CALL FUNCTION 'DP_CREATE_URL'
        EXPORTING
          type                 = 'APPLICATION'
          subtype           = 'X-R3TABLE'
        TABLES
          data                 = lt_t001
        CHANGING
          url                    = url
        EXCEPTIONS
          OTHERS           = 4.
    C#:
    using SAPDataProvider;
    using SAPTableFactoryCtrl;
    public void SetDataFromUrl(string url)
                SAPDataProviderClass p = new SAPDataProviderClass();
                p.SetDataFromURL("APPLICATION", "X-R3TABLE", url);
                ISapDPR3Table tbl = p.GetDataAsR3Table("APPLICATION", "X-R3TABLE");
                SAPTableFactoryClass tf = new SAPTableFactoryClass();
                Table tb = (Table)tf.NewTable();
                tb.ISAPrfcITab = tbl.DataTable; // Exception !!!!!!
    How to get internal table from SAP Data Provider ?

    Hi Sergey,
    I'm trying to do the same, have you found a solution to solved it?
    thanks for your help.
    Regards.
    Jonathan

  • How to access internal table data from webdynpro to Flex application.

    Hi Connoisseur
    The data transfer from Abap WebDeypro to flex island works well. I followed , there is an example from Thomas Jung (by the way as always Great Work) and  Karthikeyan Venkatesan (Infosys) but this example covers simple type only.
    There is no example with complex types like arrayCollection which handle the transfer of data from flex to WebDynpro.
    i tried to do pass internal table value  to flex-datagrid.but its not work.
    i would like to know
    1.how to access internal table data from webdynpro to Flex application.
    2.how to pass the internal table to flex-datagrid.
    2.how to pass dynamically in ADOBE flex.
    3. how to do Flex is receiving the wd context data?
    4. how can we update WD context with FLEX data.
    Ple give me sample example and step by step procedure.
    Regards
    laxmikanth

    Hi Laxmikanth,
    Please refer this...
    Flash island: update complex type from flex
    Cheers..
    kris.

  • How to create internal table for a structure in BSP

    hi ,
    I have created a Structure in BSP.I want to create an internal table for that Structure. But in my coding ie.
    <% data: begin of itab_1 .
                     include type zuvendstr.
                     data:end of itab_1.
                     data wa_str like line of itab_1.
                     loop at itab_1 into wa_str. %>
                    <tr>
                     <td><%=wa_str-name%> </td>
                           <%endloop.%>
    In this zuvendstr is Structure ,wa_str is workarea and itab_1 is an Internal table.But it is showinng an error that itab_1 is unknown.But we cannot define internal tables for an Structure in Page Attributes.So,please resolve how to create internal table for Structure in BSPS

    Hi,
    You can define itab_1 like this (assuming zuvendstr is a structure type):
    DATA: itab_1 TYPE TABLE OF zuvendstr.
    Regards,
    Tanguy

Maybe you are looking for