How to handle screen resolution in bdc session method.

hi all,
how to handle screen resolution in bdc session method.

Hello,
Why do need that for? Is it to add rows on a table control??
If it does, add new rows by using the add button instead of adding into the table control directly to each row.
Bye
Gabriel.

Similar Messages

  • How to handle the errors in BDC Session method

    Hi All,
    I am uploading Material Master (MM01) records using BDC Session Method.my problem is when i am running the program, all the error records are going to flat file.how can i correcting the error records and after correction how can i re-process the error records.tell me with example.
    i have around 70,000 records in my flat file.

    Hi,
    I am attaching few threads.Hope these will help you.
    If there are any error records in session, all those error records will get poulated in log .SM35 and after the session is completed , u can see error records which can be corrected and reprocessed again
    We have the structures BDCLD and BDCLM, which will capture the log details inthe session. Firstly, sesssion should be processed. After that log will be created. Then caputure the information into an internal table using BDCLM and BDCLD.
    and refer the link.
    error correction in bdc session
    regards
    Madhu

  • Screen Resolution Problem in Session Method

    Hi
    I want to use session method in BDC. How to resolve screen resolution problem in Session Method?
    Please give me the code or steps regarding this.
    Thanks & Regards
    venkateswararao

    Hi
    U can only run the session with the option Dynpro Standard Size setted.
    In this way the system should be use the same resolution for every situation.
    Max

  • How to handle screen resolution in session method

    how to handle screen resolution in session method  without bdc_insert .

    Hello,
    Why do need that for? Is it to add rows on a table control??
    If it does, add new rows by using the add button instead of adding into the table control directly to each row.
    Bye
    Gabriel.

  • How to create screen resolution in bdc table control

    hi gurus
    can anyone suggest me
    how to create screen resolution in bdc table control
    thanks&regards
    mark.

    Hi ,
    Using CTU_PARAMS table for screen resolution .
    For this sample code.
    This is for Transation  FB60.
    report ZZFB60
           no standard page heading line-size 255.
    tables t100.
    PARAMETERS : p_file1  like  rlgrap-filename,
                 p_doctyp like  RF05A-BUSCS,
                 p_invdat like  INVFO-BLDAT,
                 p_posdat like  INVFO-BUDAT.
    CONSTANTS  :  C_TRANS_FB60(4) VALUE 'FB60'.
    *Parameter string for runtime of CALL TRANSACTION
    data : l_option type ctu_params,
           l_subrc type sysubrc.
    DATA :  l_mstring(150).
    data      accnt type char17.
    data       : day   type char2,
                 month type char2,
                 year  type char4,
                 date1 type char10,
                 date2 type char10.
    data      :  cnt(2) TYPE n,
                 cnt1 type i,
                 fld(25) TYPE c.
    data : begin of excel occurs 0,
            fieldname(255) type c,
           end of excel.
    DATA:BEGIN OF it_mess OCCURS 0,
             msgtyp(5),
             lms(200),
              msgv1(50),
         END OF it_mess.
    data: begin of t_record occurs 0,
             BUKRS(004),
            ACCNT(017),
            XBLNR(016),
            WRBTR1(016),
            WAERS(005),
            SECCO(004) ,
            SGTXT(050),
            HKONT(010),
            WRBTR2(017),
            MWSKZ(002),
            GSBER(004),
            KOSTL(010),
         end of t_record.
    *Internal Table for Header Data
    DATA :  BEGIN OF t_head OCCURS 0,
            BUKRS(004),      "Company Code
            ACCNT(017),      "Account or Vendor
            XBLNR(016),      "Reference
            WRBTR1(017),     "Amount in document currency
            WAERS(005),      "Currency
            SECCO(004),      "Section Code
            SGTXT(050),      "Text
            END OF t_head.
    *Internal table for Item Data
    DATA :  BEGIN OF t_item OCCURS 0,
            ACCNT(017),      "Account
            HKONT(010),     "GL Account
            WRBTR2(017),    "Line item Amount in document currency
            MWSKZ(002),     "Tax Code
            GSBER(004),     " Business Area
            KOSTL(010),     "Cost centre
            END OF t_item.
    DATA: IT_BDCDATA      LIKE  BDCDATA OCCURS 0 WITH HEADER LINE,
          IT_BDC_MESSAGES LIKE  BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
    *include bdcrecx1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file1.
      PERFORM  file_selection.
      PERFORM  data_upload.
      PERFORM  table_control.
    start-of-selection.
    l_option-defsize = 'X'.
    l_option-dismode = 'A'.
    l_option-updmode = 'S'.
    day = p_invdat+6(2).
    month = p_invdat+4(2).
    year =  p_invdat+0(4).
    concatenate day month year into date1 SEPARATED BY '.'.
    day = p_posdat+6(2).
    month = p_posdat+4(2).
    year =  p_posdat+0(4).
    concatenate day month year into date2 SEPARATED BY '.'.
    *perform open_group.
    loop at t_head.
    CLEAR    IT_BDCDATA.
    REFRESH  IT_BDCDATA.
    perform bdc_dynpro      using   'SAPLACHD'         '1000'.
    perform bdc_field       using   'BDC_OKCODE'        '=ENTR'.
    perform bdc_field       using   'BKPF-BUKRS'        t_head-bukrs.
    perform bdc_dynpro      using   'SAPMF05A'          '1100'.
    perform bdc_field       using   'BDC_OKCODE'        '/00'.
    perform bdc_field       using   'RF05A-BUSCS'       p_doctyp.
    perform bdc_field       using   'INVFO-ACCNT'       t_head-accnt.
    perform bdc_field       using   'INVFO-BLDAT'       date1.
    perform bdc_field       using   'INVFO-BUDAT'       date2.
    perform bdc_field       using   'INVFO-XBLNR'       t_head-xblnr.
    perform bdc_field       using   'INVFO-WRBTR'       t_head-wrbtr1.
    perform bdc_field       using   'INVFO-WAERS'       t_head-waers.
    perform bdc_field       using   'INVFO-SECCO'       t_head-secco.
    perform bdc_field       using   'INVFO-SGTXT'       t_head-sgtxt.
    cnt = 1.
    cnt1 = 1.
    loop at t_item where accnt = t_head-accnt.
    *if cnt > 4.
    *cnt = 4.
    *endif.
    if cnt1 gt 1.
    CONCATENATE 'ACGL_ITEM-MARKSP(' cnt ')' INTO fld.
    perform bdc_field      using   fld                   'X'.
    perform bdc_dynpro      using 'SAPMF05A'          '1100'.
    perform bdc_field       using 'BDC_OKCODE'        '=0005'.
    endif.
    perform bdc_dynpro      using 'SAPMF05A'          '1100'.
    perform bdc_field       using   'BDC_OKCODE'        '/00'.
    CONCATENATE 'ACGL_ITEM-HKONT(' cnt ')' INTO fld.
    perform bdc_field       using  fld                t_item-hkont.
    CONCATENATE 'ACGL_ITEM-WRBTR(' cnt ')' INTO fld.
    perform bdc_field  using       fld                t_item-wrbtr2.
    CONCATENATE 'ACGL_ITEM-MWSKZ(' cnt ')' INTO fld.
    perform bdc_field       using  fld                t_item-mwskz.
    CONCATENATE 'ACGL_ITEM-GSBER(' cnt ')' INTO fld.
    perform bdc_field       using  fld                t_item-gsber.
    CONCATENATE 'ACGL_ITEM-KOSTL(' cnt ')' INTO fld.
    perform bdc_field       using  fld                t_item-kostl.
    perform bdc_field      using  'BDC_CURSOR'  fld.
    *CONCATENATE 'ACGL_ITEM-MARKSP(' cnt ')' INTO fld.
    *perform bdc_field      using   fld                   'X'.
    cnt1 = cnt1 + 1.
    *cnt = cnt + 1.
    *if cnt > 1.
    *perform bdc_dynpro      using 'SAPMF05A'          '1100'.
    *perform bdc_field       using 'BDC_OKCODE'        '=0005'.
    **perform bdc_field       using 'BDC_OKCODE'        '=0006'.
    *endif.
    endloop.
    perform bdc_dynpro      using 'SAPMF05A' '1100'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=BS'.
    perform bdc_dynpro      using 'SAPMSSY0' '0120'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=BU'.
    *perform bdc_transaction using 'FB60'.
    CALL TRANSACTION C_TRANS_FB60 USING IT_BDCDATA  options from l_option
                                 MESSAGES INTO IT_BDC_MESSAGES.
    perform error.
    perform errordownload.
    endloop.
    *perform close_group.
    *Form  data_upload
    FORM data_upload .
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
       FILENAME              =  p_file1
       FILETYPE              = 'DAT'
      TABLES
        DATA_TAB             =  t_record.
    ENDFORM.                    " data_upload
    *Form  file_selection
    FORM file_selection .
    CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          program_name  =  syst-cprog
          dynpro_number =  syst-dynnr
          field_name    = 'p_file1'
        IMPORTING
          file_name     =  p_file1.
    ENDFORM.                    " file_selection
    Form  BDC_DYNPRO
    FORM BDC_DYNPRO using program dynpro.
      CLEAR IT_BDCDATA.
      IT_BDCDATA-PROGRAM = PROGRAM.
      IT_BDCDATA-DYNPRO = DYNPRO.
      IT_BDCDATA-DYNBEGIN = 'X'.
      APPEND  IT_BDCDATA.
    endform.
    *Form  BDC_FIELD
    FORM  bdc_field using fnam fval.
      CLEAR  IT_BDCDATA.
      IT_BDCDATA-FNAM = FNAM.
      IT_BDCDATA-FVAL = FVAL.
      APPEND  IT_BDCDATA.
    ENDFORM.
    Table Control
    FORM table_control .
      LOOP AT t_record.
        ON CHANGE OF t_record-accnt.
          MOVE-CORRESPONDING t_record TO t_head.
          APPEND t_head.
        ENDON.
      loop at t_head.
             t_item-accnt   =  t_head-accnt.
             t_item-hkont   =  t_record-hkont.
             t_item-wrbtr2  =  t_record-wrbtr2 .
             t_item-mwskz   =  t_record-mwskz .
             t_item-gsber   =  t_record-gsber .
             t_item-kostl   =  t_record-kostl.
        APPEND t_item.
    endloop.
         If t_record-level = 'H'.
             t_head-bukrs   =  t_record-text1.
             t_head-accnt   =  t_record-text2.
             t_head-xblnr   =  t_record-text3.
             t_head-wrbtr1  =  t_record-text4.
             t_head-waers   =  t_record-text5.
             t_head-secco   =  t_record-text6.
             t_head-sgtxt   =  t_record-text7.
          APPEND t_head.
         else.
            t_item-accnt   =  t_head-accnt.
            t_item-hkont   =  t_record-text1.
            t_item-wrbtr2  =  t_record-text2.
            t_item-mwskz   =  t_record-text3.
            t_item-gsber   =  t_record-text4.
            t_item-kostl   =  t_record-text5.
         APPEND t_item.
         endif.
      ENDLOOP.
    ENDFORM.
    FORM error .
      LOOP AT IT_BDC_MESSAGES.
        IF IT_BDC_MESSAGES-msgtyp = 'E'.
       SELECT single  * FROM t100  WHERE
                                    sprsl = it_BDC_MESSAGES-msgspra
                                    AND   arbgb = IT_BDC_MESSAGES-msgid
                                    AND   msgnr = IT_BDC_MESSAGES-msgnr.
          IF sy-subrc = 0.
            l_mstring = t100-text.
            IF l_mstring CS '&1'.
              REPLACE '&1' WITH IT_BDC_MESSAGES-msgv1 INTO l_mstring.
              REPLACE '&2' WITH IT_BDC_MESSAGES-msgv2 INTO l_mstring.
              REPLACE '&3' WITH IT_BDC_MESSAGES-msgv3 INTO l_mstring.
              REPLACE '&4' WITH IT_BDC_MESSAGES-msgv4 INTO l_mstring.
            ELSE.
              REPLACE '&' WITH IT_BDC_MESSAGES-msgv1 INTO l_mstring.
              REPLACE '&' WITH IT_BDC_MESSAGES-msgv2 INTO l_mstring.
              REPLACE '&' WITH IT_BDC_MESSAGES-msgv3 INTO l_mstring.
              REPLACE '&' WITH IT_BDC_MESSAGES-msgv4 INTO l_mstring.
            ENDIF.
            CONDENSE l_mstring.
            it_mess-msgtyp = IT_BDC_MESSAGES-msgtyp.
            it_mess-lms = l_mstring.
            it_mess-msgv1 = IT_BDC_MESSAGES-msgv1.
            APPEND it_mess.
          ELSE.
            it_mess-msgtyp = IT_BDC_MESSAGES-msgtyp.
            it_mess-lms = l_mstring.
            it_mess-msgv1 = IT_BDC_MESSAGES-msgv1.
            APPEND it_mess.
          ENDIF.
        ENDIF.
      ENDLOOP.
    ENDFORM.
    form errordownload.
    *down the internal table to excel file.
    call function 'EXCEL_OLE_STANDARD_DAT'
               EXPORTING
                    file_name                 = 'c:/Error.xls'
               TABLES
                    data_tab                  = it_mess
                    fieldnames                = excel
               EXCEPTIONS
                    file_not_exist            = 1
                    filename_expected         = 2
                    communication_error       = 3
                    ole_object_method_error   = 4
                    ole_object_property_error = 5
                    invalid_filename          = 6
                    invalid_pivot_fields      = 7
                    download_problem          = 8
                    others                    = 9.
    endform.
    Reward if useful
    Regards,
    Narasimha
    Edited by: narasimha marella on May 13, 2008 12:12 PM

  • How to solve screen resolution in bdc

    hi experts,
    please tell me how to solve screen resolution in bdc.
    regards.
    subhasis

    Hi,
    <b>Pls check other posts in SDN before posting ur thread..there is same thread related to this on this forum on same day.</b>
    Screen resolution means different in the screen display depending on ur system screen resolution.
    suppose ur system resolution is diff and another's system is different then like in Tcode VA01, there will be 3 lineitems and another there will be 5 lineitems ,
    so while doing recording and page down that will bw diff so there will be some problem
    So u have to set the screen resolution as default by using CTU parameters..
    write this code then
    f_option-updmode = 'S'.
    f_option-defsize = 'X'.* f
    _option-dismode = 'N'.
    *call transaction 'VA01' using bdcdata options from f_option messages into bdcerror.
    Hope it helps.
    Regards,
    Sonika

  • How to overcome view changes in bdc session method  using recording ?

    how to overcome view changes in bdc session method  using recording ?
    ex-for mm01 in recording if i selected views basic data1 and basic data2.
    i seheduleded for background for after 3 days .
    if any body changes views by selecting other views also.
    how to overcome this with out programming ?
    is there any settings ?

    Hi,
    I am attaching few threads.Hope these will help you.
    If there are any error records in session, all those error records will get poulated in log .SM35 and after the session is completed , u can see error records which can be corrected and reprocessed again
    We have the structures BDCLD and BDCLM, which will capture the log details inthe session. Firstly, sesssion should be processed. After that log will be created. Then caputure the information into an internal table using BDCLM and BDCLD.
    and refer the link.
    error correction in bdc session
    regards
    Madhu

  • How to handle screen resolution in ME21 fro a bdc programme

    I need to use BDC program for ME21 for that how to handle the screen resolution,
    i know CTU_PARAMS structure is there ,but how to use them, please send the model code.
    Thanks & Regards
    krishna

    got the solution

  • How to set screen resolution in BDC

    hi pls give info regarding how to set resolution for screen
    thank you
    Ravi

    hi,
    For screen resolution use ctu_params, with default size
    Data : f_option type ctu_params,
    f_option-updmode = 'S'.
    f_option-defsize = 'X'.
    f_option-dismode = 'N'.
    call transaction 'VA01' using bdcdata options from f_option messages into bdcerror.
    CALL TRANSACTION tcode... OPTIONS FROM opt
    ... OPTIONS FROM opt
    Effect
    Allows you to control processing using the values of the componetns of the structure opt, which must have the ABAP Dictionary type CTU_PARAMS. The components have the following meanings:
    DISMODE
    Display mode (like the MODE addition)
    UPDMODE
    Update mode (like the UPDATE addition)
    CATTMODE
    CATT mode (controls a CATT)
    CATT mode can have the following values:
    ' ' No CATT active
    'N' CATT without single-screen control
    'A' CATT with single-screen control
    DEFSIZE
    Use default window size
    RACOMMIT
    Do not end transaction at COMMIT WORK
    NOBINPT
    No batch input mode (that is, SY-BINPT = SPACE)
    NOBIEND
    No batch input mode after the end of BDC data.
    The components DEFSIZE , RACOMMIT, NOBINPT, and NOBIEND always take the following values:
    'X' Yes
    ' ' No
    If you do not use the OPTIONS FROM addition, the following control parameter settings apply:
    DISMODE
    From addition MODE
    UPDMODE
    From addition UPDATE
    CATTMODE
    No CATT active
    DEFSIZE
    Do not use default window size
    RACOMMIT
    Successful end on COMMIT WORK
    NOBINPT
    Batch input mode active ( SY-BINPT = X
    NOBIEND
    Batch input mode remains active after the BDC data

  • Bdc session method

    Hi all ,
    where BDC_OK  fields  will store  in which table .
    and also how to reslove the screen resolution  in bdc session method .
    Regards ,
    Kiran .

    hi
    to maintain Screen Resolution just try this
    in the BDC Program source code u will find
    include BDCRECX1 just double click on it,u can see the selection screen of BDC
    and form definitions for Open_Group ,BdcTransaction & CloseGroup,since it is a std include program
    u cannot change it so copy this to a Z include and use that Z include instead of BDCRECX1
    Then go to form BDCTRANSACTION using TCODE
    in that form Declare a workarea(eg: opt) of structure type CTU_PARAMS
    data:   messtab like bdcmsgcoll occurs 0 with header line.
    data : opt type ctu_params.
    pass the values to it
    dismode-> Processing mode (A,E,N,P)
    updmode-> Update mode (L,S,A)
    defsize-> Default Screen Size (X) to maintain Screen Resolution
      opt-dismode = ctumode.
      opt-updmode = cupdate.
      opt-defsize = 'X'.
    if session = 'X'.
        call function 'BDC_INSERT'
         exporting
           tcode                  = tcode
           ctuparams              = 'OPT'
          tables
            dynprotab              = bdcdata.
    else.
        refresh messtab.
        call transaction tcode using bdcdata options from opt messages into messtab.
    endif.
    Regards

  • Listing BDC session method error records

    Hi ABAP'rs,
                     Can any one help me, how to show error records of BDC session method on the List screen.
                                        Thanks and Regards,
                                                              Param.

    Hi,
    goto sm35 and find the error logs.
    what do you mean by list screen...do you mean in ort output ?
    Regards,
    pankaj singh

  • How to do screen resolution in session method

    hi guru how to do screen resolution in session method.
    please tell me.
    regards
    subhasis

    Sometime back this is refered in SDN :
    Check table <i>CTU_PARAMS</i> and field <i>DEFSIZE</i> for setting fixed line of 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.
    Thanks!!

  • How to make screen resolution independent in BDC

    How to make screen resolution independent in BDC

    hi
    good
    You need to use the CTU_PARAM structure alon with the call transaction statment.
    **Sturcture of CTU_PARAM
    **DISMODE : Display mode (like the MODE addition 'A' , 'E', 'N')
    **UPDMODE: Update mode (like the UPDATE addition 'S', 'A')
    **DEFSIZE : Use default window size (Here we are handling those transaction by giving default window size)
    **RACOMMIT: Do not end transaction at COMMIT WORK
    **NOBINPT : No batch input mode (that is, SY-BINPT = SPACE)
    **NOBIEND : No batch input mode after the end of BDC data.
    *The components DEFSIZE , RACOMMIT, NOBINPT, and NOBIEND always take the following values:
    'X' Yes
    DATA : L_OPTION TYPE CTU_PARAMS, "Parameter string for runtime of CALL TRANSACTION
    L_SUBRC TYPE SYSUBRC.
    L_OPTION-DEFSIZE = 'X'.
    L_OPTION-DISMODE = P_MODE.
    L_OPTION-UPDMODE = 'S'.
    CALL TRANSACTION 'FK01' "FK01-Vendor master creation
    USING IT_BDCDATA
    MESSAGES INTO IT_MESSTAB
    OPTIONS FROM L_OPTION.
    thanks
    mrutyun^

  • HOW TO HANDLE MULTIPLE VALUES IN BDC FOR A PARTICULAR FIELD.

    I THINK IT IS HANDLING OF TABLE CONTROLS IN BDC
    PLEASE LET KNOW WHETHER THESE TWO ARE SAME CONCEPT OR NOT
    HOW TO HANDLE TABLE CONTROLS IN BDC
    Moderator message - Please do not use all caps. Please do not ask interview questions -  post locked
    Edited by: Rob Burbank on Jun 26, 2009 10:02 AM

    Hi,
    To handle table control in BDC you will have to enter at least one record in the table control and there after use the index number to increment to the next line item.
    Say you run a recording for a transaction which has a table control (ME21), here after you have completed the recording, you'll see the code which will have sometjing like <fieldname>(01) and the entered value. that valeu has been entered as the first line item (01 being the index).
    You will have to replace the hard coded line item index with a variable and inside a loop increment the item index. Once you reach the maximum allowed line items on your screen juct press the pagedown button (or insert new row) and reset the index to 1.
    Following is a code snippet I used while uploading data for ME31K (vendor contract). It is not the complete code but does show how your code needs to be changed with using index for line items.
    Here we assumne that the maximun number of lines displayed at a time on the screen is 14.
    << Unformatable code removed >>
    Hope this helps.
    Regards,
    Sachin
    Edited by: Rob Burbank on Jun 26, 2009 10:03 AM

  • How to handle Table control in BDC? Difference between BDC & LSMW?

    Hi
    How to handle Table control in BDC? Difference between BDC & LSMW?
    Regards,
    Raghu

    Hi ,
    the diff b/w normal BDC and with table control is that with table control u can enter as many lineitems as u want..so during recording if u r entering 3 line items..then the program will show (1), (2) and (3) with that.
    chane that fixed no to variable.
    check that sample code.
    in this for new customer...any no of items can be entered.
    LOOP AT t_cusdata.
        REFRESH t_bdcdata.
        ON CHANGE OF t_cusdata-kunnr.
    initial screen.
          PERFORM bdc_dynpro      USING 'SAPMV10A' '0100'.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                  'MV10A-VTWEG'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                  '/00'.
          PERFORM bdc_field       USING 'MV10A-KUNNR'
                                  t_cusdata-kunnr.
          PERFORM bdc_field      USING 'MV10A-VKORG'
                                  t_cusdata-vkorg.     "'HCL'.
          PERFORM bdc_field       USING 'MV10A-VTWEG'
                                  t_cusdata-vtweg.     "'HL'.
          DATA: fnam(20) TYPE c,
                fnam1(20) TYPE c,
                idx(2) TYPE c.
          MOVE 1 TO idx.
          LOOP AT t_matdata WHERE kunnr = t_cusdata-kunnr.
            PERFORM bdc_dynpro      USING 'SAPMV10A' '0200'.
            CONCATENATE 'MV10A-KDMAT(' idx ')' INTO fnam.
            PERFORM bdc_field       USING 'BDC_CURSOR'
                                          fnam.
            PERFORM bdc_field       USING 'BDC_OKCODE'
                                           '/00'.
            CONCATENATE 'MV10A-MATNR(' idx ')' INTO fnam1.
            PERFORM bdc_field       USING fnam1
                                          t_matdata-matnr.      "'FIN50'.
            PERFORM bdc_field       USING fnam
                                          t_matdata-kdmat.  "'ABCD'.
            idx = idx + 1.
          ENDLOOP.
          PERFORM bdc_dynpro      USING 'SAPMV10A' '0200'.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                  'MV10A-MATNR(01)'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                  '=SICH'.
          CALL TRANSACTION 'VD51' USING t_bdcdata MODE 'A' .
                                        UPDATE 'S' MESSAGES INTO t_err_mes.
    Regards,
    Sonika

Maybe you are looking for