Table Control in a BDC

Hi,
I have a BDC program ( Trasaction C202 - To assign operations to compoents in the material Tab) which has a table control.
Affter i do a P+  the record which becomes the first record in the table control is not constant. It keeps changing with different sets of data.
How can i handle this P+..?
Regards,
Sriram.

Hi Srirama,
You follow your coding in that way:
LOOP AT i_itemdata INTO wa_itemdata. [IN I_ITEMDAT TABLE YOU WILL GET ITEM DETAILS]
    l_index = l_index + 1.
    IF l_index > 16 . [YOU CHECK DEFAULT NO OF TABLE CONTROL DURING RECORDING]
      CLEAR l_index.
      PERFORM bdc_dynpro USING 'SAPMM06E' '0320'.[YOU CHANGE PROGRAM NAME & SCREEN NO ]
      PERFORM bdc_field USING 'BDC_OKCODE' '=P+'.
      l_index = 1.
      l_index = l_index + 1.
    ENDIF.
WRITE DOWN BDC RECORDING
CONCATENATE 'EKPO-EMATN(' l_index ')' INTO l_field.     [CHANGE FIELD NAME ACC YOUR REQUIREMENT]
    PERFORM bdc_field     USING 'BDC_CURSOR' l_field.
ENDLOOP.
Hope this can solve your problems.
Regards,
Tutun

Similar Messages

  • Table control in ME51 BDC

    Dear abaper
    Can u Pl let me to how to handle table control in ME51 BDC.
    if u have program send it to [email protected]
    rgds,
    Simha

    Regarding Table comtrols in BDC...
    Normally all the screns with table controls will have buttons to add(Insert) a Row, Delete a Row etc..
    After adding data to 1st Row (it will have index 1)... press that insert button so a new Row is inserted again at 1st row..so this will have index 1.
    So in this way you can hard code the index to one.
    The advantage is that if there are many rows then you will not have to keep a track of how many rows are inserted and when to press the page down button.
    I am giving a small example.... Just copy paste this example and run it in all mode...
    Run it in all mode so that you can see what I am trying to do...
    Note : this is an relatively easy method.. not the only method to do...
    report ZTEST_BDC
    no standard page heading line-size 255.
    include bdcrecx1.
    start-of-selection.
    perform open_group.
    perform bdc_dynpro using 'SAPMSRD0' '0102'.
    perform bdc_field using 'BDC_CURSOR'
    'RSRD1-DDTYPE'.
    perform bdc_field using 'BDC_OKCODE'
    '=CHANGE_RADIO'.
    perform bdc_field using 'RSRD1-TBMA'
    perform bdc_field using 'RSRD1-TBMA_VAL'
    'EKPO'.
    perform bdc_field using 'RSRD1-DDTYPE'
    'X'.
    perform bdc_dynpro using 'SAPMSRD0' '0102'.
    perform bdc_field using 'BDC_CURSOR'
    'RSRD1-DDTYPE_VAL'.
    perform bdc_field using 'BDC_OKCODE'
    '=ADD'.
    perform bdc_field using 'RSRD1-TBMA_VAL'
    'EKPO'.
    perform bdc_field using 'RSRD1-DDTYPE'
    'X'.
    perform bdc_field using 'RSRD1-DDTYPE_VAL'
    'ztest_Str'.
    perform bdc_dynpro using 'SAPLSED1' '0100'.
    perform bdc_field using 'BDC_CURSOR'
    'D_100-STRU'.
    perform bdc_field using 'BDC_OKCODE'
    '=GOON'.
    perform bdc_field using 'D_100-DTEL'
    perform bdc_field using 'D_100-STRU'
    'X'.
    perform bdc_dynpro using 'SAPLSD41' '2100'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_field using 'DD02D-DDTEXT'
    'test'.
    perform bdc_field using 'BDC_CURSOR'
    'DD03P_D-FIELDNAME(01)'.
    perform bdc_field using 'DD03P_D-FIELDNAME(01)'
    'bukrs'.
    perform bdc_field using 'DD03P_D-ROLLNAME(01)'
    'bukrs'.
    perform bdc_dynpro using 'SAPLSD41' '2100'.
    perform bdc_field using 'BDC_OKCODE'
    '=WB_LINE_INSERT'.
    perform bdc_field using 'DD02D-DDTEXT'
    'test'.
    perform bdc_field using 'BDC_CURSOR'
    'DD03P_D-FIELDNAME(01)'.
    perform bdc_dynpro using 'SAPLSD41' '2100'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_field using 'DD02D-DDTEXT'
    'test'.
    perform bdc_field using 'BDC_CURSOR'
    'DD03P_D-ROLLNAME(01)'.
    perform bdc_field using 'DD03P_D-FIELDNAME(01)'
    'kostl'.
    perform bdc_field using 'DD03P_D-ROLLNAME(01)'
    'kostl'.
    perform bdc_dynpro using 'SAPLSD41' '2100'.
    perform bdc_field using 'BDC_OKCODE'
    '=WB_LINE_INSERT'.
    perform bdc_field using 'DD02D-DDTEXT'
    'test'.
    perform bdc_field using 'BDC_CURSOR'
    'DD03P_D-FIELDNAME(01)'.
    perform bdc_dynpro using 'SAPLSD41' '2100'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_field using 'DD02D-DDTEXT'
    'test'.
    perform bdc_field using 'BDC_CURSOR'
    'DD03P_D-ROLLNAME(01)'.
    perform bdc_field using 'DD03P_D-FIELDNAME(01)'
    'wrbtr'.
    perform bdc_field using 'DD03P_D-ROLLNAME(01)'
    'wrbtr'.
    perform bdc_dynpro using 'SAPLSD41' '2100'.
    perform bdc_field using 'BDC_OKCODE'
    '=WB_SAVE'.
    perform bdc_field using 'DD02D-DDTEXT'
    'test'.
    perform bdc_field using 'BDC_CURSOR'
    'DD03P_D-ROLLNAME(01)'.
    perform bdc_dynpro using 'SAPLSTRD' '0100'.
    perform bdc_field using 'BDC_CURSOR'
    'KO007-L_DEVCLASS'.
    perform bdc_field using 'BDC_OKCODE'
    '=TEMP'.
    perform bdc_field using 'KO007-L_AUTHOR'
    'VARUN'.
    perform bdc_dynpro using 'SAPLSD41' '2100'.
    perform bdc_field using 'BDC_OKCODE'
    '/EWB_CANCEL'.
    perform bdc_dynpro using 'SAPMSRD0' '0102'.
    perform bdc_field using 'BDC_OKCODE'
    '/EABR'.
    perform bdc_field using 'BDC_CURSOR'
    'RSRD1-DDTYPE_VAL'.
    perform bdc_transaction using 'SE11'.
    perform close_group.
    I hope this helps.....
    Please mark points if it helps..

  • Table control resolution in BDC

    Hi
    All
    I have one doubt regarding table control resolution in BDC .I know how to handle table control like if i have 5 rows in my TABLE CONTROL.I write the logic according to this rows and if more than 5 rows are there in my flat file i extend the atble control.But this logic will fail in some other system if more than 5 rows are there in that syatem. But I have read from  some where that we can use ctu_params structure and if we pass default size as 'x' then it automatically take cares in every sysem.But my doubt is while writing the code initially how can  we write ie i mean how many rows i have to mention initially in my logic .
    Please tell me the answer to this question if you have already face this type of problem.
    Thanks and regards
    Venkateswar

    Hi,
    The numeber of lines of table control for BDC depend on screen resolution, but It can't be managed by program.
    So the better solution is to create a bdc doesn't depend on resolution.
    It can do that using always the first two lines of table control.
    When you start the simulation, first record has to be placed in first line of tc and the second in second one.
    Before placing the third record, it needs to place the second record to the top and so the third record can be placed in the second line.
    Before placing the next record, it needs to place the third record to the top and so the fourth record can be placed in the second line and so.
    In this way your BDC'll use alwways the first two lines of tc and your program won't depend on resolution.
    The problem is the transaction you need to simulate by BDC has to have a scroll functionality to allow to place the last record was elaborated to the top of tc, so the second line of tc can always be used to place the new record.
    If there isn't this functionality, it's better to use a BAPI instead of BDC.
    check these...
    http://www.abaplearning.com/index.php?option=com_fireboard&Itemid=2&func=view&id=11&catid=8
    BDC - standard screen resolution required?
    https://forums.sdn.sap.com/click.jspa?searchID=739193&messageID=823953
    Regards,
    Omkaram.

  • TABLE CONTROL USED IN BDC

    MAY ANY ONE SUGGEST ME THE IDEA OF TABLE CONTROL USED IN BDC

    Table control in BDC
    http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
    check the below link also u may find answers for all your q's
    http://help.sap.com/saphelp_webas630/helpdata/en/9f/dbac1d35c111d1829f0000e829fbfe/content.htm
    <b>ex----</b>
    *HANDLING TABLE CONTROL IN BDC
    DATA : BEGIN OF IT_DUMMY OCCURS 0,
           DUMMY(100) TYPE C,
           END OF IT_DUMMY.
    DATA : BEGIN OF IT_XK01 OCCURS 0,
           LIFNR(10) TYPE C,
           BUKRS(4)  TYPE C,
           EKORG(4)  TYPE C,
           KTOKK(4)  TYPE C,
           NAME1(30) TYPE C,
           SORTL(10) TYPE C,
           LAND1(3)  TYPE C,
           SPRAS(2)  TYPE C,
           AKONT(6)  TYPE C,
           FDGRV(2)  TYPE C,
           WAERS(3)  TYPE C,
           END OF IT_XK01,
           BEGIN OF IT_BANK OCCURS 0,
           BANKS(3)  TYPE C,
           BANKL(10) TYPE C,
           BANKN(10) TYPE C,
           KOINH(30) TYPE C,
           LIFNR(10) TYPE C,
           END OF IT_BANK.
    DATA : IT_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE,
           IT_BDCMSGCOLL LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
       FILENAME                      = 'C:VENDOR.TXT'
       FILETYPE                      = 'ASC'
    TABLES
       DATA_TAB                      = IT_DUMMY.
    LOOP AT IT_DUMMY.
      IF IT_DUMMY-DUMMY+0(2) = '11'.
        IT_XK01-LIFNR = IT_DUMMY-DUMMY+2(10).
        IT_XK01-BUKRS = IT_DUMMY-DUMMY+12(4).
        IT_XK01-EKORG = IT_DUMMY-DUMMY+16(4).
        IT_XK01-KTOKK = IT_DUMMY-DUMMY+20(4).
        IT_XK01-NAME1 = IT_DUMMY-DUMMY+24(30).
        IT_XK01-SORTL = IT_DUMMY-DUMMY+54(10).
        IT_XK01-LAND1 = IT_DUMMY-DUMMY+64(3).
        IT_XK01-SPRAS = IT_DUMMY-DUMMY+67(2).
        IT_XK01-AKONT = IT_DUMMY-DUMMY+69(6).
        IT_XK01-FDGRV = IT_DUMMY-DUMMY+75(2).
        IT_XK01-WAERS = IT_DUMMY-DUMMY+77(3).
        APPEND IT_XK01.
      ELSE.
        IT_BANK-BANKS = IT_DUMMY-DUMMY+2(3).
        IT_BANK-BANKL = IT_DUMMY-DUMMY+5(10).
        IT_BANK-BANKN = IT_DUMMY-DUMMY+15(10).
        IT_BANK-KOINH = IT_DUMMY-DUMMY+25(30).
        IT_BANK-LIFNR = IT_DUMMY-DUMMY+55(10).
        APPEND IT_BANK.
      ENDIF.
    ENDLOOP.
    LOOP AT IT_XK01.
    REFRESH IT_BDCDATA.
    perform bdc_dynpro      using 'SAPMF02K' '0100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RF02K-REF_LIFNR'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RF02K-LIFNR'
                                  IT_XK01-LIFNR.
    perform bdc_field       using 'RF02K-BUKRS'
                                  IT_XK01-BUKRS.
    perform bdc_field       using 'RF02K-EKORG'
                                  IT_XK01-EKORG.
    perform bdc_field       using 'RF02K-KTOKK'
                                  IT_XK01-KTOKK.
    perform bdc_dynpro      using 'SAPMF02K' '0110'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFA1-TELX1'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'LFA1-NAME1'
                                  IT_XK01-NAME1.
    perform bdc_field       using 'LFA1-SORTL'
                                  IT_XK01-SORTL.
    perform bdc_field       using 'LFA1-LAND1'
                                  IT_XK01-LAND1.
    perform bdc_field       using 'LFA1-SPRAS'
                                  IT_XK01-SPRAS.
    perform bdc_dynpro      using 'SAPMF02K' '0120'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFA1-KUNNR'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_dynpro      using 'SAPMF02K' '0130'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFBK-KOINH(02)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    DATA : FNAM(20) TYPE C,
           IDX      TYPE C.
      MOVE 1 TO IDX.
    LOOP AT IT_BANK WHERE LIFNR = IT_XK01-LIFNR.
      CONCATENATE 'LFBK-BANKS(' IDX ')' INTO FNAM.
      perform bdc_field       using FNAM
                                    IT_BANK-BANKS.
      CONCATENATE 'LFBK-BANKL(' IDX ')' INTO FNAM.
      perform bdc_field       using FNAM
                                    IT_BANK-BANKL.
      CONCATENATE 'LFBK-BANKN(' IDX ')' INTO FNAM.
      perform bdc_field       using FNAM
                                    IT_BANK-BANKN.
      CONCATENATE 'LFBK-KOINH(' IDX ')' INTO FNAM.
      perform bdc_field       using FNAM
                                    IT_BANK-KOINH.
      IDX = IDX + 1.
    ENDLOOP.
    perform bdc_dynpro      using 'SAPMF02K' '0130'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFBK-BANKS(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    perform bdc_dynpro      using 'SAPMF02K' '0210'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFB1-FDGRV'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'LFB1-AKONT'
                                  IT_XK01-AKONT.
    perform bdc_field       using 'LFB1-FDGRV'
                                  IT_XK01-FDGRV.
    perform bdc_dynpro      using 'SAPMF02K' '0215'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFB1-ZTERM'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_dynpro      using 'SAPMF02K' '0220'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFB5-MAHNA'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_dynpro      using 'SAPMF02K' '0310'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFM1-WAERS'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'LFM1-WAERS'
                                  IT_XK01-WAERS.
    perform bdc_dynpro      using 'SAPMF02K' '0320'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'WYT3-PARVW(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    perform bdc_dynpro      using 'SAPLSPO1' '0300'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=YES'.
    CALL TRANSACTION 'XK01' USING IT_BDCDATA
                            MODE  'A'
                           UPDATE 'S'
                         MESSAGES INTO IT_BDCMSGCOLL.
    ENDLOOP.
    FORM BDC_DYNPRO USING PROG SCR.
      CLEAR IT_BDCDATA.
      IT_BDCDATA-PROGRAM = PROG.
      IT_BDCDATA-DYNPRO  = SCR.
      IT_BDCDATA-DYNBEGIN = 'X'.
      APPEND IT_BDCDATA.
    ENDFORM.
    FORM BDC_FIELD USING FNAM FVAL.
      CLEAR IT_BDCDATA.
      IT_BDCDATA-FNAM = FNAM.
      IT_BDCDATA-FVAL  = FVAL.
      APPEND IT_BDCDATA.
    ENDFORM.

  • Regarding table control handling in BDC

    Hi,
    how to Handle table control in BDC ,how to handle resolution of table control in BDC?
    Pls send urgently

    Hi,
    chk this excellent link.
    http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
    Regards
    Anver
    if helped pls mark points

  • Determine Lines in Table Control During BDC

    Hello
    I am trying to determine the number of lines shown on a screen for a table control during a BDC session.  I know the number of lines shown in the table can be different as users can have different screen size, fonts, etc.  My goal is to know how many lines are on the screen in the table so then I know how far I have to page down before I can select the appropriate line I want and then proceed with the BDC.  Any help is greatly appreciated.  Thanks.

    Eric
    If you use CALL TRANSACTION to run your BDC you can resolve your problem passing the parameters OPTIONS FROM <your structure> with these informations:
    <your structure>-DISMODE = 'N'. "BackGround
    <your structure>-UPDMODE = 'S'. "Synchronous
    <your structure>-DEFSIZE = 'X'. "This field indicate that screen will be in standard size. So the lines you have in transaction SHDB will be always the same.
    *The <structure> will be like CTU_PARAMS.
    CALL TRANSACTION <tcode> OPTION FROM <your structure>.
    Have some ways to count the lines during the execution of BDC, but I need to find in my programs.

  • In BDC we need to read screen value of table control

    Dear All,
    I was doing a feasibility analysis. One BDC is there where we will have to insert records in table control based on some records of 1st column of table control already populated. We are unable to find a way for reading table control. The BDC is generating batch input session. Can you please suggest on this?
    Best wishes,
    Atanu

    Hi Atanu,
    with BDC, the only possibility is to do as Klaus suggested: you must replicate the SAP's logic in your program, you must know in advance how SAP fills this field. This is a very well known drawback of BDC. You may use the SQL trace to help you to know which tables are read. Ask functional people to help you.
    You may also use SAP GUI scripting, that's another technology (slower I think, and it can only work in dialog). It allows to do different actions between 2 screens. You must program it using OLE, or using external software (VBA for example).
    Sandra

  • What is the use of table control in bdc is it same in module pool table con

    Hi,
    What is the use of table control in bdc is it same in module pool table control?
    regards
    eswar

    Hi,
    Table control means it contains as table and it will scroll in vertical and horizontal.
    In module pool by using screen we can create new table control.
    But  BDC table control means here we can populate the data into the table control.
    i.e.if you take VA01 for sales order creation in the belwo of VA01 screen there is table control for the filling of material details so here we will write the code to populate the data into the table control screen.
    Thanks and regards,
    shyla

  • How Scroll Table control in BDC (TCode =  SR11)

    Hi Gurus,
    I'm trying to insert lines in a table control via batch.
    Unfortunately I must be able to insert more lines than the table control can show (4 lines at the same time).
    I am not able to get the good OkCode trough SHDB.
    I tried to add a line via OkCode 'P++' but it didnt worked.
    See below a sample of my code.
       IF NOT P_L_DATA-SA01 IS INITIAL.
         CLEAR L_C_INDEX.
         L_C_INDEX = L_INDEX.
         CONCATENATE 'ADRCITYCCS-SPARTE(0' L_C_INDEX ')' INTO L_FIELD.
         L_VALUE = '01'.
         PERFORM BDC_FIELD  USING L_FIELD    L_VALUE.
         CONCATENATE 'ADRCITYCCS-BUKRS(0' L_C_INDEX ')' INTO L_FIELD.
         L_VALUE = P_L_DATA-SA01.
         PERFORM BDC_FIELD  USING L_FIELD    L_VALUE.
         L_INDEX = L_INDEX + 1.
       ENDIF.
       IF NOT P_L_DATA-SA04 IS INITIAL.
         CLEAR L_C_INDEX.
         L_C_INDEX = L_INDEX.
         CONCATENATE 'ADRCITYCCS-SPARTE(0' L_C_INDEX ')' INTO L_FIELD.
         L_VALUE = '04'.
         PERFORM BDC_FIELD  USING L_FIELD    L_VALUE.
         CONCATENATE 'ADRCITYCCS-BUKRS(0' L_C_INDEX ')' INTO L_FIELD.
         L_VALUE = P_L_DATA-SA04.
         PERFORM BDC_FIELD  USING L_FIELD    L_VALUE.
         L_INDEX = L_INDEX + 1.
       ENDIF.
       IF NOT P_L_DATA-SA05 IS INITIAL.
         CLEAR L_C_INDEX.
         L_C_INDEX = L_INDEX.
         CONCATENATE 'ADRCITYCCS-SPARTE(0' L_C_INDEX ')' INTO L_FIELD.
         L_VALUE = '05'.
         PERFORM BDC_FIELD  USING L_FIELD    L_VALUE.
         CONCATENATE 'ADRCITYCCS-BUKRS(0' L_C_INDEX ')' INTO L_FIELD.
         L_VALUE = P_L_DATA-SA05.
         PERFORM BDC_FIELD  USING L_FIELD    L_VALUE.
         L_INDEX = L_INDEX + 1.
       ENDIF.
       IF NOT P_L_DATA-SA06 IS INITIAL.
         CLEAR L_C_INDEX.
         L_C_INDEX = L_INDEX.
         CONCATENATE 'ADRCITYCCS-SPARTE(0' L_C_INDEX ')' INTO L_FIELD.
         L_VALUE = '06'.
         PERFORM BDC_FIELD  USING L_FIELD    L_VALUE.
         CONCATENATE 'ADRCITYCCS-BUKRS(0' L_C_INDEX ')' INTO L_FIELD.
         L_VALUE = P_L_DATA-SA06.
         PERFORM BDC_FIELD  USING L_FIELD    L_VALUE.
         L_INDEX = L_INDEX + 1.
       ENDIF.
       L_FIELD = 'BDC_OKCODE'.
       L_VALUE = '/00'.
       PERFORM BDC_FIELD  USING L_FIELD    L_VALUE.
       IF L_INDEX = 5.
         L_PROG = 'SAPLSZRC'.
         L_DYN  = '0200'.
         PERFORM BDC_DYNPRO USING  L_PROG L_DYN.
         L_FIELD = 'BDC_CURSOR'.
         L_VALUE = 'ADRCITYCCS-BUKRS(04)'.
         PERFORM BDC_FIELD  USING L_FIELD    L_VALUE.
         L_FIELD = 'BDC_OKCODE'.
         L_VALUE = 'P++'.
         PERFORM BDC_FIELD  USING L_FIELD    L_VALUE.
       ENDIF.
         L_PROG = 'SAPLSZRC'.
         L_DYN  = '0200'.
         PERFORM BDC_DYNPRO USING  L_PROG L_DYN.
         L_FIELD = 'BDC_CURSOR'.
         L_VALUE = 'ADRCITYCCS-BUKRS(02)'.
         PERFORM BDC_FIELD  USING L_FIELD    L_VALUE.
    the 5th line
       IF NOT P_L_DATA-SA07 IS INITIAL.
         CLEAR L_C_INDEX.
         L_C_INDEX = L_INDEX.
         CONCATENATE 'ADRCITYCCS-SPARTE(' '02' ')' INTO L_FIELD.
         L_VALUE = '07'.
         PERFORM BDC_FIELD  USING L_FIELD    L_VALUE.
         CONCATENATE 'ADRCITYCCS-BUKRS(' '02' ')' INTO L_FIELD.
         L_VALUE = P_L_DATA-SA07.
         PERFORM BDC_FIELD  USING L_FIELD    L_VALUE.
         L_INDEX = L_INDEX + 1.
       ENDIF.
       L_FIELD = 'BDC_OKCODE'.
       L_VALUE = '/00'.
       PERFORM BDC_FIELD  USING L_FIELD    L_VALUE.
       L_PROG = 'SAPLSZRC'.
       L_DYN  = '0200'.
       PERFORM BDC_DYNPRO USING  L_PROG L_DYN.
       L_FIELD = 'BDC_OKCODE'.
       L_VALUE = 'SAVE'.
       PERFORM BDC_FIELD  USING L_FIELD    L_VALUE.
    Any idea will be welcomed.
    Please try to be clear and precide as I always wen trought several posts wich just not match.
    Thanks

    Hi Niyaz,
    Sorry but there is no button to add lines to this table control during the bdc recording.
    The only way to enter more lines than the default number is to scroll the table control.
    Unfortunatly this scroll action is not recorded (no OkCode) during recording.
    Any idea gurus ???
    Regards

  • How to determine fixed line of table control using BDC program ?

    Dear All,
    I create program using BDC that contains table control.
    Unfortunately the table control line of BDC program will depend on the resolution of our PC setting.
    Sometime I have 2 lines, sometime 3 lines (in different PC).
    How to determine fixed line of table control?
    So it will never be confusing me whether I have 2 or 3 lines.
    Thnx - Regards,
    (Taufik K.)

    Hi Taufik,
    Check the table CTU_PARAMS and field DEFSIZE for setting fixed line of a table control.
    CALL TRANSACTION 'VA01' USING it_bdcdata
    OPTIONS FROM OPT
    MESSAGES INTO it_mesg.
    opt of type ctu_params.
    WA_CTU_PARAMS-DISMODE = 'N'. "no screen mode
    WA_CTU_PARAMS-UPDMODE = 'S'. "synchronus update
    WA_CTU_PARAMS-NOBINPT = 'X'.
    WA_CTU_PARAMS-NOBIEND = 'X'.
    WA_CTU_PARAMS-DEFSIZE = 'X'. "Default size
    Default size will play good role in terms of resoultion. in one system in table control you can see 10rows, but in others system it will show 20 records. it depends on resoultion. but when you set the default size then it will take same (default screen size) in all the systems when you run BDC.
    Reward if helps.
    Regards,
    Senthil
    Message was edited by: senthil kumar

  • BDC table control using Excel sheet upload

    Hi All,
    I am working BDC table control.I want to upload the From excel sheet.I am using the FM ALSM_EXCEL_TO_INTERNAL_TABLE to upload the the data into my internal table.The data is populating in the internal table.
    Now i have problem tat how to populate this excel sheet data to the Bdc table control.
    Can nybody help me out.\[removed by moderator\]
    Thanks,
    Swapna.
    Edited by: Jan Stallkamp on Jul 25, 2008 10:57 AM

    after fetching data from EXCEL sheet, each column data (in excel sheet) will be uploaded to individual record into your internal table along with row number and column number, loop through that internal table and collect all your excel data into record format.pls refer the below code.
    data:
         i_excel    type alsmex_tabline occurs 0 with header line,
         l_row      type i value 1.
    data:
         begin of x_data occurs 0,
                kunnr     like RF02L-KUNNR,
                klimk(17) type c,
                CTLPC     like knkk-CTLPC,
          end  of x_data,
          begin of x_data1 occurs 0,
                data(106),
          end   of x_data1.
    call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
       exporting
         filename                      = p_fname
         i_begin_col                   = 1
         i_begin_row                   = 1
         i_end_col                     = no.of columns in your excel file
         i_end_row                     = no.of rows in your file
       tables
         intern                        = i_excel.
    if sy-subrc = 0.
       loop at i_excel.
         if l_row <> i_excel-row.
            append x_data.
            clear x_data.
         endif.
         case i_excel-col.
            when 1.
              x_data-kunnr = i_excel-value.
            when 2.
              x_data-klimk = i_excel-value.
            when 3.
              x_data-CTLPC = i_excel-value.
         endcase.
         l_row = i_excel-row.
         clear i_excel.
         at last.
            append x_data.
         endat.
       endloop.
    endif.
    then loop through the internal table X_DATA, pass the data to your table control like.
    tbl_control-field1(1) = x_data-field1.
    tbl_control-field2(1) = x_data-field2.
    tbl_control-fieldn(1) = x_data-fieldn.
    Regards,
    Sreeram.

  • How to delete record from table control in BDC?

    Hello friends,
    I am running a BDC program to delete records.
    I have file with following records and i got these records into t_itab.
    Material     Plant     Start date     End date     Cost
    MQ100001     S001     09/01/2008     09/31/2008     55.00
    MQ100004     S002     09/01/2008     09/31/2008     56.00
    MQ100008     S003     09/01/2008     09/31/2008     57.00
    Now, I have BDC transaction in which table control screen which contains following structure.
    MQ100001     S001     09/01/2008     09/31/2008     55.00
    MQ100002     S002     09/01/2008     09/31/2008     56.00
    MQ100004     S003     09/01/2008     09/31/2008     47.00     
    MQ100005     S004     09/01/2008     09/31/2008     25.00
    MQ100006     S012     09/01/2008     09/31/2008     76.00
    MQ100007     S033     09/01/2008     09/31/2008     17.00
    MQ100008     S011     09/01/2008     09/31/2008     95.00
    MQ100009     S002     09/01/2008     09/31/2008     46.00
    I have recorded from SHDB in which first record will be delete.
    So, when i loop through t_itab,instead of deleting MQ100001,MQ100004 and MQ100008 from BDC screen,
    it is deleting MQ100001,MQ100002 and MQ100004 (first record for each process ).
    Which i don't want to.
    Is there any facility in BDC to put records on top which i want to delete?
    Please guide me.
    Regards,
    RH

    Hi,
    While doing recording check for Filter button available for the table control, if it available then do the recording for the same.
    Once it is done while passing the data from internal table put the value into Filter field.
    Hope it resolves your issue.
    Thanks & Regards.
    Nagaraj Kalbavi

  • How to delete record from table control using BDC?

    Hello friends,
    I am running a BDC program to delete records.
    I have file with following records and i got these records into t_itab.
    Material     Plant     Start date     End date     Cost
    MQ100001     S001     09/01/2008     09/31/2008     55.00
    MQ100004     S002     09/01/2008     09/31/2008     56.00
    MQ100008     S003     09/01/2008     09/31/2008     57.00
    Now, I have BDC transaction in which table control screen which contains following structure.
    MQ100001     S001     09/01/2008     09/31/2008     55.00
    MQ100002     S002     09/01/2008     09/31/2008     56.00
    MQ100004     S003     09/01/2008     09/31/2008     47.00     
    MQ100005     S004     09/01/2008     09/31/2008     25.00
    MQ100006     S012     09/01/2008     09/31/2008     76.00
    MQ100007     S033     09/01/2008     09/31/2008     17.00
    MQ100008     S011     09/01/2008     09/31/2008     95.00
    MQ100009     S002     09/01/2008     09/31/2008     46.00
    I have recorded from SHDB in which first record will be delete.
    So, when i loop through t_itab,instead of deleting MQ100001,MQ100004 and MQ100008 from BDC screen,
    it is deleting MQ100001,MQ100002 and MQ100004 (first record for each process ).
    Which i don't want to.
    Is there any facility in BDC to put records on top which i want to delete?
    Please guide me.
    Regards,
    RH

    One option is to identify the table and find out the location as the number of row which should be deleted from the table and then in the bdc program instead of postioning the cursor on the row 1(using the statement perform bdc_cursor ....(01)), replace the 01 with the row number.
    Second option is that if a filter control is available for the table control, then filter the data each and every time with the material number to be deleted and then delete the first row.
    Regards
    Farzan

  • How to give line items in flatfile while doing BDC for Table control

    Hi all,
    I am writing BDC for Multiple line items and Transaction  is : FSE5N.
    How do i give the data in the flat file. I mean how do we give the multiple line items in flat file , i.e for second line item again we have to header data or not ?
    ex:
    1015;ALL;demo;kr;INR;01;0001;3000172;100
    1015;ALL;demo;kr;INR;01;0001;3000172;200
    for first lineitem  : 3000172;100
    for 2nd line item : 3000172; 200.
    header data : 1015;ALL;demo;kr;INR;01;0001.
    Thanks in advance
    krupali

    Hii ,
    u can give in the same format as u have done in the example.
    A       B    C     D  E    F   G        H          I
    1015;ALL;demo;kr;INR;01;0001;3000172;100
    1015;ALL;demo;kr;INR;01;0001;3000172;200
    and while writing the loop u can give
    loop at it_head.
    loop at it_head where a = it_head-A and b = it_head-B ..........upto G = it_head-G.
      endloop.
    endloop.
    check this
    http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
    Neeraj

  • WSo2 BDC to delete line item in table control

    Hi all,
    My requirement is to delete material from wso2 table control.
    The only way to delete a line item in this table control is to select the line in table control and delete it.
    The recording doesnt captures any selection of row.
    Any input on how to caputre particular row ??
    Please dont send me links to work with table control in bdc
    Regards
    Bhanu

    DaveL  wrote:
      I am not aware of any way to make the BDC delete the row, other than by running in 'A'-all mode and letting the user step through each screen and delete the rows that should be deleted.
    Well , if the user has to run it in "A" all screen mode why a BDC is required
    DaveL  wrote:
    Deleting them from the table control would obviously have no effect upon the database table though, would it....it would just hide a row from view in this particular table control
    Really ? Well it will delete it from database too i dont know what makes you think that it wont be deleted from database.
    Anways i have figured out how to capture row selection in BDC .
    Thanks for your reply it proves nothing i guess

Maybe you are looking for

  • Public distribution of iPad app, but not in Apple's App Store

    I know we can make a Digital Publishing Suite app avalable for private distribution with an Adobe Enterprise account and an Apple Enterprise account. But we have a client who wants to make an app available to the public for download on a company web

  • ORA-31202: DBMS_LDAP: LDAP client/server error: Invalid credentials

    Hey Guys, I have an application with LDAP authentication and a custom login page (pg 101). When I run this app, the login page displays first, logs me in and logs out fine. However, when I branch to this application from another application, the logi

  • Migration from BRIO 8.5  to OBIEE 10x

    Hi, We have an requirement to convert BRIO report tom OBIEE which is currently at 8.5 version. We have got a utility own by Oracle named Translation workbench 11.1.x http://www.oracle.com/technetwork/middleware/bi-foundation/downloads/hyperion-intera

  • Can we able to find table spanning using javascript

    Suppose if i have table spanned for 3 pages. i want to find whether the table is spanned and find the last row last column cell for each spanned page. Thanks, Hemi

  • Playbook camera shows since 4 or 5 days only from black to white stripes

    Hi, My playbook (bought this year in april) shows since 4 or 5 days only stripes from black to white. If I switch the camera or if I change to video recording, same stripes. When I take a picture, the result is just stripes from black to white. Pleas