Internal table handling for table controls

hi,
can any one say me how we manage to store one header data and more than one line item data in one internal table. pls provide me one example with code.
thanks,

You need to make sure that table t_open_summ contains only the data for PO =xxxx matnr=xxx to begin with. I.e. when that table is filled in, just don't put any other data there. Then all the corresponding scrolling code (Page Up/Down) will work as usual.
As an alternative, you could create a "clone" of t_open_summ and work with it instead.

Similar Messages

  • Transaction code for Table Maitainence for table

    Hi all,
    i have created Table Maintainece for Table and also i need to create transaction code
    for table maintainence.
    there when i create transaction code with TRANSACTION with PARAMETERS and SKIP FIRST  SCREEN.
    I can see all the records in the table into table Maintainence.
    Is ther is any possibility like i can restrict records on the key fields (like selection screen).
    Will anybody let me know how to goahead with this requirement.
    Regards,
    Madhavi

    You can build a small report that call the maintenance view. In the report, convert the SELECT-OPTIONS input to the [DBA_SELLIST|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=dba_sellist&adv=false&sortby=cm_rnd_rankvalue] parameter of function module [VIEW_MAINTENANCE_CALL|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=view_maintenance_call&adv=false&sortby=cm_rnd_rankvalue].
    If you have "pertinent" key to filter the data, you may define these as sub-key in a mainetance view, those fields will be asked for when entering the maintanance dialog. Or you can build a [view cluster|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=se55&adv=false&sortby=cm_rnd_rankvalue] using these sub-set keys.
    Regards

  • Error in creating Table Maintenance for TABLES: J_2IRG1BAL ,Dump error show

    Dear Gurus
    I have Created one Table Maintenance for TABLES: J_2IRG1BAL ,
    1) I have take function group as same as table name like J_2IRG1BAL
    3) Authorization Group  &NC&
    4) Authorization object S_TABU_DIS
    5) Function group  J_2IRG1BAL
    6) Package J1I5
    7) Maintenance type one step.
    8) Maint. Screen No.    Overview screen 2009.
    9) Recording routine STD recording routines .
    I have assign screen single screen 1 but it will not take the screen so ill put screen 2009 ,the system will not not accept the screen but I proposed to Save and activate the table maintenance generator  and created and save the function group ,the table is ready to save the entries
    We have to go to SM30 then put 4-5 entries ,after that a dump error shows
    Which i have attachéd in this mail kindly help me out
    Its effect in production server.
    I have found that the error is given below I have mentioned all the details
    Kindly read this 
    I have created function group J_2IRG1BAL and  assign Package J1I5 and function group,J1I5 is already a Function group so problem occurs a dump error message displays
    Kindly give me the right solution all the Clients are effected
    110,100 150,250 these all are effected development clients
    300 is prod client this is also affected  because I have created a table maintenance generator and send the req to production .
    *Dump Error Shows in Production*
    Runtime Errors         SYNTAX_ERROR
    Date and Time          11.12.2008 09:26:30
    What happened?                                                                               
    |    Error in ABAP application program.                                                                               
    Error analysis
    In program "SAPLJ1I5 ", the following syntax error occurred:
    "The program "SAPLJ1I5" is not Unicode-compatible, according to its pro"
    "gram attributes."
    The current ABAP program "SAPLSVIM" had to be terminated because one of the
    statements could not be executed.
    This is probably due to an error in the ABAP program.
    In program "SAPLJ1I5 ", the following syntax error occurred
    in the Include "SAPLJ1I5 " in line 0:
    "The program "SAPLJ1I5" is not Unicode-compatible, according to its pro"
    "gram attributes."
    rigger Location of Runtime Error                                                                 |
    Program                                 SAPLSVIM
    Include                                 LSVIMU01
    Row                                     107
    Module type                             (FUNCTION)
    |    Module Name                             VIEW_MAINTENANCE 
    Author and last person to change the Include are:
    Author "TTLABAP2 "
    Last changed by "TTLABAP2 "                 
    105
    Initialisierung des Abgleichsmandanten zum View                     *
    106
    >>>>>
    vim_default_upgr_clnt-viewname = x_header-viewname.
    108
    vim_default_upgr_clnt-client   = client_for_upgrade.
    109
    PERFORM vim_set_global_field_value IN PROGRAM (fpool)
    |  110|            USING 'VIM_DEFAULT_UPGR_CLNT' 'C' vim_default_upgr_clnt rc.

    I have send you all the details regarding the table maintenance generator
    error is shown below
                                           I have Created one Table Maintenance for TABLES: J_2IRG1BAL ,
    1) I have take function group as same as table name like J_2IRG1BAL
    3) Authorization Group  &NC&
    4) Authorization object S_TABU_DIS
    5) Function group  J_2IRG1BAL
    6) Package J1I5
    7) Maintenance type one step.
    8) Maint. Screen No.    Overview screen 2009.
    9) Recording routine STD recording routines .
    I have assign screen single screen 1 but it will not take the screen so ill put screen 2009 ,the system will not not accept the screen but I proposed to Save and activate the table maintenance generator  and created and save the function group ,the table is ready to save the entries
    We have to go to SM30 then put 4-5 entries ,after that a dump error shows
    Which i have attachéd in this mail kindly help me out
    Its effect in production server.
    I have found that the error is given below I have mentioned all the details
    Kindly read this 
    I have created function group J_2IRG1BAL and  assign Package J1I5 and function group,J1I5 is already a Function group so problem occurs a dump error message displays
    Kindly give me the right solution all the Clients are effected
    110,100 150,250 these all are effected development clients
    300 is prod client this is also affected  because I have created a table maintenance generator and send the req to production .
                                                                                    Runtime Errors         SYNTAX_ERROR
    Date and Time          11.12.2008 09:26:30
    ShrtText
    Syntax error in program "SAPLJ1I5 ".
    What happened?
    Error in ABAP application program.
    The current ABAP program "SAPLSVIM" had to be terminated because one of the
    statements could not be executed.
    This is probably due to an error in the ABAP program.
    In program "SAPLJ1I5 ", the following syntax error occurred
    in the Include "SAPLJ1I5 " in line 0:
    "The program "SAPLJ1I5" is not Unicode-compatible, according to its pro"
    "gram attributes."
    Author and last person to change the Include are:
    Author "TTLABAP2 "
    Last changed by "TTLABAP2 "
    Error analysis
    In program "SAPLJ1I5 ", the following syntax error occurred:
    "The program "SAPLJ1I5" is not Unicode-compatible, according to its pro"
    "gram attributes."
    Trigger Location of Runtime Error
    Program                                 SAPLSVIM
    Include                                 LSVIMU01
    Row                                     107
    Module type                             (FUNCTION)
    Module Name                             VIEW_MAINTENANCE
    Source Code Extract
    Line
    SourceCde
    77
    TRANSPORTING NO FIELDS.
    78
    IF sy-subrc NE 0.
    79
    SELECT SINGLE * FROM tfdir WHERE funcname EQ <function_name>.
    80
    IF sy-subrc NE 0.
    81
    RAISE no_editor_function.
    82
    ELSE.
    83
    length = strlen( function_name1 ).
    84
    ASSIGN function_name1(length) TO <function_name>.
    85
    SELECT SINGLE * FROM tfdir WHERE funcname EQ <function_name>.
    86
    IF sy-subrc NE 0.
    87
    RAISE no_database_function.
    88
    ENDIF.
    89
    ENDIF.
    90
    INSERT x_header-viewname INTO alr_checked_views INDEX sy-tabix.
    91
    ELSE.
    92
    length = strlen( function_name1 ).
    93
    ASSIGN function_name1(length) TO <function_name>.
    94
    ENDIF.
    95
    96
    Initialisierung der RFC-Destination zum View                        *
    97
    98
    FPOOL+4 = X_HEADER-AREA.
    99
    fpool   = x_header-fpoolname.
    100
    vim_default_rfc_dest-viewname = x_header-viewname.
    101
    vim_default_rfc_dest-rfcdest  = rfc_destination_for_upgrade.
    102
    PERFORM vim_set_global_field_value IN PROGRAM (fpool)
    103
    USING 'VIM_DEFAULT_RFC_DEST' 'C' vim_default_rfc_dest rc.
    104
    105
    Initialisierung des Abgleichsmandanten zum View                     *
    106
    >>>>>
    vim_default_upgr_clnt-viewname = x_header-viewname.
    108
    vim_default_upgr_clnt-client   = client_for_upgrade.
    109
    PERFORM vim_set_global_field_value IN PROGRAM (fpool)
    110
    USING 'VIM_DEFAULT_UPGR_CLNT' 'C' vim_default_upgr_clnt rc.
    111
    112
    set flag if complex selection conditions in sellist                  *
    113
    114
    IF complex_selconds_used NE space.
    115
    READ TABLE dba_sellist INDEX 1.
    116
    IF sy-subrc EQ 0 AND dba_sellist-cond_kind EQ space.
    117
    dba_sellist-cond_kind = 'C'. MODIFY dba_sellist INDEX 1.
    118
    ENDIF.
    119
    ENDIF.
    120
    121
    direkter Vergleich: Flagge setzen usw.                              *
    122
    123
    IF view_action EQ vim_direct_upgrade.
    124
    view_action = aendern.
    125
    PERFORM vim_set_global_field_value IN PROGRAM (fpool)
    126
    USING 'VIM_SPECIAL_MODE' 'C' vim_direct_upgrade rc.

  • How to gather table stats for tables in a different schema

    Hi All,
    I have a table present in one schema and I want to gather stats for the table in a different schema.
    I gave GRANT ALL ON SCHEMA1.T1 TO SCHEMA2;
    And when I tried to execute the command to gather stats using
    DBMS_STATS.GATHER_TABLE_STATS (OWNNAME=>'SCHMEA1',TABNAME=>'T1');
    The function is failing.
    Is there any way we can gather table stats for tables in one schema in an another schema.
    Thanks,
    MK.

    You need to grant analyze any to schema2.
    SY.

  • No database table exists for table

    HI All,
    We created a Ztable  and used in two of reports these reports woking fine in PRD,few days back we assigned authorization group and functional group to these table now this table throwing eeror in QAS as well as PRD like No database table exists for table ZXXX,client dont want the data in this table so we deleted this table and created with same name to QAS still same error we are unbale to findout the problem.pls any on help me out..

    Hi Srinivas,
    I am also facing similar kind of issue, can you please let me know your approach towards resolving the issue without deleting the existing data from the table.
    Thanks in advance.
    Best Regards,
    Anil Neegineni

  • Unable get the table scroll for table control

    hai
    i unable get horizontal scrolling for table control when the output is dislayed
    help me
    very urgent

    Hi,
    check out the sample program it might help you
    See the following simple ex
    *& Module pool ZTEST_TBLCTRL
    PROGRAM ZTEST_TBLCTRL.
    ***&SPWIZARD: DATA DECLARATION FOR TABLECONTROL 'TC1'
    *&SPWIZARD: DEFINITION OF DDIC-TABLE
    TABLES: ZFG_SRNO, ZFIH0004.
    *&SPWIZARD: TYPE FOR THE DATA OF TABLECONTROL 'TC1'
    *TYPES: BEGIN OF T_TC1,
    ZSRNO LIKE ZFG_SRNO-ZSRNO,
    SCRNAME LIKE ZFIH0004-SCRNAME,
    END OF T_TC1.
    *TYPES: BEGIN OF T_TC1.
    STRUCTURE ZFG_SRNO.
    END OF T_TC1.
    *&SPWIZARD: INTERNAL TABLE FOR TABLECONTROL 'TC1'
    *DATA: G_TC1_ITAB TYPE T_TC1 OCCURS 0 WITH HEADER LINE,
    G_TC1_WA TYPE T_TC1. "work area
    DATA: G_TC1_ITAB LIKE ZFG_SRNO OCCURS 0 WITH HEADER LINE,
    G_TC1_WA LIKE G_TC1_ITAB. "work area
    DATA: G_TC1_COPIED. "copy flag
    *&SPWIZARD: DECLARATION OF TABLECONTROL 'TC1' ITSELF
    CONTROLS: TC1 TYPE TABLEVIEW USING SCREEN 0100.
    *&SPWIZARD: LINES OF TABLECONTROL 'TC1'
    DATA: G_TC1_LINES LIKE SY-LOOPC.
    DATA: OK_CODE LIKE SY-UCOMM,
    S_CODE LIKE SY-UCOMM,
    MARK.
    DATA: T1(10).
    *&SPWIZARD: OUTPUT MODULE FOR TC 'TC1'. DO NOT CHANGE THIS LINE!
    *&SPWIZARD: COPY DDIC-TABLE TO ITAB
    MODULE TC1_INIT OUTPUT.
    IF G_TC1_COPIED IS INITIAL.
    *&SPWIZARD: COPY DDIC-TABLE 'ZFG_SRNO'
    *&SPWIZARD: INTO INTERNAL TABLE 'g_TC1_itab'
    SELECT * FROM ZFG_SRNO
    INTO CORRESPONDING FIELDS
    OF TABLE G_TC1_ITAB.
    G_TC1_COPIED = 'X'.
    REFRESH CONTROL 'TC1' FROM SCREEN '0100'.
    IF T1 <> SPACE.
    G_TC1_ITAB-ZSRNO = T1.
    CLEAR T1.
    APPEND G_TC1_ITAB.
    REFRESH CONTROL 'TC1' FROM SCREEN '0100'.
    ENDIF.
    *TC1-TOP_LINE = 1.
    ENDIF.
    ENDMODULE.
    *&SPWIZARD: OUTPUT MODULE FOR TC 'TC1'. DO NOT CHANGE THIS LINE!
    *&SPWIZARD: MOVE ITAB TO DYNPRO
    MODULE TC1_MOVE OUTPUT.
    MOVE-CORRESPONDING G_TC1_WA TO ZFG_SRNO.
    if sy-subrc ne 0.
    *append G_TC1_WA to G_TC1_ITAB.
    *endif.
    READ TABLE G_TC1_ITAB INDEX TC1-CURRENT_LINE.
    IF SY-SUBRC = 0.
    G_TC1_WA-ZSRNO = G_TC1_ITAB-ZSRNO.
    ENDIF.
    MOVE-CORRESPONDING G_TC1_ITAB TO ZFG_SRNO.
    REFRESH CONTROL 'TC1' FROM SCREEN '8001'.
    *******Below line is the logic for scrolling.
    tc1-lines = G_TC1_LINES + 100.
    ENDMODULE.
    *&SPWIZARD: OUTPUT MODULE FOR TC 'TC1'. DO NOT CHANGE THIS LINE!
    *&SPWIZARD: GET LINES OF TABLECONTROL
    MODULE TC1_GET_LINES OUTPUT.
    G_TC1_LINES = SY-LOOPC.
    ENDMODULE.
    *&SPWIZARD: INPUT MODULE FOR TC 'TC1'. DO NOT CHANGE THIS LINE!
    *&SPWIZARD: MODIFY TABLE
    MODULE TC1_MODIFY INPUT.
    *break-point.
    MOVE-CORRESPONDING ZFG_SRNO TO G_TC1_ITAB.
    MODIFY G_TC1_ITAB INDEX TC1-CURRENT_LINE.
    G_TC1_COPIED = 'X'.
    REFRESH CONTROL 'TC1' FROM SCREEN '8001'.
    MOVE-CORRESPONDING ZFG_SRNO TO G_TC1_WA.
    MODIFY G_TC1_ITAB
    FROM G_TC1_WA
    INDEX TC1-CURRENT_LINE.
    G_TC1_COPIED = 'X'.
    if sy-subrc ne 0.
    append G_TC1_WA to G_TC1_ITAB.
    endif.
    *modify G_TC1_ITAB INDEX TC1-CURRENT_LINE.
    ENDMODULE.
    *&SPWIZARD: INPUT MODULE FOR TC 'TC1'. DO NOT CHANGE THIS LINE!
    *&SPWIZARD: PROCESS USER COMMAND
    MODULE TC1_USER_COMMAND INPUT.
    OK_CODE = SY-UCOMM.
    PERFORM USER_OK_TC USING 'TC1'
    'G_TC1_ITAB'
    'FLAG'
    CHANGING OK_CODE.
    SY-UCOMM = OK_CODE.
    ENDMODULE.
    INCLUDE TABLECONTROL_FORMS *
    *& Form USER_OK_TC *
    FORM USER_OK_TC USING P_TC_NAME TYPE DYNFNAM
    P_TABLE_NAME
    P_MARK_NAME
    CHANGING P_OK LIKE SY-UCOMM.
    &SPWIZARD: BEGIN OF LOCAL DATA----
    DATA: L_OK TYPE SY-UCOMM,
    L_OFFSET TYPE I.
    &SPWIZARD: END OF LOCAL DATA----
    *&SPWIZARD: Table control specific operations *
    *&SPWIZARD: evaluate TC name and operations *
    SEARCH P_OK FOR P_TC_NAME.
    IF SY-SUBRC <> 0.
    EXIT.
    ENDIF.
    L_OFFSET = STRLEN( P_TC_NAME ) + 1.
    L_OK = P_OK+L_OFFSET.
    *&SPWIZARD: execute general and TC specific operations *
    CASE L_OK.
    WHEN 'INSR'. "insert row
    PERFORM FCODE_INSERT_ROW USING P_TC_NAME
    P_TABLE_NAME.
    CLEAR P_OK.
    WHEN 'DELE'. "delete row
    PERFORM FCODE_DELETE_ROW USING P_TC_NAME
    P_TABLE_NAME
    P_MARK_NAME.
    CLEAR P_OK.
    WHEN 'P--' OR "top of list
    'P-' OR "previous page
    'P+' OR "next page
    'P++'. "bottom of list
    PERFORM COMPUTE_SCROLLING_IN_TC USING P_TC_NAME
    L_OK.
    CLEAR P_OK.
    WHEN 'L--'. "total left
    PERFORM FCODE_TOTAL_LEFT USING P_TC_NAME.
    WHEN 'L-'. "column left
    PERFORM FCODE_COLUMN_LEFT USING P_TC_NAME.
    WHEN 'R+'. "column right
    PERFORM FCODE_COLUMN_RIGHT USING P_TC_NAME.
    WHEN 'R++'. "total right
    PERFORM FCODE_TOTAL_RIGHT USING P_TC_NAME.
    WHEN 'MARK'. "mark all filled lines
    PERFORM FCODE_TC_MARK_LINES USING P_TC_NAME
    P_TABLE_NAME
    P_MARK_NAME .
    CLEAR P_OK.
    WHEN 'DMRK'. "demark all filled lines
    PERFORM FCODE_TC_DEMARK_LINES USING P_TC_NAME
    P_TABLE_NAME
    P_MARK_NAME .
    CLEAR P_OK.
    WHEN 'SASCEND' OR
    'SDESCEND'. "sort column
    PERFORM FCODE_SORT_TC USING P_TC_NAME
    l_ok.
    ENDCASE.
    ENDFORM. " USER_OK_TC
    *& Form FCODE_INSERT_ROW *
    FORM fcode_insert_row
    USING P_TC_NAME TYPE DYNFNAM
    P_TABLE_NAME .
    &SPWIZARD: BEGIN OF LOCAL DATA----
    DATA L_LINES_NAME LIKE FELD-NAME.
    DATA L_SELLINE LIKE SY-STEPL.
    DATA L_LASTLINE TYPE I.
    DATA L_LINE TYPE I.
    DATA L_TABLE_NAME LIKE FELD-NAME.
    FIELD-SYMBOLS <TC> TYPE CXTAB_CONTROL.
    FIELD-SYMBOLS <TABLE> TYPE STANDARD TABLE.
    FIELD-SYMBOLS <LINES> TYPE I.
    &SPWIZARD: END OF LOCAL DATA----
    ASSIGN (P_TC_NAME) TO <TC>.
    *&SPWIZARD: get the table, which belongs to the tc *
    CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
    ASSIGN (L_TABLE_NAME) TO <TABLE>. "not headerline
    *&SPWIZARD: get looplines of TableControl *
    CONCATENATE 'G_' P_TC_NAME '_LINES' INTO L_LINES_NAME.
    ASSIGN (L_LINES_NAME) TO <LINES>.
    *&SPWIZARD: get current line *
    GET CURSOR LINE L_SELLINE.
    IF SY-SUBRC <> 0. " append line to table
    L_SELLINE = <TC>-LINES + 1.
    *&SPWIZARD: set top line *
    IF L_SELLINE > <LINES>.
    <TC>-TOP_LINE = L_SELLINE - <LINES> + 1 .
    ELSE.
    <TC>-TOP_LINE = 1.
    ENDIF.
    ELSE. " insert line into table
    L_SELLINE = <TC>-TOP_LINE + L_SELLINE - 1.
    L_LASTLINE = <TC>-TOP_LINE + <LINES> - 1.
    ENDIF.
    *&SPWIZARD: set new cursor line *
    L_LINE = L_SELLINE - <TC>-TOP_LINE + 1.
    *&SPWIZARD: insert initial line *
    INSERT INITIAL LINE INTO <TABLE> INDEX L_SELLINE.
    <TC>-LINES = <TC>-LINES + 1.
    *&SPWIZARD: set cursor *
    SET CURSOR LINE L_LINE.
    ENDFORM. " FCODE_INSERT_ROW
    *& Form FCODE_DELETE_ROW *
    FORM fcode_delete_row
    USING P_TC_NAME TYPE DYNFNAM
    P_TABLE_NAME
    P_MARK_NAME .
    &SPWIZARD: BEGIN OF LOCAL DATA----
    DATA L_TABLE_NAME LIKE FELD-NAME.
    FIELD-SYMBOLS <TC> TYPE cxtab_control.
    FIELD-SYMBOLS <TABLE> TYPE STANDARD TABLE.
    FIELD-SYMBOLS <WA>.
    FIELD-SYMBOLS <MARK_FIELD>.
    &SPWIZARD: END OF LOCAL DATA----
    ASSIGN (P_TC_NAME) TO <TC>.
    *&SPWIZARD: get the table, which belongs to the tc *
    CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
    ASSIGN (L_TABLE_NAME) TO <TABLE>. "not headerline
    *&SPWIZARD: delete marked lines *
    DESCRIBE TABLE <TABLE> LINES <TC>-LINES.
    LOOP AT <TABLE> ASSIGNING <WA>.
    *&SPWIZARD: access to the component 'FLAG' of the table header *
    ASSIGN COMPONENT P_MARK_NAME OF STRUCTURE <WA> TO <MARK_FIELD>.
    IF <MARK_FIELD> = 'X'.
    DELETE <TABLE> INDEX SYST-TABIX.
    IF SY-SUBRC = 0.
    <TC>-LINES = <TC>-LINES - 1.
    ENDIF.
    ENDIF.
    ENDLOOP.
    ENDFORM. " FCODE_DELETE_ROW
    *& Form COMPUTE_SCROLLING_IN_TC
    text
    -->P_TC_NAME name of tablecontrol
    -->P_OK ok code
    FORM COMPUTE_SCROLLING_IN_TC USING P_TC_NAME
    P_OK.
    &SPWIZARD: BEGIN OF LOCAL DATA----
    DATA L_TC_NEW_TOP_LINE TYPE I.
    DATA L_TC_NAME LIKE FELD-NAME.
    DATA L_TC_LINES_NAME LIKE FELD-NAME.
    DATA L_TC_FIELD_NAME LIKE FELD-NAME.
    FIELD-SYMBOLS <TC> TYPE cxtab_control.
    FIELD-SYMBOLS <LINES> TYPE I.
    &SPWIZARD: END OF LOCAL DATA----
    ASSIGN (P_TC_NAME) TO <TC>.
    *&SPWIZARD: get looplines of TableControl *
    CONCATENATE 'G_' P_TC_NAME '_LINES' INTO L_TC_LINES_NAME.
    ASSIGN (L_TC_LINES_NAME) TO <LINES>.
    *&SPWIZARD: is no line filled? *
    IF <TC>-LINES = 0.
    *&SPWIZARD: yes, ... *
    L_TC_NEW_TOP_LINE = 1.
    ELSE.
    *&SPWIZARD: no, ... *
    CALL FUNCTION 'SCROLLING_IN_TABLE'
    EXPORTING
    ENTRY_ACT = <TC>-TOP_LINE
    ENTRY_FROM = 1
    ENTRY_TO = <TC>-LINES
    LAST_PAGE_FULL = 'X'
    LOOPS = <LINES>
    OK_CODE = P_OK
    OVERLAPPING = 'X'
    IMPORTING
    ENTRY_NEW = L_TC_NEW_TOP_LINE
    EXCEPTIONS
    NO_ENTRY_OR_PAGE_ACT = 01
    NO_ENTRY_TO = 02
    NO_OK_CODE_OR_PAGE_GO = 03
    OTHERS = 0.
    ENDIF.
    *&SPWIZARD: get actual tc and column *
    GET CURSOR FIELD L_TC_FIELD_NAME
    AREA L_TC_NAME.
    IF SYST-SUBRC = 0.
    IF L_TC_NAME = P_TC_NAME.
    *&SPWIZARD: et actual column *
    SET CURSOR FIELD L_TC_FIELD_NAME LINE 1.
    ENDIF.
    ENDIF.
    *&SPWIZARD: set the new top line *
    <TC>-TOP_LINE = L_TC_NEW_TOP_LINE.
    ENDFORM. " COMPUTE_SCROLLING_IN_TC
    *& Form FCODE_TC_MARK_LINES
    marks all TableControl lines
    -->P_TC_NAME name of tablecontrol
    FORM FCODE_TC_MARK_LINES USING P_TC_NAME
    P_TABLE_NAME
    P_MARK_NAME.
    &SPWIZARD: EGIN OF LOCAL DATA----
    DATA L_TABLE_NAME LIKE FELD-NAME.
    FIELD-SYMBOLS <TC> TYPE cxtab_control.
    FIELD-SYMBOLS <TABLE> TYPE STANDARD TABLE.
    FIELD-SYMBOLS <WA>.
    FIELD-SYMBOLS <MARK_FIELD>.
    &SPWIZARD: END OF LOCAL DATA----
    ASSIGN (P_TC_NAME) TO <TC>.
    *&SPWIZARD: get the table, which belongs to the tc *
    CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
    ASSIGN (L_TABLE_NAME) TO <TABLE>. "not headerline
    *&SPWIZARD: mark all filled lines *
    LOOP AT <TABLE> ASSIGNING <WA>.
    *&SPWIZARD: access to the component 'FLAG' of the table header *
    ASSIGN COMPONENT P_MARK_NAME OF STRUCTURE <WA> TO <MARK_FIELD>.
    <MARK_FIELD> = 'X'.
    ENDLOOP.
    ENDFORM. "fcode_tc_mark_lines
    *& Form FCODE_TC_DEMARK_LINES
    demarks all TableControl lines
    -->P_TC_NAME name of tablecontrol
    FORM FCODE_TC_DEMARK_LINES USING P_TC_NAME
    P_TABLE_NAME
    P_MARK_NAME .
    &SPWIZARD: BEGIN OF LOCAL DATA----
    DATA L_TABLE_NAME LIKE FELD-NAME.
    FIELD-SYMBOLS <TC> TYPE cxtab_control.
    FIELD-SYMBOLS <TABLE> TYPE STANDARD TABLE.
    FIELD-SYMBOLS <WA>.
    FIELD-SYMBOLS <MARK_FIELD>.
    &SPWIZARD: END OF LOCAL DATA----
    ASSIGN (P_TC_NAME) TO <TC>.
    *&SPWIZARD: get the table, which belongs to the tc *
    CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
    ASSIGN (L_TABLE_NAME) TO <TABLE>. "not headerline
    *&SPWIZARD: demark all filled lines *
    LOOP AT <TABLE> ASSIGNING <WA>.
    *&SPWIZARD: access to the component 'FLAG' of the table header *
    ASSIGN COMPONENT P_MARK_NAME OF STRUCTURE <WA> TO <MARK_FIELD>.
    <MARK_FIELD> = SPACE.
    ENDLOOP.
    ENDFORM. "fcode_tc_mark_lines
    *& Module D20XX_INIT OUTPUT
    text
    MODULE D20XX_INIT OUTPUT.
    *if screen-name = 'ZSRNO'.
    SCREEN-INPUT = 0.
    SCREEN-COLOR = 0.
    MODIFY SCREEN.
    endif.
    ENDMODULE. " D20XX_INIT OUTPUT
    *& Module STATUS_0100 OUTPUT
    text
    MODULE STATUS_0100 OUTPUT.
    SET PF-STATUS 'xxxxxxxx'.
    SET TITLEBAR 'xxx'.
    *CLEAR R1_REF.
    DO 30 TIMES.
    APPEND G_TC1_ITAB.
    ENDDO.
    DESCRIBE TABLE G_TC1_ITAB LINES TC1-LINES.
    ENDMODULE. " STATUS_0100 OUTPUT
    *& Module TAB1_INIT OUTPUT
    text
    MODULE TAB1_INIT OUTPUT.
    ENDMODULE. " TAB1_INIT OUTPUT
    *& Module USER_COMMAND_0100 INPUT
    text
    MODULE USER_COMMAND_0100 INPUT.
    ENDMODULE. " USER_COMMAND_0100 INPUT
    *& Module MESSAGE INPUT
    text
    MODULE MESSAGE INPUT.
    OK_CODE = SY-UCOMM.
    S_CODE = OK_CODE.
    CLEAR OK_CODE.
    if S_CODE = 'DELE'.
    loop at G_TC1_ITAB.
    if G_TC1_ITAB-scrname = 'X'.
    delete g_tc1_itab.
    endif.
    endloop.
    ELSEIF S_CODE = 'SAVE'.
    G_TC1_WA-ZSRNO = T1.
    MOVE-CORRESPONDING G_TC1_WA TO ZFG_SRNO.
    REFRESH CONTROL 'TC1' FROM SCREEN '0100'.
    ENDIF.
    ENDMODULE. " MESSAGE INPUT
    *& Module DELETE_RECORD INPUT
    text
    MODULE DELETE_RECORD INPUT.
    IF MARK = 'X' AND S_CODE = 'DELE'.
    DELETE TABLE G_TC1_ITAB FROM ZFG_SRNO.
    DESCRIBE TABLE G_TC1_ITAB LINES TC1-LINES.
    ENDIF.
    ENDMODULE. " DELETE_RECORD INPUT
    *********************Screen modules*********************
    PROCESS BEFORE OUTPUT.
    *&SPWIZARD: PBO FLOW LOGIC FOR TABLECONTROL 'TC1'
    MODULE TC1_INIT.
    *&SPWIZARD: MODULE TC1_CHANGE_TC_ATTR.
    *&SPWIZARD: MODULE TC1_CHANGE_COL_ATTR.
    LOOP AT G_TC1_ITAB
    INTO G_TC1_WA
    WITH CONTROL TC1
    CURSOR TC1-CURRENT_LINE.
    *&SPWIZARD: MODULE TC1_CHANGE_FIELD_ATTR
    MODULE TC1_MOVE.
    MODULE TAB1_INIT.
    MODULE TC1_GET_LINES.
    ENDLOOP.
    MODULE D20XX_INIT.
    MODULE STATUS_0100.
    PROCESS AFTER INPUT.
    *&SPWIZARD: PAI FLOW LOGIC FOR TABLECONTROL 'TC1'
    *BREAK POINT.
    LOOP AT G_TC1_ITAB.
    CHAIN.
    FIELD ZFG_SRNO-ZSRNO.
    MODULE TC1_MODIFY ON CHAIN-REQUEST.
    MODULE TC1_MODIFY.
    ENDCHAIN.
    MODULE MESSAGE .
    MODULE DELETE_RECORD.
    ENDLOOP.
    MODULE TC1_USER_COMMAND.
    *&SPWIZARD: MODULE TC1_CHANGE_TC_ATTR.
    *&SPWIZARD: MODULE TC1_CHANGE_COL_ATTR.
    MODULE USER_COMMAND_0100.
    please check out the link below for more information it might help you
    http://help.sap.com/saphelp_sm32/helpdata/en/9f/dbac9f35c111d1829f0000e829fbfe/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/d1/801c7b454211d189710000e8322d00/content.htm
    http://www.sapbrainsonline.com/REFERENCES/ABAP_SYNTAX/SAP_ABAP_SYNTAX.html
    *********please reward points if the information is helpful to you*************

  • For all entries table handled by Tables parameter of Subroutine!

    Hi....
    See my code...
    Dont leave as it seems very big code... Actually its very small one...
    In sourse code of function module...
    data:itab1  type standard table of <local structure of top include> with header line,
                     itab2 type standrad table of knvp with header line.
    perform routine_data tables  itab1
                          using    p_var
    Subroutine code, saved in F include of that function group...
    form routine_data  tables itab1 type standard table
                               using    p_var
      select * from <db table>
                  into corresponding fields of table itab
                  where <keyfield> = p_var.
    endform.
    Back to source cod eof Function module..
    if sy-subrc is = 0.
        select parvw kunn2 kunnr from knvp
                            into corresponding fields of table itab2 for all entries in itab1
                             where kunnr = itab1-kunnr
                             and ( parvw = 'WE' or parvw = 'RE' or parvw = 'RG').
    endif.
    This code is working fine......
    ==================Now coming to my problem==========================
    In source code of function module...
    data:itab1  type standard table of <local structure of top include> with header line,
                     itab2 type standrad table of knvp with header line.
    perform routine_data tables  itab1
                                   using    p_var
    Subroutine code, saved in F include of that function group...
    form routine_data  tables itab1 type standard table
                               using    p_var
      select * from <db table>
                  into corresponding fields of table itab
                  where <keyfield> = p_var.
    endform.
    Function module source code...
    perform routine2_data tables itab1
                                     itab2.
    F include coding part for above subroutine....
    form routine2_data  tables itab1 type standard table
                                          itab2 type standard table
        select parvw kunn2 kunnr from knvp
                            into corresponding fields of table itab2 for all entries in itab1
                             where kunnr = itab1-kunnr                                         <-----causing error
                             and ( parvw = 'WE' or parvw = 'RE' or parvw = 'RG').
    endform.
    Giving error message....
    >>> The specified type has no structure and therefore no component called 'KUNNR".....
    So here the problem is there is a incorrect way to declare parameters....
    Plz remind that SUBROUTINES OF FUNCTION MODULES SAVING IN INCLUDE PROGRAMS, because they making some deffenrce with normal external subroutines...
    also...
    Here for all entries is mandatory!
    And Two sub routines are mandatory!
    Thanks for your attention...
    Naveen Inuganti.

    Hi ,
    Use the below  syntax to pass the tables as parameters
    *The below perform is in the source code of the F.M
    PERFORM goods_movement_post TABLES itab1
                                       itab2
                                       itab3
                                   USING ls_goodsmvt_header
                                         g_mov_code.
    suppose u are using the itab1 & itab2 tables data to get the itab3 Data 
    And The below code is in the Frms include
    FORM goods_movement_post
                      TABLES
                         pt_itab1 STRUCTURE vbak
                         pt_itab2 STRUCTURE vbap
                         pt_itab3 STRUCTURE bapiret2
                      USING
                         p_ls_goodsmvt_header STRUCTURE bapi2017_gm_head_01
                         p_g_mov_code.
    ENDFORM
    Thanks & Reagrds
    Mallikharjuna Reddy

  • No database table exists for table ZTAB1 after ORA-01438

    Dear friends,
    We have a problem in our test system.
    One developer performed a transport which tried to change column from length 11 to 10 and after the transport, table is missing from database. We observed ABAP dumps DBIF_RSQL_SQL_ERROR with ORA-01438 which suggested us that there was some problem with field lenght change. After discussin, we have find out the culprate filed.
    But, with me now problem is Partially active table which Does not exist in the database.
    So now, what i should do to fix this problem.. Shuld i again increase filed length manually in test system and then try to perform SE14>Continue adjustment or what ?
    In SE14 : Analyze Adjustment provide this information :
    Seq of steps
       1 Initialization
       2 Dropping of indexes, renaming of original table
       3 No action
       4 Activation of transparent table
       5 Conversion of data to new table, deletion of renamed table
       6 Creation of sec. indexes
        Adjustment terminated in step 5
    Initial table                         Table type                 Status
    ZTAB1 Transparent                Renamed
    Renamed original table
    QCMZTAB1                        transparent                Existent
    Tgt.table
    ZTAB1 Transparent                Renamed
    thanks
    ashish

    I had tried to reactivate table.. but it will not work as I had Terminated conversion : Adjustment terminated in step 5.
    database object itself was not existent.. so consistency check is not helpful.
    We recognized the problem.. at present, we have DDIC object for table with a field length 10(new lenght), a QCMtable which contains original data with filed lenght 11(Old value) and a conversion table QCM8table which has filed lenght 10(new value).
    Now, in my case, original table had some Rows for that column lenght 11 and it was unable to transfer them to QCM8table.
    I had raised an OSS to SAP.
    thanks
    ashish

  • Message handler for webservice control

    Hi ,
    I'm new to wli webservice. I managed to invoke webservice using service control but I have requirement to format date as dd-MM-YYYY format in one of the element(calendar type) but i couldn’t by date formatter utilities . I understand this specific requirement can be achieved by wring message handler.
    Could anyone share the easiest steps to implement message handler for web service control ?
    Thanks

    Hi Madhu,
    Could you please provide a example scenario? what kind of error 'Message' you are looking for.
    Regards,
    Lijo Joseph

  • Dump while Accessiing Table maintenance for Table P44V thru SM30

    Hi,
    I need to insert an entry into P44V table thru table maintenance (SM30).
    But, when I try to access this, run time error is coming sayig "DYNPRO_NOT_FOUND"
    Error analysis
        The system attempted to use dynpro 0001 in program "SAPLWIS_PLAN_C".
        This dynpro does not exist.
    Can you please let me know, how can I solve this issue.
    Thanks,
    Sandeep

    GOTO se11 open your table and regenerate the screen for the Table Maintenance Generator...

  • Table entry for table T710A and T710

    Friends - Can anyone help me to understand what could be possible problem if i maintain PAY GRADE & PAY GRADE LEVEL entries through table. I have 57000 thousand entries for different countries so i am using BDC recroding to upload these values.
    Please help me find out dependent tables on PAY GRADE & PAY GRADE LEVEL.
    Kind regards,
    Amit Jain

    Hi:
    T710:
    MOLGA     - > T500L
    SLTYP     - > T510A
    SLREG     - > T510G
    SLGRP     - > T710A
    T710A:
    MOLGA     - > T500L
    SLTYP     - > T510A
    SLREG     - > T510G
    FREQU     - > T710F
    WAERS     - > TCURC
    WGTYP     - > T52D7
    Hope it helps,
    Regards.

  • How to get Handle for a Image Control in WPF

     I have to read an image from a camera dll function.
     the function takes  a handle of the UI element to display the images.
    I was able to get the image on the Windows picturebox by using its handle property.
    But when i try to do the same thing in WPF, i found problem to do so, as WPF has a single handle
    for all controls.
    if i pass that handle  it will display the image on the Window itself.
    but i want it on Image box.
    so my question is how can i assign the WPF handle i have to the Image box or how can i get the
    handle of the Image box.
    I am aware that controls dont have handles in WPF.
    but is it not possible to get the handle using interop?
    please help me its really urgent.nishant singh,Bangalore

    Hi,
    You can try this:
    HwndSource hwndSource = PresentationSource.FromVisual(YourImageControl) as HwndSource;  
    if (hwndSource != null)  
        handle = hwndSource.Handle;  
    Let me know if it works !
    HTH
    ThomasThomas Lebrun [MVP] - WPF/LINQ: http://blog.developpeur.org/tom - http://morpheus.developpez.com

  • Query based on main table and audit table

    Hi,
    I had created auditing on some table. Values might not change and if they changed, it should be stored in audit table.
    I want to get the values in the table a on real time basis, like dimentions in datawarehouse.
    Trying to write a query based on table a and aud_a to get point-in-time or values at anytime in the past.
    Something like
    SELECT *
    FROM a (table_name)
    WHERE effective_from >= $DATE_TO_QUERY
    AND effective_to < $DATE_TO_QUERY
    How to get this kind of query .
    Please help. ( Table structure for table a and audit table aud_a and trigger aud_tg_a given below)
    Giving code as follows.
    main table a
    create table a
    ( val1 number,
    val2 number,
    update_by varchar2(30),
    date_updated date);
    creare auidt table aud_a
    create table aud_a
    ( "AUDIT_SEQ" NUMBER,
    "AUDIT_TRAN_ID" NUMBER,
    "AUDIT_PROG_ID" VARCHAR2(30 BYTE),
    "AUDIT_TERMINAL" VARCHAR2(16 BYTE),
    "AUDIT_REASON" VARCHAR2(30 BYTE),
    "AUDIT_ACTION" CHAR(1 BYTE),
    "AUDIT_ACTION_BY" VARCHAR2(20 BYTE),
    "AUDIT_ACTION_DT" DATE,
    val1 number,
    val2 number,
    updated_by varchar2(30),
    date_updated date);
    trigger on  table a to populate aud_a
    CREATE OR REPLACE TRIGGER aud_tg_a AFTER
    INSERT OR
    DELETE OR
    update on a
    for each row
    declare
    v_time_now DATE;
    v_terminal VARCHAR2(16);
    v_tran_id NUMBER;
    v_prog_id VARCHAR2(30);
    V_reason VARCHAR2(30);
    BEGIN
    v_time_now := sysdate;
    v_terminal := userenv('TERMINAL');
    v_tran_id := 1;
    v_prog_id := 'test';
    v_reason := 'AUDIT';
    IF inserting THEN
    INSERT
    INTO a
    audit_seq,
    AUDIT_tran_id,
    AUDIT_prog_id,
    AUDIT_reason,
    AUDIT_terminal,
    AUDIT_action_by,
    AUDIT_action_dt,
    AUDIT_action ,
    val1,
    val2,
    updated_by,
    date_updated
    VALUES
    s_audit_no.nextval,
    v_tran_id,
    v_prog_id,
    v_reason,
    v_terminal,
    USER,
    v_time_now,
    'I' ,
    :new.val1,
    :new.val2,
    :new.updated_by,
    :new.date_updated
    elsif deleting THEN
    INSERT
    INTO a
    audit_seq,
    AUDIT_tran_id,
    AUDIT_prog_id,
    AUDIT_reason,
    AUDIT_terminal,
    AUDIT_action_by,
    AUDIT_action_dt,
    AUDIT_action ,
    us_agy_backed_id,
    industry_subgroup,
    comments,
    updated_by,
    date_updated
    VALUES
    s_audit_no.nextval,
    v_tran_id,
    v_prog_id,
    v_reason,
    v_terminal,
    USER,
    v_time_now,
    'D' ,
    :old.val1,
    :old.val2,
    :old.comments,
    :old.updated_by,
    :old.date_updated
    elsif updating THEN
    INSERT
    INTO a
    audit_seq,
    AUDIT_tran_id,
    AUDIT_prog_id,
    AUDIT_reason,
    AUDIT_terminal,
    AUDIT_action_by,
    AUDIT_action_dt,
    AUDIT_action ,
    us_agy_backed_id,
    industry_subgroup,
    comments,
    updated_by,
    date_updated
    VALUES
    s_audit_no.nextval,
    v_tran_id,
    v_prog_id,
    v_reason,
    v_terminal,
    USER,
    v_time_now,
    'U' ,
    :new.val1,
    :new.val2,
    :new.updated_by,
    :new.date_updated
    END IF;
    END;
    -------------------------

    Hi hoek,
    I am not able to use Oracle's audit functionality becuase I need to trap some changes in particular tables and then rebuild query if required.
    Thanks for your suggestion though.
    Regards,
    Milind

  • Error Handling in table control for line item.

    Hi,
    Please how to do error handling in table control for line item in bdc,i have used format_message for header but i don't no fill decamps internal tabled and  how to do background processing in call transaction.
    Thanks

    Background processing is not possible using call transaction method.
    You can create an executable program which can have CALL TRANSACTION BDC code. And this can be run in background.
    What do you exactly mean by Error handling for Items in table control. Can you give some more details.

  • Hi All, How we can handle a table control in bdc - in detail its urgent pls

    Hi All, How we can handle a table control in bdc - in detail its urgent. Please send me the explanation in detail.
    Thanks&regards.
    Bharat

    hi,
    Create Table Control
    • Step 1 (Create new structure for table control)
    Type is name of structure (ZTC_EKKO) and press create
    • Step 2 (Create Program)
    Goto transaction SE80(Object Navigator) -> Repository Browser -> Program.
    Enter your program name, please ensure that is begins with SAPMZ…… as this is a module pool (dialog program).
    Press enter to create, and press yes!
    Ensure that you create a top include, and press Enter.
    Accept the name created for the top include.
    Press Enter.
    Press Save
    • Step 3 (Create TOP include)
    Double click on the top include and enter following ABAP code:
    Tables: ZTC_EKKO.
    controls: tc100 type tableview using screen 100.
    data: ok_code type sy-ucomm.
    data: it_ekko type standard
    table of ZTC_EKKO initial size 0,
    wa_ekko type ZTC_EKKO.
    data: ok_code type sy-ucomm.
    Press Save and Activate
    • Step 4 (Create screen)
    Right click the program to create a screen 100 for the dialog. Enter Short description, set screen type to Normal and enter 0 or blank into Next screen. Then move to Element List tab and enter the OK code as OK_CODE (i.e. the same as what you declared in the top include with data: ok_code type sy-ucomm).
    • Step 5 (Create table control)
    Press the Layout button to bring up the screen painter editor.
    Press table control button and drag it on to the screen, enter the name of table control created in TOP include (TC100). Now press the yellow button for attributes and set the table control as below options
    • Step 6 (Populate table control )
    Press the orange button (Fields). On the next screen enter ZTC_EKKO and press the ‘Get from Dict’ button. Select the fields you want (all) and press enter. Now drag them onto your Table Control.
    Below is the result, there will been syntax errors if we check now! So Save and go back into the flow logic tab.
    • Step 7 (Create flow control )
    Within the flow logic of screen 100 and create two modules, one to select the data from the database and the other to move the selected fields into the table control. Also insert the two loop statements to populate and retrieve the lines of the table control.
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0100.
    module data_retrieval.
    loop at it_ekko into wa_ekko with control TC100.
    module populate_screen.
    endloop.
    PROCESS AFTER INPUT.
    loop at it_ekko.
    endloop.
    MODULE USER_COMMAND_0100.
    Double click the module data_retrieval to create and click yes to get past the popup. Ensure that a new include is created to hold all the PBO modules (default). Press enter.
    Select 10 rows of data from the EKKO table and load into the internal table it_ekko. Go back to the flow logic to load this data into the Table Control.
    check this one
    REPORT ZCALL_TRANS_TAB1 .
    TABLES: LFA1,LFBK,lfb1.
    data: BEGIN OF it_vendor occurs 0,
    LIFNR LIKE LFA1-LIFNR,
    bukrs like lfb1-bukrs,
    END OF it_vendor.
    DATA: BEGIN OF IT_BANK occurs 0,
    LIFNR LIKE LFA1-LIFNR,
    BANKS LIKE LFBK-BANKS,
    BANKL LIKE LFBK-BANKL,
    BANKN LIKE LFBK-BANKN,
    koinh like lfbk-koinh,
    END OF IT_BANK.
    data: it_bdcdata like bdcdata occurs 0 with header line.
    data: it_messages like bdcmsgcoll occurs 0 with header line.
    *selection screen.
    selection-screen: begin of block b1 with frame.
    parameters: p_file like rlgrap-filename default 'c:/vendor.txt'
    obligatory.
    parameters: p_file1 like rlgrap-filename default 'c:/xyz.txt'
    obligatory.
    selection-screen: end of block b1.
    *at selection screen.
    at selection-screen on value-request for p_file.
    perform f4_help using p_file.
    at selection-screen on value-request for p_file1.
    perform f4_help1 using p_file1.
    *start of selection
    start-of-selection.
    *******uploading file
    perform upload_file using p_file P_FILE1.
    ******open session.
    perform populate_data.
    *& Form f4_help
    form f4_help using p_p_file.
    data: l_file type ibipparms-path.
    call function 'F4_FILENAME'
    importing
    file_name = l_file.
    p_file = l_file.
    endform. " f4_help
    *& Form POPULATE_DATA
    form populate_data .
    DATA: L_STRING TYPE STRing.
    DATA: L_COUNTER(2) TYPE n.
    loop at it_vendor.
    perform bdc_dynpro using 'SAPMF02K' '0106'.
    perform bdc_field using 'BDC_CURSOR'
    'RF02K-D0130'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_field using 'RF02K-LIFNR'
    it_vendor-lifnr.
    perform bdc_field using 'RF02K-BUKRS'
    it_vendor-bukrs.
    perform bdc_field using 'RF02K-D0130'
    'X'.
    perform bdc_dynpro using 'SAPMF02K' '0130'.
    perform bdc_field using 'BDC_CURSOR'
    'LFBK-bankn(03)'.
    perform bdc_field using 'BDC_OKCODE'
    '=UPDA'.
    *********bank details
    CLEAR l_COUNTER.
    LOOP AT IT_BANK WHERE LIFNR = IT_VENDOR-LIFNR.
    l_COUNTER = l_COUNTER + 1.
    clear l_string.
    CONCATENATE 'lfbk-banks(' l_counter ')' into l_string.
    perform bdc_field using l_string
    it_bank-banks.
    clear l_string.
    CONCATENATE 'lfbk-bankl(' l_counter ')' into l_string.
    perform bdc_field using l_string
    it_bank-bankl.
    clear l_string.
    CONCATENATE 'lfbk-bankn(' l_counter ')' into l_string.
    perform bdc_field using l_string
    it_bank-bankn.
    endloop.
    ******CALL TRANSACTION.
    call transaction 'FK02' using it_bdcdata mode 'A'
    messages into it_messages.
    write:/ sy-subrc.
    perform format_messages.
    clear it_bdcdata.
    refresh it_bdcdata.
    endloop.
    endform. " POPULATE_DATA
    *& Form FORMAT_MESSAGES
    form format_messages .
    data: l_msg(100).
    loop at it_messages.
    call function 'FORMAT_MESSAGE'
    exporting
    id = it_messages-msgid
    lang = sy-langu
    no = it_messages-msgnr
    v1 = it_messages-msgv1
    v2 = it_messages-msgv2
    v3 = it_messages-msgv3
    v4 = it_messages-msgv4
    importing
    msg = l_msg
    exceptions
    not_found = 1
    others = 2
    write:/ l_msg.
    endloop.
    endform. " FORMAT_MESSAGES
    *& Form bdc_dynpro
    form bdc_dynpro using value(p_program)
    value(p_screen).
    it_bdcdata-program = p_program.
    it_bdcdata-dynpro = p_screen.
    it_bdcdata-dynbegin = 'X'.
    append it_bdcdata.
    clear it_bdcdata.
    endform. " bdc_dynpro
    *& Form bdc_field
    form bdc_field using value(p_fnam)
    value(p_fval).
    it_bdcdata-fnam = p_fnam.
    it_bdcdata-fval = p_fval.
    append it_bdcdata.
    clear it_bdcdata.
    endform. " bdc_field
    *& Form upload_file
    form upload_file using p_p_file
    p_p_file1.
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
    CODEPAGE = ' '
    FILENAME = P_P_FILE
    FILETYPE = 'DAT'
    HEADLEN = ' '
    LINE_EXIT = ' '
    TRUNCLEN = ' '
    USER_FORM = ' '
    USER_PROG = ' '
    DAT_D_FORMAT = ' '
    IMPORTING
    FILELENGTH =
    TABLES
    data_tab = IT_VENDOR
    EXCEPTIONS
    CONVERSION_ERROR = 1
    FILE_OPEN_ERROR = 2
    FILE_READ_ERROR = 3
    INVALID_TYPE = 4
    NO_BATCH = 5
    UNKNOWN_ERROR = 6
    INVALID_TABLE_WIDTH = 7
    GUI_REFUSE_FILETRANSFER = 8
    CUSTOMER_ERROR = 9
    NO_AUTHORITY = 10
    OTHERS = 11
    IF sy-subrc <> 0.
    MESSAGE I000(ZZ) WITH 'UNABLE TO UPLOAD'.
    STOP.
    ENDIF.
    *******UPLOADING BANK DETAILS
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
    CODEPAGE = ' '
    FILENAME = P_P_FILE1
    FILETYPE = 'DAT'
    HEADLEN = ' '
    LINE_EXIT = ' '
    TRUNCLEN = ' '
    USER_FORM = ' '
    USER_PROG = ' '
    DAT_D_FORMAT = ' '
    IMPORTING
    FILELENGTH =
    TABLES
    data_tab = IT_BANK
    EXCEPTIONS
    CONVERSION_ERROR = 1
    FILE_OPEN_ERROR = 2
    FILE_READ_ERROR = 3
    INVALID_TYPE = 4
    NO_BATCH = 5
    UNKNOWN_ERROR = 6
    INVALID_TABLE_WIDTH = 7
    GUI_REFUSE_FILETRANSFER = 8
    CUSTOMER_ERROR = 9
    NO_AUTHORITY = 10
    OTHERS = 11
    IF sy-subrc <> 0.
    MESSAGE I000(ZZ) WITH 'UNABLE TO UPLOAD'.
    STOP.
    ENDIF.
    endform. " upload_file
    *& Form f4_help1
    -->P_P_FILE1 text
    form f4_help1 using p_p_file1.
    data:l_file1 type ibipparms-path.
    CALL FUNCTION 'F4_FILENAME'
    IMPORTING
    FILE_NAME = l_file1.
    p_file1 = l_file1.
    endform. " f4_help1
    http://sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
    Regards,
    Sankar

Maybe you are looking for

  • Sub-Contracting

    Dear All, While making GRN for sub-contracting by using 543 movement type, the following account determinations are made as per the messages received in process. GBB--VBO FOR VALUATION CLASS 7900 WRX--GR/IR BSV--CHANGE IN STOCK FRL--FOR EXTERNAL ACTI

  • Does iTunes Match need a computer to sync what's already on your iPhone?

    I recently lost all of my music on my computer that I have. It got wiped and reset along with iTunes. I do, however, have some music on my iPhone that I want to try and keep. Would it be possible to get iTunes Match and somehow sync the music I alrea

  • Airport Express power cord

    I was wondering if there is a way to only buy power plug cord that can allow the Airport Express to not be on the wall?  I'd like to connect the cords needed for airtunes, but cannot do it without putting an extension cord on the AE (or using the pow

  • LMS 4.0.1 supported ESXi Versions

    LMS 4.0 guide states that ESXi4.0 is supported.  Anyone know if ESXi 4.1 is supported under LMS 4.0.1.  Can't see anything in the readme file around ESXi versions, Only details on Windows OS. Many Thanks

  • In-place upgrade of Windows Server 2012 RDS to R2 fails

    Hi All I have a Server 2012 Standard RDS virtual machine (vmware) on which I have tried doing an in-place upgrade to 2012 R2 but it constantly fails. It sits at the "Collecting files, settings and applications" process for quite a while - always on 0