LSMW -BDc recording problem

Hi all,
Is there any way by which we can delete the BDC_CURSOR field from the recording of LSMW 's BDC recording method.
thanks
Sonal

hi
I think, Simply edit the recorded structure and delete that recorded code, but I am not sure v can delete that....
I donno how come it is going to work because it is in the sequential order of the screens and the operation u did in that tcode while recording
~~Guduri

Similar Messages

  • BDC  RECORDING PROBLEM

    HI all,
    i am  uploading the customer master data  by using  bdc session method.
    Tcode XD01 contain customizing  tab and subscreen with four Z fields .
    When i am recording Tcode XD01 that tab and subscreen with fields not appearing  how i can write code for that four fields .please give me code sample following are details.
    standard program: sapmf02d.
    subscreen program: ztab_scr(sub screen designed for four fields program name)
    screen number : 5000
    ok _code = ok-code-5000.
    Please give ur suggestions... asap
    thanks&Regards,
    rao.

    Tale a look at OSS note <a href="https://websmp101.sap-ag.de/~form/handler?_APP=01100107900000000342&_EVENT=REDIR&_NNUM=105244&_NLANG=E">Note 105244 - LSMW 1.0: known problems, tips and tricks</a>
    Extract :
    <i>Situation:
    You added separate fields to table KNA1 and want to fill these fields when you transfer data.
    Tip:
    Make sure that your own fields are also supplemented in the structure BKNA1 and on standard screens. Then these fields are also supplied by the standard batch input program RFBIDE00.</i>
    Regards

  • Problem in BDC Recording

    Hi I am having a problem in BDC Recording. My requirement is that when I input data in transaction fb02 to block the invoices, It shows a list of invoices. Now i need to double click that item(line) in which PK = 06 at runtime during bdc recording. During BDC recording it takes the line number on which we have clicked which is constant but i want it dynamic that if item 1 is having PK=6, that line should be double clicked and if item 3 is having PK=6, the third item should be double clicked to open another screen. Kindly help me... Thanks in advance.

    Hi Ravi,
    While writing your code that is in your code you know which line number is having the PK = 06, then you can use the same line number and add the code for double click after that.
    Regards,
    Atish

  • Problem uploding flatfile in bom(cs01) using bdc recording

    Hi,
         I had a problem while uploading flatfile records in bom(cs01) by using bdc recording.
    I had four records in flatfile(.txt & xl), i.e., header data with its components.
    Sample material:
    (Header data)                (components)
    SOFTDRINKS,WIND,1,  ' 14','1','ml','l'
    SOFTDRINKS,WIND,1,  '11','1','ml','l'
    SOFTDRINKS,WIND,1,  '13','1','ml','l'
    SOFTDRINKS,WIND,1,  ' 15','1','ml','l'
    while executing, the same component entered while recording has been displayed four times not the ff records.
    So, i want to know whether whether ff structure is ok or not,
    whether coding is correct or not?
    report ZBOM1
           no standard page heading line-size 255.
    *include bdcrecx1.
    DATA: BEGIN OF bdc OCCURS 0,
           matnr(18),
           werks(4),
           stlan(1),
          END OF BDC.
    DATA: BEGIN OF BDC1 OCCURS 0,
           idnrk(40),
           MENGE(13),
           MEINS(3),
           postp(1),
          END OF bdc1.
    DATA: BEGIN OF BDCDATA OCCURS 0,
             matnr(18),
             werks(4),
             stlan(1),
             idnrk(18),
             MENGE(18),
             MEINS(3),
             postp(1),
          END OF BDCDATA.
    data: ibdcdata type standard table of bdcdata  with header line.
    *start-of-selection.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                      = 'C:\Documents and Settings\dilipkumar.b\Desktop\soft.txt'
       FILETYPE                       = 'ASC'
       HAS_FIELD_SEPARATOR            = ','
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
      CODEPAGE                      = ' '
      IGNORE_CERR                   = ABAP_TRUE
      REPLACEMENT                   = '#'
      CHECK_BOM                     = ' '
      VIRUS_SCAN_PROFILE            =
      NO_AUTH_CHECK                 = ' '
    IMPORTING
      FILELENGTH                     =
      HEADER                         =
      TABLES
        DATA_TAB                      = BDCDATA
    EXCEPTIONS
      FILE_OPEN_ERROR               = 1
      FILE_READ_ERROR               = 2
      NO_BATCH                      = 3
      GUI_REFUSE_FILETRANSFER       = 4
      INVALID_TYPE                  = 5
      NO_AUTHORITY                  = 6
      UNKNOWN_ERROR                 = 7
      BAD_DATA_FORMAT               = 8
      HEADER_NOT_ALLOWED            = 9
      SEPARATOR_NOT_ALLOWED         = 10
      HEADER_TOO_LONG               = 11
      UNKNOWN_DP_ERROR              = 12
      ACCESS_DENIED                 = 13
      DP_OUT_OF_MEMORY              = 14
      DISK_FULL                     = 15
      DP_TIMEOUT                    = 16
      OTHERS                        = 17
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    *perform open_group.
    loop at bdcdata.
    perform bdc_dynpro      using 'SAPLCSDI' '0100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29N-STLAN'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RC29N-MATNR'
                                  'SOFTDRINKS'.
    perform bdc_field       using 'RC29N-WERKS'
                                  'WIND'.
    perform bdc_field       using 'RC29N-STLAN'
                                  '1'.
    perform bdc_field       using 'RC29N-DATUV'
                                  '16.09.2008'.
    perform bdc_dynpro      using 'SAPLCSDI' '0110'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RC29K-BMENG'
                                  '1'.
    perform bdc_field       using 'RC29K-STLST'
                                  '1'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29K-EXSTL'.
    perform bdc_dynpro      using 'SAPLCSDI' '0111'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29K-LABOR'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_dynpro      using 'SAPLCSDI' '0140'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29P-POSTP(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=FCBU'.
    perform bdc_field       using 'RC29P-IDNRK(01)'
                                  '11'.
    perform bdc_field       using 'RC29P-MENGE(01)'
                                  '1'.
    perform bdc_field       using 'RC29P-MEINS(01)'
                                  'ml'.
    perform bdc_field       using 'RC29P-POSTP(01)'
                                  'l'.
    perform bdc_dynpro      using 'SAPLCSDI' '0130'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29P-POSNR'.
    perform bdc_field       using 'RC29P-POSNR'
                                  '0010'.
    perform bdc_field       using 'RC29P-IDNRK'
                                  '11'.
    perform bdc_field       using 'RC29P-MENGE'
                                  '1'.
    perform bdc_field       using 'RC29P-MEINS'
                                  'ML'.
    perform bdc_dynpro      using 'SAPLCSDI' '0131'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29P-POTX1'.
    perform bdc_field       using 'RC29P-SANKA'
                                  'X'.
    *perform bdc_transaction using 'CS01'.
    *perform close_group.
    CALL TRANSACTION 'CS01' USING IBDCDATA MODE 'A' UPDATE 'S'.
    REFRESH IBDCDATA.
    endloop.
           Start new screen                                              *
    FORM BDC_DYNPRO USING PROGRAM DYNPRO.
      CLEAR iBDCDATA.
      iBDCDATA-PROGRAM  = PROGRAM.
      iBDCDATA-DYNPRO   = DYNPRO.
      iBDCDATA-DYNBEGIN = 'X'.
      APPEND ibDCDATA .
    ENDFORM.
           Insert field                                                  *
    FORM BDC_FIELD USING FNAM FVAL.
    IF FVAL <> NODATA.
        CLEAR iBDCDATA.
        iBDCDATA-FNAM = FNAM.
        iBDCDATA-FVAL = FVAL.
        APPEND iBDCDATA .
    ENDIF.

    Hi Dilip,
    You are reading your flat file into an internal table, you perform a LOOP over the read itab, but you are not using your BDCDATA data anywhere into IBDCDATA internal table! Those data have to be filled into FVAL parameter.
    Here an additional hint:
    1. The content of flat file is delivered as a STRING in GUI_UPLOAD. First you have to post these values into a structured internal table. And then perform the LOOP at this structured table.
    2. In the new ABAP concept newer ever user Header Lines (in an internal table). One reason: Header Lines are not allowed in ABAP Objects. Instead use
    LOOP AT itab into wa_structure.
    *do something with wa_structure
    APPEND wa_structure to IBDCDATA.
    ENDLOOP.
    Good success,
    Heinz

  • Problem with SM37 BDC recording

    Hi ,
    I want to change the output device for the job scheduled of 1000 pgms in SM37.
    For this i am using BDC recording.
    But when i run the recording, it does not fill the data and does not move from 1 screen to other screen.
    I have checked the recording, and everything got recorded.
    Please suggest .
    Thanks in advance.
    Rgds/Abhi

    Hi,
    Why not make things simpler by using FM BP_CHANGE_JOB_STEP.  Parameters required are:
    JOBNAME
    JOBCOUNT
    STEP-PROGRAM & STEP-TYP (equal to 'A')
    STEP_NUM
    ALLPRIPAR-PDEST
    Presumably you will have the info for JOBNAME, JOBCOUNT etc from your BDC feed.  To preserve the rest of the print parameters then use something like FM BP_JOB_READ and fill in ALLPRIPAR fields.
    Thanks,
    Pete

  • PO13 Recording problem for BDC

    Hi All.
    We have a requirement for PO13 bdc for changing the cost center data per position wise.
    I am trying to change the cost center from PO13.while doing manually, the new cost center is delimimting the older record & appending a new record in PO13 & as well as in PA30(Org Data).it is working fine.
    same thing I did in recording by SHDB for PO13.In this time it is overwriting the existing costcenter record & is not reflecting in the PA30 also.
    while doing manually , while saving the Popup"Previous record will be delimited at end.Do you want to save" (Program-SAPLSPO1)is comming.But same popup screen is not comming in SHDB recording.
    that's why even I ran the bdc , records are not comming properly.
    appart from this PO13 bdc, is there any other method of changing the Cost center (like bapi / function module) in mass.
    it is very urgently needed.Plaese help me to sort out this issue.
    Thanks in advance,
    Regards,
    Venkat

    Hi Venkat,
    You'd better try PP02 transaction for BDC recording when Organizational Management Objects are in question.
    Regards,
    Dilek

  • LSMW - one record to multiple record conversion

    Hello,
    I want to write a lsmw to convert one line of record in the input file to 3 records in the converted file.
    Ex: I have only one line of data to load project, wbs into PS. But for every single line of data I read from the imput file, I need to create 3 output conversions which varies by a single field and then pass it to bdc recording. Can anyone let me know how it can be done?
    Thank you
    Thilothama

    Hi,
      You will need to activate the ABAP Code in LSMW. Generally reach record in LSMW is looped and data is passed to the transaction.
    Follow the below mentioned procedure....
    Situation: You want to create two (or more) target records from a source record.
    Example: Your customer master of legacy files consists of one record containing among other things the fields "First name", "Name", "Phone number" for two contact persons. In the SAP system, a BKNVK record has to be filled for each contact person.
    Solution: Your legacy structure is assumed to look as follows:
    CUST Customer master
      VORNAME1  First name of first contact person
      NACHNAME1 Name of first contact person
      TELEFON1  Phone number of first contact person
      VORNAME2  First name of second contact person
      NACHNAME2 Name of second contact person
      TELEFON2  Phone number of second contact person
    Create the following rules:
    BKNVK-NAME1
           &#61663; CUST-NACHNAME1 (Move)
    BKNVK-TELF1
    &#61663; CUST-TELEFON1 (Move)
    BKNVK-NAMEV
    &#61663; CUST-VORNAME1 (Move)
    and add
    <b>__End_of_Record__
    transfer_record.</b>...     
    BKNVK-NAME1 = CUST-NACHNAME2.
    BKNVK-TELF1 = CUST-TELEFON2.
    BKNVK-NAMEV = CUST-VORNAME2.
    <b>transfer_record.</b>
    at processing time. This creates two BKNVK records.
    I hope this solves your problem
    Regards,
    Vara

  • Material Master BDC recording

    hi gurus,
    i am trying to do a material master creation using BDC recording,
    i am new i dont know how to modify the code,
    the following is the code, please let me know how to make changes.
    report ZTEST95
           no standard page heading line-size 255.
    include bdcrecx1.
    parameters: dataset(132) lower case default
                                  'C:\Documents and Settings\Deskt'
                                & 'op\test95.txt'.
       DO NOT CHANGE - the generated data section - DO NOT CHANGE    ***
      If it is nessesary to change the data section use the rules:
      1.) Each definition of a field exists of two lines
      2.) The first line shows exactly the comment
          '* data element: ' followed with the data element
          which describes the field.
          If you don't have a data element use the
          comment without a data element name
      3.) The second line shows the fieldname of the
          structure, the fieldname must consist of
          a fieldname and optional the character '_' and
          three numbers and the field length in brackets
      4.) Each field must be type C.
    Generated data section with specific formatting - DO NOT CHANGE  ***
    data: begin of record,
    data element: MATNR
            MATNR_001(040),
    data element: MBRSH
            MBRSH_002(001),
    data element: MTART
            MTART_003(004),
    data element: REF_MATNR
            MATNR_004(040),
    data element: XFELD
            KZSEL_01_005(001),
    data element: MAKTX
            MAKTX_006(040),
    data element: MEINS
            MEINS_007(003),
    data element: MATKL
            MATKL_008(009),
    data element: SPART
            SPART_009(002),
    data element: MTPOS_MARA
            MTPOS_MARA_010(004),
    data element: BRGEW
            BRGEW_011(017),
    data element: GEWEI
            GEWEI_012(003),
    data element: NTGEW
            NTGEW_013(017),
          end of record.
    End generated data section ***
    start-of-selection.
    perform open_dataset using dataset.
    perform open_group.
    do.
    read dataset dataset into record.
    if sy-subrc <> 0. exit. endif.
    perform bdc_dynpro      using 'SAPLMGMM' '0060'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RMMG1-MATNR'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    perform bdc_field       using 'RMMG1-MATNR'
                                  record-MATNR_001.
    perform bdc_field       using 'RMMG1-MBRSH'
                                  record-MBRSH_002.
    perform bdc_field       using 'RMMG1-MTART'
                                  record-MTART_003.
    perform bdc_field       using 'RMMG1_REF-MATNR'
                                  record-MATNR_004.
    perform bdc_dynpro      using 'SAPLMGMM' '0070'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MSICHTAUSW-DYTXT(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    perform bdc_field       using 'MSICHTAUSW-KZSEL(01)'
                                  record-KZSEL_01_005.
    perform bdc_dynpro      using 'SAPLMGMM' '4004'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  record-MAKTX_006.
    perform bdc_field       using 'MARA-MEINS'
                                  record-MEINS_007.
    perform bdc_field       using 'MARA-MATKL'
                                  record-MATKL_008.
    perform bdc_field       using 'MARA-SPART'
                                  record-SPART_009.
    perform bdc_field       using 'MARA-MTPOS_MARA'
                                  record-MTPOS_MARA_010.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MARA-BRGEW'.
    perform bdc_field       using 'MARA-BRGEW'
                                  record-BRGEW_011.
    perform bdc_field       using 'MARA-GEWEI'
                                  record-GEWEI_012.
    perform bdc_field       using 'MARA-NTGEW'
                                  record-NTGEW_013.
    perform bdc_dynpro      using 'SAPLSPO1' '0300'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=YES'.
    perform bdc_transaction using 'MM01'.
    enddo.
    perform close_group.
    perform close_dataset using dataset.
    thanks.

    Hi,
    It is better if the Material Master creation step is done by LSMW - Direct Input method with the following object:
    Object               0020   Material master
    Method               0000                 
    Program name         RMDATIND             
    Program type         D   Direct input
    Check the program documentation for more details.
    For a sample data file generation ( Sequential file ),  check the program RMDATGEN
    If the reqmt., is for a repetetive loading of Material Master you could schedule / execute the LSMW by following program: /SAPDMC/SAP_LSMW_INTERFACE.
    Hope this helps.
    Best Regards, Murugesh

  • BDC giving problems

    Hi all,
    I have a problem with my BDC, I am using a CALL transaction to update few fields. When I do a Call transaction using 'A'(all screen mode) the values which I am passing are getting updated.But when I do the same thing using 'N'(No screen mode) the values are not getting updated.
    Please help me with this.
    Thanks
    JM

    Hi,
    You would be some BDC_OKCODE(e.g for information POPUP) which is not captured in your BDC recording. This OKCODE maybe manually proccesed
    by you using enter or click in the forreground mode. Also check for warning messages.
    If there are none of those mentioned, you can use the following option of Call transaction
    CALL TRANSACTION <tcode> USING <bdcdata_tab> OPTIONS FROM <opt>.
    opt is a structure of type ctu_params and it needs to be populated(before calling the above statement) as below.
    opt-dismode = 'N'.
    Regards

  • Initial inventory upload using LSMW,BDC

    Dear Friends,
    I am trying to upload data for Initial inventory capturing of valuation type for t.code MB1C using LSMW,BDC BECAUSE of valuation type it is not capturing
    please guide me.I am using SAP Ecc 5 version.
    Thanks in advance.
    Rafeeq ahmed

    Hi Sameer,
    Have a look at these threads, they might help you
    Chart of Accounts Upload
    Problem: LSMW with transaction FS00 create account (BI is not generated)
    Thanks
    Janani
    award points if helpful

  • BDC recording for AS01

    hi all,
    how to do bdc recording for AS01.please send me step step by approach.

    Hi Satya,
    Welcome to SDN.
    Check this Sample program.
    REPORT ZASSET .
    INCLUDE ZASSET_INC .
    PARAMETERS: P_PCFILE LIKE RLGRAP-FILENAME.
    *PARAMETERS: P_FILE_S LIKE RLGRAP-FILENAME.
    PARAMETER : H_CHK AS CHECKBOX.
    "Proc Mode
    Include the BDC *
    **BDC DATA STUCTURE
    *DATA: BEGIN OF BDCDATA OCCURS 0.
    INCLUDE STRUCTURE BDCDATA.
    *DATA: END OF BDCDATA.
    messages of call transaction
    *DATA: MESSTAB LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
    TYPE-POOLS
    TYPE-POOLS TRUXS.
    DATA IT_DATA1 TYPE TRUXS_T_TEXT_DATA.
    DATA : BEGIN OF IT_DATA OCCURS 0,
    INVZU(015),
    ANLKL(008),
    BUKRS(004),
    TXT50(100),
    SERNR(018),
    MENGE(018),
    INKEN(001),
    AKTIV(010),
    KOSTL(010),
    WERKS(004),
    STORT(010),
    ORD41(004),
    ORD42(004),
    EQANZ(001),
    LIFNR(010),
    AFASL(004),
    NDJAR(003),
    AFABG(010),
    ANLGR(012),
    ANLGR2(004),
    ANBTR01_01(016),
    ANBTR01_06(016),
    ANBTR01_16(016),
    TDATE(010),
    TCODE(004),
    TAMT(018),
    PERNR(012),
    KFZKF(015),
    SAP_ASSET(12),
    ERR_ASSET,
    END OF IT_DATA.
    DATA : BEGIN OF IT_DATA2 OCCURS 0,
    INVZU(015),
    TDATE(010),
    TCODE(004),
    TAMT(018),
    END OF IT_DATA2.
    DATA : BEGIN OF IT_DATA3 OCCURS 0,
    ITEM(003),
    INVZU(015),
    ANLKL(010),
    BUKRS(010),
    TXT50(050),
    SERNR(018),
    MENGE(018),
    INKEN(001),
    AKTIV(010),
    KOSTL(010),
    WERKS(004),
    STORT(010),
    ORD41(004),
    ORD42(004),
    EQANZ(001),
    LIFNR(010),
    AFASL(004),
    NDJAR(003),
    AFABG(010),
    ANLGR(012),
    ANLGR2(004),
    ANBTR01_01(016),
    ANBTR01_06(016),
    ANBTR01_16(016),
    TDATE(010),
    TCODE(004),
    TAMT(018),
    SAP_ASSET(12),
    ERR_ASSET,
    END OF IT_DATA3.
    SUB ASSET MASTER TABLE
    DATA : BEGIN OF IT_DATA_SUB OCCURS 0,
    INVZU_M(015),
    INVZU(015),
    BUKRS(004),
    TXT50(100),
    ANLHTXT(050),
    SERNR(018),
    MENGE(018),
    MEINS_007(003),
    XHIST_008(001),
    AKTIV(010),
    GSBER_011(004),
    KOSTL(010),
    STORT(010),
    ORD41(004),
    ORD42(004),
    EQANZ_016(001),
    LIFNR(010),
    LIEFE(030),
    NDJAR(003),
    NDPER(003),
    ANBTR01_01(016),
    ANBTR01_06(016),
    ANBTR01_16(016),
    BZDAT(010),
    BWASL(003),
    ANBTR01(016),
    ANLN1(012),
    ERR_SUB,
    SUB_CODE(012),
    ERR_SUB1,
    END OF IT_DATA_SUB.
    *& At selection-screen on value request for getting f4 help
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_PCFILE.
    PERFORM VALUE_REQUEST_P_FILE.
    *AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE_S.
    PERFORM VALUE_REQUEST_P_FILE_S.
    START OF SELECTION *
    START-OF-SELECTION.
    To Upload the flat file datas *
    PERFORM GET_DATA.
    PERFORM UP_LOAD.
    PERFORM SUB_UPLOAD.
    WRITE :/ 'FOLLOWING ASSETS CREATED'.
    WRITE:/ 'OLD ASSET'.
    WRITE: 20 'COMPANY'.
    WRITE: 30 'SAP CODE'.
    LOOP AT IT_DATA WHERE ERR_ASSET NE 'X'.
    WRITE :/ IT_DATA-INVZU,
    20 IT_DATA-BUKRS, 30 IT_DATA-SAP_ASSET.
    ENDLOOP.
    SKIP 2.
    WRITE :/ 'FOLLOWING SUB ASSETS CREATED'.
    WRITE:/ 'OLD ASSET'.
    WRITE: 16 'OLD SUB ASSET'.
    WRITE: 35 'COMPANY'.
    WRITE: 45 'SAP CODE'.
    WRITE: 60 'SUB ASSET'.
    LOOP AT IT_DATA_SUB WHERE ERR_SUB NE 'X' AND ERR_SUB1 NE 'X'.
    WRITE :/ IT_DATA_SUB-INVZU_M,
    16 IT_DATA_SUB-INVZU,
    35 IT_DATA_SUB-BUKRS, 45 IT_DATA_SUB-ANLN1, 60
    *IT_DATA_SUB-SUB_CODE.
    ENDLOOP.
    *& Form value_request_p_file
    FORM VALUE_REQUEST_P_FILE .
    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
    PROGRAM_NAME = SYST-CPROG
    DYNPRO_NUMBER = SYST-DYNNR
    FIELD_NAME = 'x'
    IMPORTING
    FILE_NAME = P_PCFILE.
    ENDFORM. " value_request_p_file
    *& Form UP_LOAD
    text
    --> p1 text
    <-- p2 text
    FORM UP_LOAD .
    SORT IT_DATA BY INVZU.
    SORT IT_DATA2 BY INVZU.
    DATA : V_LEN1 TYPE I, V_LEN2 TYPE I, V_SUBSTR1(50) ,V_SUBSTR2(50).
    perform open_dataset using dataset.
    PERFORM OPEN_GROUP.
    LOOP AT IT_DATA.
    CONDENSE IT_DATA-TXT50.
    V_LEN1 = STRLEN( IT_DATA-TXT50 ).
    IF V_LEN1 > 50.
    V_SUBSTR1 = IT_DATA-TXT50+0(50).
    V_LEN2 = V_LEN1 - 50.
    V_SUBSTR2 = IT_DATA-TXT50+50(50).
    ELSE.
    V_SUBSTR1 = IT_DATA-TXT50.
    V_SUBSTR2 = ''..
    ENDIF.
    REFRESH BDCDATA.
    PERFORM BDC_DYNPRO USING 'SAPLAIST' '0105'.
    PERFORM BDC_FIELD USING 'BDC_CURSOR'
    'ANLA-BUKRS'.
    PERFORM BDC_FIELD USING 'BDC_OKCODE'
    '/00'.
    PERFORM BDC_FIELD USING 'ANLA-ANLKL'
    IT_DATA-ANLKL.
    PERFORM BDC_FIELD USING 'ANLA-BUKRS'
    IT_DATA-BUKRS.
    PERFORM BDC_DYNPRO USING 'SAPLAIST' '1000'.
    PERFORM BDC_FIELD USING 'BDC_OKCODE'
    '=TAB02'.
    PERFORM BDC_FIELD USING 'ANLA-TXT50'
    V_SUBSTR1. "IT_DATA-TXT50.
    PERFORM BDC_FIELD USING 'ANLA-TXA50'
    V_SUBSTR2.
    PERFORM BDC_FIELD USING 'ANLA-SERNR'
    IT_DATA-SERNR.
    PERFORM BDC_FIELD USING 'ANLA-MENGE'
    IT_DATA-MENGE.
    *perform bdc_field using 'ANLA-INKEN'
    record-INKEN_006.
    PERFORM BDC_FIELD USING 'ANLA-INVZU'
    IT_DATA-INVZU.
    PERFORM BDC_FIELD USING 'BDC_CURSOR'
    'ANLA-AKTIV'.
    PERFORM BDC_FIELD USING 'ANLA-AKTIV'
    IT_DATA-AKTIV.
    PERFORM BDC_DYNPRO USING 'SAPLAIST' '1000'.
    PERFORM BDC_FIELD USING 'BDC_OKCODE'
    '=TAB03'.
    PERFORM BDC_FIELD USING 'BDC_CURSOR'
    'ANLZ-PERNR'.
    PERFORM BDC_FIELD USING 'ANLZ-PERNR'
    IT_DATA-PERNR.
    PERFORM BDC_FIELD USING 'ANLZ-KOSTL'
    IT_DATA-KOSTL.
    PERFORM BDC_FIELD USING 'ANLZ-WERKS'
    IT_DATA-WERKS.
    PERFORM BDC_FIELD USING 'ANLZ-STORT'
    IT_DATA-STORT.
    IF IT_DATA-ANLKL = 'VHCL'.
    PERFORM BDC_FIELD USING 'ANLZ-KFZKZ'
    IT_DATA-KFZKF.
    ENDIF.
    PERFORM BDC_DYNPRO USING 'SAPLAIST' '1000'.
    PERFORM BDC_FIELD USING 'BDC_OKCODE'
    '=TAB04'.
    PERFORM BDC_FIELD USING 'BDC_CURSOR'
    'ANLA-ORD42'.
    PERFORM BDC_FIELD USING 'ANLA-ORD41'
    IT_DATA-ORD41.
    PERFORM BDC_FIELD USING 'ANLA-ORD42'
    IT_DATA-ORD42.
    *perform bdc_field using 'RA02S-EQANZ'
    record-EQANZ_014.
    PERFORM BDC_DYNPRO USING 'SAPLAIST' '1000'.
    PERFORM BDC_FIELD USING 'BDC_OKCODE'
    '=TAB06'.
    PERFORM BDC_FIELD USING 'BDC_CURSOR'
    'ANLA-LIFNR'.
    PERFORM BDC_FIELD USING 'ANLA-LIFNR'
    IT_DATA-LIFNR.
    PERFORM BDC_DYNPRO USING 'SAPLAIST' '1000'.
    PERFORM BDC_FIELD USING 'BDC_OKCODE'
    '=TAB08'.
    PERFORM BDC_FIELD USING 'BDC_CURSOR'
    'ANLV-VSART'.
    PERFORM BDC_DYNPRO USING 'SAPLAIST' '1000'.
    PERFORM BDC_FIELD USING 'BDC_OKCODE'
    '=SELZ'.
    PERFORM BDC_FIELD USING 'BDC_CURSOR'
    'RA02S-XAKPLA(02)'.
    PERFORM BDC_DYNPRO USING 'SAPLAIST' '0195'.
    PERFORM BDC_FIELD USING 'BDC_CURSOR'
    'ANLB-AFASL'.
    IF IT_DATA-TCODE IS INITIAL.
    PERFORM BDC_FIELD USING 'BDC_OKCODE'
    '=ALTD'.
    ELSE.
    PERFORM BDC_FIELD USING 'BDC_OKCODE'
    '=ALTB'.
    ENDIF.
    PERFORM BDC_FIELD USING 'ANLB-ANLGR'
    IT_DATA-ANLGR.
    PERFORM BDC_FIELD USING 'ANLB-ANLGR2'
    IT_DATA-ANLGR2.
    PERFORM BDC_DYNPRO USING 'SAPLALTD' '1100'.
    IF IT_DATA-TCODE IS INITIAL.
    PERFORM BDC_FIELD USING 'BDC_OKCODE'
    '=BUCH'.
    PERFORM BDC_FIELD USING 'RALT_DYNP_STRUC-ANBTR01(01)'
    IT_DATA-ANBTR01_01.
    IF H_CHK NE 'X'.
    PERFORM BDC_FIELD USING 'RALT_DYNP_STRUC-ANBTR01(06)'
    IT_DATA-ANBTR01_06.
    ENDIF.
    ELSE.
    PERFORM BDC_FIELD USING 'BDC_OKCODE'
    '=ALTB'.
    PERFORM BDC_DYNPRO USING 'SAPLALTD' '1200'.
    PERFORM BDC_FIELD USING 'BDC_OKCODE'
    '=BUCH'.
    PERFORM BDC_FIELD USING 'RALT_DYNP_STRUC-BZDAT(01)'
    IT_DATA-TDATE.
    PERFORM BDC_FIELD USING 'RALT_DYNP_STRUC-BWASL(01)'
    IT_DATA-TCODE.
    PERFORM BDC_FIELD USING 'RALT_DYNP_STRUC-ANBTR01(01)'
    IT_DATA-TAMT.
    ENDIF.
    REFRESH MESSTAB.
    CALL TRANSACTION 'AS91' USING BDCDATA
    MODE H_MODE
    UPDATE 'S'
    MESSAGES INTO MESSTAB.
    PERFORM BDC_TRANSACTION USING 'AS91'.
    ENDLOOP..
    PERFORM CLOSE_GROUP.
    *perform close_dataset using dataset.
    ENDFORM. " UP_LOAD
    *& Form GET_DATA
    text
    --> p1 text
    <-- p2 text
    FORM GET_DATA .
    CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
    EXPORTING
    I_TAB_RAW_DATA = IT_DATA1
    I_FILENAME = P_PCFILE
    TABLES
    I_TAB_CONVERTED_DATA = IT_DATA.
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    LOOP AT IT_DATA3.
    IF IT_DATA3-ITEM = '1'.
    MOVE-CORRESPONDING IT_DATA3 TO IT_DATA.
    APPEND IT_DATA.
    ELSEIF IT_DATA3-ITEM = '2'.
    IT_DATA2-INVZU = IT_DATA3-INVZU.
    IT_DATA2-TDATE = IT_DATA3-ANLKL.
    IT_DATA2-TCODE = IT_DATA3-BUKRS.
    IT_DATA2-TAMT = IT_DATA3-TXT50.
    APPEND IT_DATA2.
    ENDIF.
    ENDLOOP.
    IF NOT P_FILE_S IS INITIAL.
    CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
    EXPORTING
    I_TAB_RAW_DATA = IT_DATA1
    I_FILENAME = P_FILE_S
    TABLES
    I_TAB_CONVERTED_DATA = IT_DATA_SUB.
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDIF.
    ENDFORM. " GET_DATA
    FORM BDC_DYNPRO
    --> PROGRAM
    --> DYNPRO
    **FORM BDC_DYNPRO USING PROGRAM DYNPRO.
    CLEAR BDCDATA.
    BDCDATA-PROGRAM = PROGRAM.
    BDCDATA-DYNPRO = DYNPRO.
    BDCDATA-DYNBEGIN = 'X'.
    APPEND BDCDATA.
    **ENDFORM. " BDC_DYNPRO
    FORM BDC_FIELD
    --> FNAM
    --> FVAL
    **FORM BDC_FIELD USING FNAM FVAL.
    CLEAR BDCDATA.
    BDCDATA-FNAM = FNAM.
    BDCDATA-FVAL = FVAL.
    APPEND BDCDATA.
    **ENDFORM. "BDC_FIELD
    ***& Form bdc_transaction
    text
    -->TCODE text
    **FORM BDC_TRANSACTION USING TCODE.
    REFRESH MESSTAB.
    CALL TRANSACTION TCODE USING BDCDATA
    MODE H_MODE
    UPDATE 'S'
    MESSAGES INTO MESSTAB.
    **ENDFORM. " bdc_transaction
    *& Form VALUE_REQUEST_P_FILE_S
    text
    --> p1 text
    <-- p2 text
    FORM VALUE_REQUEST_P_FILE_S .
    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
    PROGRAM_NAME = SYST-CPROG
    DYNPRO_NUMBER = SYST-DYNNR
    FIELD_NAME = 'x'
    IMPORTING
    FILE_NAME = P_FILE_S.
    ENDFORM. " VALUE_REQUEST_P_FILE_S
    *& Form sUB_upload
    text
    --> p1 text
    <-- p2 text
    ***FORM SUB_UPLOAD .
    DATA : V_LEN1 TYPE I, V_LEN2 TYPE I, V_SUBSTR1(50) ,V_SUBSTR2(50).
    LOOP AT IT_DATA_SUB WHERE ERR_SUB NE 'X'.
    CONDENSE IT_DATA_SUB-TXT50.
    V_LEN1 = STRLEN( IT_DATA_SUB-TXT50 ).
    IF V_LEN1 > 50.
    V_SUBSTR1 = IT_DATA_SUB-TXT50+0(50).
    V_LEN2 = V_LEN1 - 50.
    V_SUBSTR2 = IT_DATA_SUB-TXT50+50(50).
    ELSE.
    V_SUBSTR1 = IT_DATA_SUB-TXT50.
    V_SUBSTR2 = ''..
    ENDIF.
    REFRESH BDCDATA.
    PERFORM BDC_DYNPRO USING 'SAPLAIST' '0110'.
    PERFORM BDC_FIELD USING 'BDC_CURSOR'
    'ANLA-ANLN1'.
    PERFORM BDC_FIELD USING 'BDC_OKCODE'
    '=MAST'.
    PERFORM BDC_FIELD USING 'ANLA-ANLN1'
    IT_DATA_SUB-ANLN1.
    PERFORM BDC_FIELD USING 'ANLA-BUKRS'
    IT_DATA_SUB-BUKRS.
    PERFORM BDC_DYNPRO USING 'SAPLAIST' '1000'.
    PERFORM BDC_FIELD USING 'BDC_OKCODE'
    '=TAB02'.
    PERFORM BDC_FIELD USING 'ANLA-TXT50'
    V_SUBSTR1. "IT_DATA_SUB-TXT50.
    PERFORM BDC_FIELD USING 'ANLA-TXa50'
    V_SUBSTR2. "IT_DATA_SUB-TXT50.
    ****perform bdc_field using 'ANLH-ANLHTXT'
    it_data_sub-ANLHTXT_004.
    PERFORM BDC_FIELD USING 'ANLA-SERNR'
    IT_DATA_SUB-SERNR.
    PERFORM BDC_FIELD USING 'ANLA-MENGE'
    IT_DATA_SUB-MENGE.
    ****perform bdc_field using 'ANLA-MEINS'
    it_data_sub-MEINS_007.
    ****perform bdc_field using 'RA02S-XHIST'
    it_data_sub-XHIST_008.
    PERFORM BDC_FIELD USING 'ANLA-INVZU'
    IT_DATA_SUB-INVZU.
    PERFORM BDC_FIELD USING 'BDC_CURSOR'
    'ANLA-AKTIV'.
    PERFORM BDC_FIELD USING 'ANLA-AKTIV'
    IT_DATA_SUB-AKTIV.
    PERFORM BDC_DYNPRO USING 'SAPLAIST' '1000'.
    PERFORM BDC_FIELD USING 'BDC_OKCODE'
    '=TAB03'.
    PERFORM BDC_FIELD USING 'BDC_CURSOR'
    'ANLZ-GSBER'.
    ****perform bdc_field using 'ANLZ-GSBER'
    it_data_sub-GSBER_011.
    ****perform bdc_field using 'ANLZ-KOSTL'
    it_data_sub-KOSTL_012.
    PERFORM BDC_FIELD USING 'ANLZ-STORT'
    IT_DATA_SUB-STORT.
    PERFORM BDC_DYNPRO USING 'SAPLAIST' '1000'.
    PERFORM BDC_FIELD USING 'BDC_OKCODE'
    '=TAB04'.
    PERFORM BDC_FIELD USING 'BDC_CURSOR'
    'ANLA-ORD41'.
    PERFORM BDC_FIELD USING 'ANLA-ORD41'
    IT_DATA_SUB-ORD41.
    PERFORM BDC_FIELD USING 'ANLA-ORD42'
    IT_DATA_SUB-ORD42.
    ****perform bdc_field using 'RA02S-EQANZ'
    it_data_sub-EQANZ_016.
    PERFORM BDC_DYNPRO USING 'SAPLAIST' '1000'.
    PERFORM BDC_FIELD USING 'BDC_OKCODE'
    '=TAB07'.
    PERFORM BDC_FIELD USING 'BDC_CURSOR'
    'ANLA-LIFNR'.
    PERFORM BDC_FIELD USING 'ANLA-LIFNR'
    IT_DATA_SUB-LIFNR.
    ****perform bdc_field using 'ANLA-LIEFE'
    IT_DATA_SUB-LIEFE.
    PERFORM BDC_DYNPRO USING 'SAPLAIST' '1000'.
    PERFORM BDC_FIELD USING 'BDC_OKCODE'
    '=TAB08'.
    PERFORM BDC_FIELD USING 'BDC_CURSOR'
    'ANLA-LEART'.
    PERFORM BDC_DYNPRO USING 'SAPLAIST' '1000'.
    PERFORM BDC_FIELD USING 'BDC_OKCODE'
    '=SELZ'.
    PERFORM BDC_FIELD USING 'BDC_CURSOR'
    'T093T-AFBKTX(01)'.
    PERFORM BDC_DYNPRO USING 'SAPLAIST' '0195'.
    PERFORM BDC_FIELD USING 'BDC_CURSOR'
    'ANLB-NDPER'.
    PERFORM BDC_FIELD USING 'BDC_OKCODE'
    '=ALTD'.
    PERFORM BDC_FIELD USING 'ANLB-NDJAR'
    IT_DATA_SUB-NDJAR.
    PERFORM BDC_FIELD USING 'ANLB-NDPER'
    IT_DATA_SUB-NDPER.
    ****perform bdc_field using 'ANLB-AFABG'
    record-AFABG_029.
    PERFORM BDC_DYNPRO USING 'SAPLALTD' '1100'.
    PERFORM BDC_FIELD USING 'BDC_CURSOR'
    'ANLA-ANLN1'.
    IF IT_DATA_SUB-BWASL IS INITIAL.
    PERFORM BDC_FIELD USING 'BDC_OKCODE'
    '=BUCH'.
    PERFORM BDC_FIELD USING 'RALT_DYNP_STRUC-ANBTR01(01)'
    IT_DATA_SUB-ANBTR01_01.
    Accu deprn automatically calculated by system changed on 6th Aug.
    PERFORM BDC_FIELD USING 'RALT_DYNP_STRUC-ANBTR01(06)'
    IT_DATA_SUB-ANBTR01_06.
    ELSE.
    PERFORM BDC_FIELD USING 'BDC_OKCODE'
    '=ALTB'.
    PERFORM BDC_DYNPRO USING 'SAPLALTD' '1200'.
    PERFORM BDC_FIELD USING 'BDC_OKCODE'
    '/00'.
    PERFORM BDC_FIELD USING 'RALT_DYNP_STRUC-BZDAT(01)'
    IT_DATA_SUB-BZDAT.
    PERFORM BDC_FIELD USING 'RALT_DYNP_STRUC-BWASL(01)'
    IT_DATA_SUB-BWASL.
    PERFORM BDC_FIELD USING 'RALT_DYNP_STRUC-ANBTR01(01)'
    IT_DATA_SUB-ANBTR01.
    PERFORM BDC_DYNPRO USING 'SAPLALTD' '1200'.
    PERFORM BDC_FIELD USING 'BDC_CURSOR'
    'ANLA-ANLN1'.
    PERFORM BDC_FIELD USING 'BDC_OKCODE'
    '=BUCH'.
    ****perform bdc_transaction using 'AS94'.
    ENDIF.
    REFRESH MESSTAB.
    CALL TRANSACTION 'AS94' USING BDCDATA
    MODE H_MODE
    UPDATE 'S'
    MESSAGES INTO MESSTAB.
    IF SY-SUBRC = 0.
    READ TABLE MESSTAB INDEX 1.
    IT_DATA_sub-SUB_CODE = MESSTAB-MSGV1.
    DATA AN1 TYPE ANLN1.
    DATA AN2 TYPE ANLN2.
    GET PARAMETER ID 'AN2' FIELD AN2.
    IT_DATA_SUB-SUB_CODE = AN2. "MESSTAB-MSGV1.
    MODIFY IT_DATA_SUB TRANSPORTING SUB_CODE.
    ELSE.
    IT_DATA_SUB-ERR_SUB1 = 'X'.
    MODIFY IT_DATA_SUB TRANSPORTING ERR_SUB1.
    ENDIF.
    REFRESH BDCDATA.
    ENDLOOP.
    ***ENDFORM. " sUB_upload
    ****& Form SUB_UPLOAD1
    text
    ***FORM SUB_UPLOAD1 .
    LOOP AT IT_DATA_SUB WHERE ERR_SUB NE 'X'.
    PERFORM BDC_DYNPRO USING 'SAPLAIST' '0110'.
    PERFORM BDC_FIELD USING 'BDC_CURSOR'
    'ANLA-ANLN1'.
    PERFORM BDC_FIELD USING 'BDC_OKCODE'
    '=MAST'.
    PERFORM BDC_FIELD USING 'ANLA-ANLN1'
    IT_DATA_SUB-ANLN1.
    PERFORM BDC_FIELD USING 'ANLA-BUKRS'
    IT_DATA_SUB-BUKRS.
    PERFORM BDC_DYNPRO USING 'SAPLAIST' '1000'.
    PERFORM BDC_FIELD USING 'BDC_OKCODE'
    '=TAB02'.
    PERFORM BDC_FIELD USING 'ANLA-TXT50'
    IT_DATA_SUB-TXT50.
    ****perform bdc_field using 'ANLH-ANLHTXT'
    it_data_sub-ANLHTXT_004.
    PERFORM BDC_FIELD USING 'ANLA-SERNR'
    IT_DATA_SUB-SERNR.
    PERFORM BDC_FIELD USING 'ANLA-MENGE'
    IT_DATA_SUB-MENGE.
    ****perform bdc_field using 'ANLA-MEINS'
    it_data_sub-MEINS_007.
    ****perform bdc_field using 'RA02S-XHIST'
    it_data_sub-XHIST_008.
    PERFORM BDC_FIELD USING 'ANLA-INVZU'
    IT_DATA_SUB-INVZU.
    PERFORM BDC_FIELD USING 'BDC_CURSOR'
    'ANLA-AKTIV'.
    PERFORM BDC_FIELD USING 'ANLA-AKTIV'
    IT_DATA_SUB-AKTIV.
    PERFORM BDC_DYNPRO USING 'SAPLAIST' '1000'.
    PERFORM BDC_FIELD USING 'BDC_OKCODE'
    '=TAB03'.
    PERFORM BDC_FIELD USING 'BDC_CURSOR'
    'ANLZ-GSBER'.
    ****perform bdc_field using 'ANLZ-GSBER'
    it_data_sub-GSBER_011.
    ****perform bdc_field using 'ANLZ-KOSTL'
    it_data_sub-KOSTL_012.
    PERFORM BDC_FIELD USING 'ANLZ-STORT'
    IT_DATA_SUB-STORT.
    PERFORM BDC_DYNPRO USING 'SAPLAIST' '1000'.
    PERFORM BDC_FIELD USING 'BDC_OKCODE'
    '=TAB04'.
    PERFORM BDC_FIELD USING 'BDC_CURSOR'
    'ANLA-ORD41'.
    PERFORM BDC_FIELD USING 'ANLA-ORD41'
    IT_DATA_SUB-ORD41.
    PERFORM BDC_FIELD USING 'ANLA-ORD42'
    IT_DATA_SUB-ORD42.
    ****perform bdc_field using 'RA02S-EQANZ'
    it_data_sub-EQANZ_016.
    PERFORM BDC_DYNPRO USING 'SAPLAIST' '1000'.
    PERFORM BDC_FIELD USING 'BDC_OKCODE'
    '=TAB07'.
    PERFORM BDC_FIELD USING 'BDC_CURSOR'
    'ANLA-LIFNR'.
    PERFORM BDC_FIELD USING 'ANLA-LIFNR'
    IT_DATA_SUB-LIFNR.
    ****perform bdc_field using 'ANLA-LIEFE'
    IT_DATA_SUB-LIEFE.
    PERFORM BDC_DYNPRO USING 'SAPLAIST' '1000'.
    PERFORM BDC_FIELD USING 'BDC_OKCODE'
    '=TAB08'.
    PERFORM BDC_FIELD USING 'BDC_CURSOR'
    'ANLA-LEART'.
    PERFORM BDC_DYNPRO USING 'SAPLAIST' '1000'.
    PERFORM BDC_FIELD USING 'BDC_OKCODE'
    '=SELZ'.
    PERFORM BDC_FIELD USING 'BDC_CURSOR'
    'T093T-AFBKTX(01)'.
    PERFORM BDC_DYNPRO USING 'SAPLAIST' '0195'.
    PERFORM BDC_FIELD USING 'BDC_CURSOR'
    'ANLB-NDPER'.
    PERFORM BDC_FIELD USING 'BDC_OKCODE'
    '=ALTD'.
    PERFORM BDC_FIELD USING 'ANLB-NDJAR'
    IT_DATA_SUB-NDJAR.
    PERFORM BDC_FIELD USING 'ANLB-NDPER'
    IT_DATA_SUB-NDPER.
    ****perform bdc_field using 'ANLB-AFABG'
    record-AFABG_029.
    PERFORM BDC_DYNPRO USING 'SAPLALTD' '1100'.
    PERFORM BDC_FIELD USING 'BDC_CURSOR'
    'ANLA-ANLN1'.
    PERFORM BDC_FIELD USING 'BDC_OKCODE'
    '=ALTB'.
    PERFORM BDC_FIELD USING 'RALT_DYNP_STRUC-ANBTR01(01)'
    IT_DATA_SUB-ANBTR01_01.
    PERFORM BDC_FIELD USING 'RALT_DYNP_STRUC-ANBTR01(06)'
    IT_DATA_SUB-ANBTR01_06.
    PERFORM BDC_DYNPRO USING 'SAPLALTD' '1200'.
    PERFORM BDC_FIELD USING 'BDC_OKCODE'
    '/00'.
    PERFORM BDC_FIELD USING 'RALT_DYNP_STRUC-BZDAT(01)'
    IT_DATA_SUB-BZDAT.
    PERFORM BDC_FIELD USING 'RALT_DYNP_STRUC-BWASL(01)'
    IT_DATA_SUB-BWASL.
    PERFORM BDC_FIELD USING 'RALT_DYNP_STRUC-ANBTR01(01)'
    IT_DATA_SUB-ANBTR01.
    PERFORM BDC_DYNPRO USING 'SAPLALTD' '1200'.
    PERFORM BDC_FIELD USING 'BDC_CURSOR'
    'ANLA-ANLN1'.
    PERFORM BDC_FIELD USING 'BDC_OKCODE'
    '=BUCH'.
    ****perform bdc_transaction using 'AS94'.
    REFRESH MESSTAB.
    CALL TRANSACTION 'AS94' USING BDCDATA
    MODE H_MODE
    UPDATE 'S'
    MESSAGES INTO MESSTAB.
    IF SY-SUBRC = 0.
    READ TABLE MESSTAB INDEX 1.
    IT_DATA_sub-SUB_CODE = MESSTAB-MSGV1.
    DATA AN1 TYPE ANLN1.
    DATA AN2 TYPE ANLN2.
    GET PARAMETER ID 'AN2' FIELD AN2.
    IT_DATA_SUB-SUB_CODE = AN2. "MESSTAB-MSGV1.
    MODIFY IT_DATA_SUB TRANSPORTING SUB_CODE.
    ELSE.
    IT_DATA_SUB-ERR_SUB1 = 'X'.
    MODIFY IT_DATA_SUB TRANSPORTING ERR_SUB1.
    ENDIF.
    REFRESH BDCDATA.
    ENDLOOP.
    ***ENDFORM. " sUB_upload
    and one more thing i face some issues when doing bdc for AS01, so i use AS91 and AS92 for uploading by using LSMW (direct input method and recording method) and it was successful.(if u have to do coding go for BDC/BAPI or there is no coding better to choose LSMW (it is the easiest way) as of my knowledge, so before starting just analyze once which method is best for ur requirement.
    Reward Points for Useful Answers
    Thanks
    Naveen khan
    Message was edited by:
            Pattan Naveen

  • How to upload data for me01 using LSMW BDC METHOD

    *hi export please tell me the complete procedure for uploading data in me01 using LSMW BDC METHOD*
    Moderator message: please search for available information/documentation.
    Edited by: Thomas Zloch on May 8, 2011 10:06 PM

    Hi,
    To be honest I don't understand your question. When You execute LSMW and create project, then all steps are shown in a very clear way with good description. With which one you have problems?
    Best regards
    Marcin Cholewczuk

  • LSMW-BDC

    pls tell the differences between LSMW and BDC?

    Hi Ramnarayana,
    <b><u>BDC:</u></b>
    BDC is a technology used for data transfer.
    It is meant for transferring data through SAP transactions itself.
    It is for inbound / outbound processing.
    When you use BDC for data transfer, the sequence of steps is the same as when you use standard sap transaction screens for data upload.
    The only difference is that you can use different options for foreground and background processing.
    Batch Data Communication (BDC) is the process of transferring data from one SAP System to another SAP system or from a non-SAP system to SAP System.
    BDC is an automatic procedure.
    This method is used to transfer large amount of data that is available in electronic medium.
    BDC can be used primarily when installing the SAP system and when transferring data from a legacy system (external system).
    BDC uses normal transaction codes to transfer data.
    Types of BDC :
    CLASSICAL BATCH INPUT (Session Method)
    CALL TRANSACTION
    BATCH INPUT METHOD:
    This method is also called as ‘CLASSICAL METHOD’.
    Features:
    Asynchronous processing.
    Synchronous Processing in database update.
    Transfer data for more than one transaction.
    Batch input processing log will be generated.
    During processing, no transaction is started until the previous transaction has been written to the database.
    CALL TRANSACTION METHOD :
    This is another method to transfer data from the legacy system.
    Features:
    - Synchronous processing. The system performs a database commit immediately before and after the CALL TRANSACTION USING statement.
    - Updating the database can be either synchronous or asynchronous. The program specifies the update type.
    - Transfer data for a single transaction.
    - Transfers data for a sequence of dialog screens.
    - No batch input processing log is generated.
    <b><u>LSMW</u></b>
    LSMW on the other hand is a tool that helps migrate data from a legacy system (non-sap system ) to SAP system.
    It is for inbound processing.
    It offers you various options to use either batch input, direct input, BAPIs or idocs.
    It involves a series of steps to migrate data.
    The main advantages of the LSM Workbench:
    - Part of R/3 and thus independent of individual platforms
    - A variety of technical possibilities of data conversion:
    - Data consistency due to standard import techniques:
    Batch input
    Direct input
    BAPIs (Business Application Programming Interfaces)
    IDocs (Intermediate Documents)
    The import technique to be used in an individual case depends on the business object.
    - Generation of the conversion program on the basis of defined rules
    - Clear interactive process guide
    - Interface for data in spreadsheet format
    - Creation of data migration objects on the basis of recorded transactions
    - Charge-free for SAP customers and SAP partners
    <b><i>Please check the below link for your kind reference:</i></b>
    Diff. between LSMW & BDC?
    <b>Please reward points if it is useful.
    Cheers !
    Moqeeth.</b>

  • Data Migration- Infotypes BDC Recording

    Hi All,
    Iam currently working on data migration project.
    Before i joined here,they developed the upload programes,by using Function modules.But when we are doing that,we are able to see in Over veiw,But when we go to change mode,nothing is there on screen.Then we tried Using BDC Recording for IT0105.Then working perfectly.
    So i need a help,if any one of you any idea on list of the Infotypes which need BDC Recording.
    I need the List of infotypes,so that i make sure,we use BDC .
    Its on priority,Pls have some inputs.
    Thanks,
    Anitha

    Hey Anitha,
    BDC and LSMW are both data loading techniques.
    In both cases you will need input files in a specific format so that these are read by your BDC or LSMW program
    The main difference is
    Using BDC you can validate the data in the system. Suppose you want to check if an employee is active before loading the data then BDC is advisable because you can check the employment status of the employee and then upload data or else give a message that employee is terminated and data loading has been skipped
    If there is a straight forward upload without any validation then go for LSMW
    Finally it depends on your requirements
    Cheers
    Ajay
    As stated above IT 0008 has to be filled using table control hence BDC is helpful
    Edited by: Ajay  Hosur on Apr 13, 2010 6:41 AM

  • Capturing warning message in BDC recording

    Hi all,
    I want to capture a warning message that is getting popped during BDC recording. When BDC is ran in background, it is stopping at that point and further processing is stopped with the display of this warning message.
    Can anybody help me in capturing this warning message?
    Thanksm
    Archana

    Hi Avinash,
    I am trying to change the profit center using this BDC. So, when i change it, this warning is displayed and it goes inside one more window and coreects the new profit center added in the previous window. So, this warning message is necessary to be displayed. But my problem is that because of this message my BDC is also not proceeding further.
    Hi Bhavesh,
    The warning message is getting displayed as a pop-up. I am not getting any information about the screen number. I know the prgram for that but no the screen number. And can you please tell me what that piece of code does? So that i can try it out in my BDC.
    Thanks,
    Archana

Maybe you are looking for