BDC for Document Clearing - FBRA

Hi,
When I use transaction FBRA and try clearing document then it populates window asking three options - 1. Only Resetting  2. Resetting and Reverse  3. Cancel.  I need to choose 1st option i.e. Only Resetting.
I am trying to record the transaction FBRA through SHDB. But when I go for 'Reset cleared items( Ctrl+S )' then it concludes the recording and don't populate above mentioned three options there. Document is getting cleared though.
Here I would like to know that if i'll use this recording then will it clear all the documents with 1st option always? If not then please suggest how I need to do this recording?
Thanks.

Anybody who came across this type of problem please respond.

Similar Messages

  • FM or BAPI or BDC for clearing open items...

    Hello Gurus,
    I have to write a code to clear/ close 12 million open G/L items in SAP. Is there a standard SAP FM or BAPI to do this ? Or do I have to write a BDC for this. If I have to write BDC, do I write BDC on T-Code F.13, FB05 or other T-Code.
    Regards,
    Jainam.
    Edited by: Jainam Shah on Sep 23, 2010 5:13 PM

    If you have configured the correct clearing criteria in the IMG, then you can just run program SAPF124.  Why did you need a shell program with a BDC - are you trying to clear by document within your clearing criteria?

  • Document Split for Manually Cleared Items

    Hi SDN,
    Is there a way to inherit the document splitting characteristics for manually cleared items? To give you an example, please see below scenario in General Ledger View
    Invoice
    Dr Expense                 Cost ctr 10001
    Cr Trade Creditors      Cost ctr 10001 (inherited from expense item)
    Payment
    Dr Trade Creditors       (no cost center assigned)
    Cr Outgoing Bank          (no cost center assigned)
    Manual Clearing of vendor items via F-04
    Dr Trade Creditors        (no cost center assigned)
    Cr Trade Creditors        Cost ctr 10001
    Dr Zero Balance Clrg    Cost ctr 10001
    Cr Zero Balance Clrg    (no cost center assigned)
    This scenario happens since the company has instances where payment comes first before the actuall invoice. In this instance, the document split function won't properly reflect the correct cost center assignment.
    Is there a way for this to be inherited even for manual clearing (just like the one for bank reconciliation process wherein the cost/profit center assignments are inherited on the clearing items)
    Thanks

    Hello,
    Yes, you can have profit center as a characteristic for splitting and inheritance too. Your scenario will work as below:
    Invoice:
    Dr Expense  1000 CC1   PC1
    Cr A/C Pay   1000          PC1
    In above invoice PC1 will be inherited from the expense line in which the user will need to enter the cost center, and profit center will be derived from the Cost Center master.
    You make a payment:
    Dr  Vendor  1000      PC1
    Cr  Bank      1000    PC1
    In above scenario, user needs to give a profit center in bank line manually or it can be automatically derived using FAGL3KEH setting for bank accounts. From bank line the profit center will be inherited to the vendor line.
    Finally when you try to clear the vendor items using F-44, following entry will be passed:
    Dr Vendor 1000  PC1
    Cr Vendor 1000  PC1
    Only if the profit center entered during the payment and invoice are separate, zero balance clearing lines will be hit.
    Regards,
    Sam

  • Error Rounding Difference too high when reset cleared document using FBRA

    My Client has posted cleared document with T_Code F-51. This cleared document has cleared 6040 open items.
    And now, they want to reset and reverse that cleared document.
    We found error "Rounding difference too high" when we are reset cleared document using FBRA.
    Kindly need your advice.
    Many thanks in advance.
    Regards,

    Hello,
    Please let me know the ERROR number.
    Regards,
    Ravi

  • TABLE FOR INVOICE CLEARING DOCUMENT

    Hi Guys,
    What table will I use to view clearing document in Vendor with all the invoices applied and amount cleared?
    Regards,
    BTer

    Hi,
    Table = BSAK
    Fields -
    Clearing doc = AUGBL
    Invoice Doc = BELNR
    If you give the clearing doc number in the parameter screen, you will get the list of invoice documents cleared with the clearing document for the particular vendor.
    Regards,
    Mike
    Edited by: Michael Gerard Leo on Apr 16, 2009 9:36 AM
    Edited by: Michael Gerard Leo on Apr 16, 2009 9:36 AM

  • F110 - Clearing Date for Documents

    We Run the F110 on 28.07.2011 and it is run with successfully for payments. But actually we run it on 28.07.2011 Date but it will take for the clearing documents 29.07.2011.
    I don't know how it will take for clearing documents with 29.07.2011?
    Can you explain about it

    Hi:
            In F110...parameters tab, please check the document entered up to date or the free selection tab what you have specified in there. System takes the invoices according to the date Document entered up to date or whatever you specify in the free selection tab.
    Regards

  • User Exit and BDC for ME22N

    Hello All,
    A code has been written in the User exit for Tcode ME22N, Which sets the indicator on PO line item. This has been done by modifying the standard itab POT by using field symbols, because the fields to be modified are shown in display mode in the tcode ME22N and cannot be done in BDC. See the below code in user exit ZXM06U43.
    DATA char(50) VALUE '(SAPLMEPO)POT[]'.
    CLEAR wa_ind.
        FIELD-SYMBOLS <f1> TYPE ANY.
    Move memory of internal table POT to field symbol f1.
        ASSIGN (char) TO <f1>.
    Move content of f1 to internal table i_ind
        i_ind[] = <f1> .
        LOOP AT i_ind INTO wa_ind.
          IF wa_ind-pstyp = '9'.            " Service PO - item category
    IF PO Line item has History per Purchasing Document as 'D'
    Set indicators on, for the line item.
            CLEAR v_cnt.
            SELECT COUNT( * ) INTO v_cnt FROM ent5100
                                         WHERE ebeln = wa_ind-ebeln
                                           AND ebelp = wa_ind-ebelp
                                           AND bewtp = 'D'.
            IF sy-subrc = 0.
              wa_ind-wepos = 'X'.            " Set Goods Receipt Indicator
              wa_ind-webre = 'X'.            " Set GR-based IV Indicator
              wa_ind-lebre = 'X'.            " Set Srv-based IV Indicator
            ELSE.
    *End of addition SAP-20070910104025 - SL36 - D01K963369
              wa_ind-wepos = ' '.            " Clear Goods Receipt Indicator
              wa_ind-webre = ' '.            " Clear GR-based IV Indicator
              wa_ind-lebre = ' '.            " Clear Srv-based IV Indicator
              wa_ind-xersy = ' '.            " Clear ERS Indicator
            ENDIF.                                           
            MODIFY i_ind FROM wa_ind INDEX sy-tabix.
          ENDIF.
        ENDLOOP.
        <f1> = i_ind[].
      ENDIF.          
    ENDIF.
    This code is in production and has been working fine.
    The requirnment is now to make this indicator work for all the Purchase order before this code has been written in the Exit. For this my functional suggests that to write a separate program using BDC for PO change and jus add a period/dot  in the short text and save it. The code has been written, the user exit and the above code is getting triggrred values are updated in internal table correctly.
    However the flags was not set or cleared when seen in the tcode ME22N . This works fine if the tcode me22n is run directly and not working in BDC.
    I have tried with ME22 without enjoy transaction in BDC changing the POT Program to SAPMM06E. It does not work.
    Please help me as why it is not uodating in the table when using BDC.
    Thanks in Advance.
    Senthil Kumar

    Hi All,
    Any luck on this??
    Thanks

  • Reversing & Resetting The Reversed Document using FBRA

    Hello All,
    Our client by mistake reversed a payment document while doing MR8M. Now they want to reverse the reversed document.
    I have tried FBRA again for the reversed document and it worked out and a new document got posted.
    Now let the orginal document be A which is reversed and reset using the document B.
    Due to wrong reversal of A again we used FBRA and posted document C which in turn reversed and reset B.
    Now if you check the orginal document A is available as an open item , earlier which was a cleared item. I want to know how can we make in back to a cleared item
    Regards
    Arun

    Hi All ,
    Thanks for the responses.
    My issue is resolved.
    Steps followed are.
    1. First rest and reversed the reversal document in FBRA. --> At this time the orginal document has again appeared in the line items as an open item.
    2. It was also identified that along with the orginal document which appeared as open item all the items which was cleared using the orginal document also became the open item.
    3. Now we have made the manual clearing of the line items uaing the transfer posting with clearing
    Regards
    Arun

  • Problem in BDC for Transaction F-02

    Hi Friends,
    I am struck up in BDC for TransactionF-02.i am unable to load the data of my test data.when i am loading its loading the second record not the first record.
    Below is the test data
    H,RAWATEB,1
    M,11072006,ZE,1000,11072006,20,SAR,,,,,RAWATIB,,SALARIES,1000
    D,50,482000,3648.61,Z1,,,1000,1111,,,,,,
    D,40,113001,3648.61,Z1,,,1000,,,,,,,
    D,17,001011,3000000.00,Z1,,,1000,,,,,,,
    D,40,113001,3000000.00,Z1,,,1000,,,,,,,
    M,17082004,ZE,1000,11072006,20,SAR,,,,,RAWATIB,,SALARIES,1000
    D,50,482000,3202.82,Z1,,,1000,1112,,,,,,
    D,40,113001,3202.82,Z1,,,1000,,,,,,,
    D,50,482000,2600000.00,Z1,,,1000,1111,,,,,,
    D,40,001011,2600000.00,Z1,,,1000,,,,,,,
    T,0000000002
    <b></b>
    the report is below
    REPORT ZFGLDR0030 line-count 60
                      line-size 160
                      message-id 00.
    ====================================================================
    ****************************TABLES**********************************
    ====================================================================
    tables: bkpf.
    ====================================================================
    **************************RECORD LAYOUTS****************************
    ====================================================================
    Data: begin of bdc_tab occurs 200.
            include structure bdcdata.
    data: end   of bdc_tab.
    Data: Begin of tmp_tab occurs 200,
           fld1(255)   type   c,
          end of tmp_tab.
    DATA: BEGIN OF upload_tab OCCURS 200,
            fld1(1)    type   c,
            fld2(10)   type   c,
            fld3(10)   type   c,
            fld4(16)   type   c,
            fld5(10)   type   c,
            fld6(2)    type   c,
            fld7(4)    type   c,
            fld8(10)   type   c,
            fld9(10)   type   c,
            fld10(10)  type   c,
            fld11(10)  type   c,
            fld12(12)  type   c,
            fld13(25)  type   c,
            fld14(50)  type   c,
            fld15(4)   type   c,
            fld16(1)   type   c,
          END OF upload_tab.
    data : tmp_rec like upload_tab.
    DATA: BEGIN OF upload1_tab OCCURS 200,
            fld1(1)    type   c,
            fld2(10)   type   c,
            fld3(10)   type   c,
            fld4(16)   type   c,
            fld5(10)   type   c,
            fld6(2)    type   c,
            fld7(4)    type   c,
            fld8(10)   type   c,
            fld9(10)   type   c,
            fld10(10)  type   c,
            fld11(10)  type   c,
            fld12(12)  type   c,
            fld13(25)  type   c,
            fld14(50)  type   c,
            fld15(4)   type   c,
            fld16(1)   type   c,
          END OF upload1_tab.
    Data: upload2_tab like tmp_rec occurs 200 with header line.
    Data: Del_tab like tmp_rec occurs 200 with header line.
    DATA: V_SYTABIX TYPE I,
          v_kunnr     like knb1-kunnr,
          v_brsch     like kna1-brsch,
          v_datum     like sy-datum,
          v_tmp(1)    type c,
          v_flag      type i,
          v_ccode(10) type c,
          v_glcd(10)  type c,
          v_len       type n,
          v_rem(50)   type c,
          v_docno(12) type c,
          v_dtype(3)  type c,
          v_sno(8)    type n,
          v_upd_flag  type i,
          v_idx       like sy-tabix,
          v_budat     like bkpf-budat,
          v_fld5(10)  type c,
          v_date(10)  type c.
    ====================================================================
    *********************SELECTION-SCREEN******************************
    ====================================================================
    selection-screen: begin of block b1 with frame .
    parameters:p_fl_mct  like  rlgrap-filename
                         default 'C:\test' obligatory,
               p_sesid   like apqi-groupid default 'RAWATIB',
               p_user    like apqi-userid default sy-uname.
    selection-screen: end of block b1.
    selection-screen: begin of block b2 with frame .
    parameters:p_opt1    radiobutton group grp1 default 'X',
               p_opt2    radiobutton group grp1,
               p_budat   like bkpf-budat.
    selection-screen: end of block b2.
    ====================================================================
    Validate SELECTION-SCREEN **************************
    ====================================================================
    At Selection-screen.
      translate p_fl_mct to upper  case.
      if p_opt2 = 'X' and p_budat = '00000000'.
        message e398(00) with 'Please enter date to use as Posting date'.
      endif.
    at selection-screen on value-request for p_fl_mct.
      data : v_mask(120)          type c.
      v_mask = ',IT2 files (.),.'.
      CALL FUNCTION 'WS_FILENAME_GET'
           EXPORTING
                DEF_FILENAME     = ' '
                DEF_PATH         = ' '
                MASK             = v_mask
                TITLE            = 'File Selection for Upload'
           IMPORTING
                FILENAME         = p_fl_mct
               RC               =
           EXCEPTIONS
                INV_WINSYS       = 1
                NO_BATCH         = 2
                SELECTION_CANCEL = 3
                SELECTION_ERROR  = 4
                OTHERS           = 5.
    end-of-selection.
    ====================================================================
    *****************************CONSTANTS******************************
    ====================================================================
    ====================================================================
    *****************************VARIABLES******************************
    ====================================================================
    ====================================================================
    TOP OF PAGE*******************************
    ====================================================================
    top-of-page.
    start-of-selection.
      v_upd_flag = 0.
      perform initialise_process.
      perform bdc_open.
      perform process_upload_tab.
      perform terminate_process.
    end-of-selection.
    ====================================================================
    Form : Initialise_Process                                          *
    ====================================================================
    FORM initialise_process.
       Initialises variables                                           *
      move : sy-repid to sy-tvar0,
             sy-uname to sy-tvar1,
             p_sesid  to sy-tvar2,
             sy-pagno to sy-tvar3.
      write: sy-datum to sy-tvar4,
             sy-uzeit to sy-tvar5.
    Selecting the GL codes to be updated**********************
      call function 'WS_UPLOAD'
        EXPORTING
          FILENAME         = p_fl_mct
          FILETYPE         = 'ASC'
        TABLES
          data_tab         = Tmp_tab
        EXCEPTIONS
          CONVERSION_ERROR = 1
          FILE_OPEN_ERROR  = 2
          OTHERS           = 10.
      if sy-subrc <> 0.
        message e398(00) with 'Unable to upload data'.
      endif.
    Validation for Upload file **********************
      read table tmp_tab index 1.
      split tmp_tab-fld1 at ',' into tmp_rec-fld1
                                     tmp_rec-fld2
                                     tmp_rec-fld3
                                     tmp_rec-fld4
                                     tmp_rec-fld5
                                     tmp_rec-fld6
                                     tmp_rec-fld7
                                     tmp_rec-fld8
                                     tmp_rec-fld9
                                     tmp_rec-fld10
                                     tmp_rec-fld11
                                     tmp_rec-fld12
                                     tmp_rec-fld13
                                     tmp_rec-fld14
                                     tmp_rec-fld15
                                     v_tmp.
      if tmp_rec-fld2 <> 'RAWATEB'.
        message e398(00) with 'Invliad file format, cannot upload'.
      endif.
      loop at tmp_tab.
        clear upload_tab.
        v_tmp = tmp_tab-fld1+0(1).
        if v_tmp = 'M' or v_tmp = 'D'.
          split tmp_tab-fld1 at ',' into upload_tab-fld1
                                         upload_tab-fld2
                                         upload_tab-fld3
                                         upload_tab-fld4
                                         upload_tab-fld5
                                         upload_tab-fld6
                                         upload_tab-fld7
                                         upload_tab-fld8
                                         upload_tab-fld9
                                         upload_tab-fld10
                                         upload_tab-fld11
                                         upload_tab-fld12
                                         upload_tab-fld13
                                         upload_tab-fld14
                                         upload_tab-fld15
                                         v_tmp.
          if upload_tab-fld1 = 'M'.
            clear tmp_rec.
            move upload_tab to tmp_rec.
          else.
            clear upload1_tab.
            move upload_tab to upload1_tab.
            upload1_tab-fld10  = tmp_rec-fld2.
            upload1_tab-fld12 = tmp_rec-fld12.
            upload1_tab-fld15 = tmp_rec-fld15.
            append upload1_tab.
          endif.
          append upload_tab.
        endif.
      endloop.
    Mark the already uploaded Transaction to skip ***********
      Loop at upload_tab.
        if upload_tab-fld1 = 'M'.
          v_idx = sy-tabix.
          move upload_tab-fld24(4) to v_budat0(4).
          move upload_tab-fld22(2) to v_budat4(2).
          move upload_tab-fld20(2) to v_budat6(2).
          Select single * from bkpf where BLART = upload_tab-fld3 and
                                          BUKRS = upload_tab-fld4 and
                                          XBLNR = upload_tab-fld12 and
                                          budat = v_budat.
          if sy-subrc = 0.
            do 1000 times.
              clear del_tab.
              move upload_tab to del_tab.
              append del_tab.
              upload_tab-fld16 = '*'.
              modify upload_tab index v_idx.
              v_idx = v_idx + 1.
              Read table upload_tab index v_idx.
              if upload_tab-fld1 = 'M' or sy-subrc <> 0.
                exit.
              endif.
            enddo.
          endif.
        endif.
      endloop.
    ENDFORM.                    "initialise_process
    ====================================================================
    Form : Process_Ord_itab                                            *
    ====================================================================
    FORM process_upload_tab .
      v_flag = 0.
      loop at upload_tab where fld16 <> '*' .
    Performing the Save at the end of Transaction *************
        if upload_tab-fld1 = 'M' and v_flag = 1.
          perform load_save.
          perform bdc_insert.
        endif.
    Putting the Header information of the document ************
        if upload_tab-fld1 = 'M'.
          perform load_header.
          v_date = v_fld5.
          v_rem  = upload_tab-fld14.
          v_flag = 0.
        endif.
    Putting the Detail information of the document ************
        if upload_tab-fld1 = 'D'.
          if upload_tab-fld2 = '40' or upload_tab-fld2 = '50'  .
            perform Load_next.
            v_tmp = v_glcd.
            v_len = strlen( upload_tab-fld3 ).
            If ( v_tmp = '2' or v_tmp = '4' or v_tmp = '0' )  .
              Perform load_ccenter.
            elseif v_flag = 1.
              perform upload_blank.
            endif.
            perform load_Detail.
            v_flag = 1.
            v_glcd = upload_tab-fld3.
            v_ccode = upload_tab-fld9.
          else.
            perform Load_next.
            v_tmp = v_glcd.
            v_len = strlen( upload_tab-fld3 ).
            perform upload_blank.
            perform load_Detail_301.
            v_flag = 0.
            v_glcd = '1'.
          endif.
        endif.
      endloop.
      if v_flag = 1.
        perform load_save.
      endif.
      perform bdc_insert.
      v_upd_flag = 1.
    ENDFORM.                    "process_upload_tab
    ====================================================================
    Form : BDC_OPEN                                                   *
    ====================================================================
    FORM bdc_open.
      call function 'BDC_OPEN_GROUP'
        EXPORTING
          client = sy-mandt
          group  = p_sesid
          user   = p_user
          keep   = 'X'.
    ENDFORM.                    "bdc_open
    ====================================================================
    Form : Fill_BDC_Tab                                                *
    ====================================================================
    FORM fill_bdc_tab using dynbegin
                            name
                            value.
      if dynbegin = 'X'.
        clear bdc_tab.
        move:  name  to bdc_tab-program,
               value to bdc_tab-dynpro,
               'X'   to bdc_tab-dynbegin.
        append bdc_tab.
      else.
        clear bdc_tab.
        move:  name  to bdc_tab-fnam,
               value to bdc_tab-fval.
        append bdc_tab.
      endif.
    ENDFORM.                    "fill_bdc_tab
    ====================================================================
    Form : BDC_INSERT                                                 *
    ====================================================================
    FORM bdc_insert .
      call function 'BDC_INSERT'
        EXPORTING
          tcode     = 'F-02'
        TABLES
          dynprotab = bdc_tab.
      refresh bdc_tab.
      clear bdc_tab.
    ENDFORM.                    "bdc_insert
    ====================================================================
    Form : BDC_CLOSE                                                  *
    ====================================================================
    FORM bdc_close.
      call function 'BDC_CLOSE_GROUP'.
    ENDFORM.                    "bdc_close
    ====================================================================
    Form : Terminate_Process                                          *
    ====================================================================
    FORM terminate_process.
      perform bdc_close.
    ENDFORM.                    "terminate_process
    *&      Form  load_Header
    FORM load_Header.
      If upload_tab-fld1 = 'M'.
        v_fld5 = upload_tab-fld5.
        if p_opt2 = 'X'.
          move p_budat6(2) to v_fld50(2).
          move p_budat4(2) to v_fld52(2).
          move p_budat0(4) to v_fld54(4).
        endif.
        perform fill_bdc_tab using:
         'X' 'SAPMF05A'     '0100',
         ' ' 'BDC_CURSOR'   'RF05A-NEWKO',
         ' ' 'BKPF-BLDAT'    upload_tab-fld2,
         ' ' 'BKPF-BLART'    upload_tab-fld3,
         ' ' 'BKPF-BUKRS'    upload_tab-fld4,
         ' ' 'BKPF-BUDAT'    v_fld5,
         ' ' 'BKPF-WAERS'    upload_tab-fld7,
         ' ' 'BKPF-XBLNR'    upload_tab-fld12,
         ' ' 'BKPF-BKTXT'    upload_tab-fld13.
      Endif.
    ENDFORM.                    "load_Header
    *&      Form  load_Detail
    FORM load_Detail.
      perform fill_bdc_tab using:
       'X' 'SAPMF05A'     '0300',
       ' ' 'BDC_CURSOR'   'BSEG-WRBTR',
       ' ' 'BSEG-WRBTR'    upload_tab-fld4,
      ' ' 'BSEG-VALUT'    v_date,
       ' ' 'BSEG-SGTXT'    v_rem.
    ENDFORM.                    " LOAD_DATA
    *&      Form  load_Detail
    FORM load_Detail_301.
      perform fill_bdc_tab using:
       'X' 'SAPMF05A'     '0301',
       ' ' 'BDC_CURSOR'   'RF05A-NEWUM',
       ' ' 'BSEG-WRBTR'    upload_tab-fld4,
      ' ' 'BSEG-VALUT'    v_date,
       ' ' 'BSEG-SGTXT'    v_rem.
    ENDFORM.                    " LOAD_DATA
    *&      Form  load_Next
    FORM Load_next.
      perform fill_bdc_tab using:
       ' ' 'RF05A-NEWBS'    upload_tab-fld2,
       ' ' 'RF05A-NEWKO'    upload_tab-fld3,
       ' ' 'BDC_OKCODE'   '/00'.
    ENDFORM.                    "Load_next
    *&      Form  load_Save
    FORM Load_save.
      perform fill_bdc_tab using:
      'X' 'SAPMF05A'     '0300',
       ' ' 'BDC_OKCODE'   '=BU'.
      v_tmp = v_glcd.
      v_len = strlen( upload_tab-fld3 ).
      If ( v_tmp = '2' or v_tmp = '4' or v_tmp = '0' )  .
        Perform load_ccenter.
      elseif v_flag = 1.
        perform upload_blank.
      endif.
      perform fill_bdc_tab using:
       'X' 'SAPMF05A'     '0700',
       ' ' 'BDC_OKCODE'   '=BU'.
    ENDFORM.                    "Load_save
    *&      Form  load_CCenter
    FORM Load_Ccenter.
      perform fill_bdc_tab using:
       'X' 'SAPLKACB'     '0002',
       ' ' 'BDC_CURSOR'   'COBL-KOSTL',
      ' ' 'COBL-KOSTL'   '4200-0451',
       ' ' 'COBL-KOSTL'    v_ccode,
      ' ' 'COBL-KOSTL'   '4200-0295',
       ' ' 'BDC_OKCODE'   '/EENTE'.
    ENDFORM.                    "Load_Ccenter
    *&      Form  load_blank
    FORM UpLoad_blank.
      perform fill_bdc_tab using:
       'X' 'SAPLKACB'     '0002',
       ' ' 'BDC_OKCODE'   '/EENTE'.
    ENDFORM.                    "UpLoad_blank

    ur  code  looking  ok..
    just change  it..
    call function <b>'WS_UPLOAD'</b>--->to  <b>gui_upload</b>
    EXPORTING
    FILENAME = p_fl_mct
    FILETYPE = 'ASC'
    TABLES
    data_tab = Tmp_tab
    EXCEPTIONS
    CONVERSION_ERROR = 1
    FILE_OPEN_ERROR = 2
    OTHERS = 10.
    if sy-subrc <> 0.
    message e398(00) with 'Unable to upload data'.
    endif.

  • BDC for FB50L...URGENT

    Hi,
    I am doing the BDC for FB50L but the code doesn't seem to execute...it is giving errors...
    I am attaching the code...Please review it and help me....its really urgent...
    Your help will be really appreciated...
    REPORT  ZTEST_BDC_PARK_ACC_GL.
    DATA:
    t_document_line_item_main LIKE bapiacgl09 OCCURS 100,
    t_document_line_item_enhn LIKE bapiacextc OCCURS 100,
    t_document_line_item_amnt LIKE bapiaccr09 OCCURS 100,
    t_return LIKE bapiret2 OCCURS 100,
    wa_document_header LIKE  bapiache09,
    wa_document_line_item_main LIKE bapiacgl09,
    wa_document_line_item_enhn LIKE bapiacextc,
    wa_document_line_item_amnt LIKE bapiaccr09,
    wa_return LIKE bapiret2.
    DATA: it_bdcdata TYPE TABLE OF bdcdata,
          it_messages TYPE TABLE OF bdcmsgcoll,
          wa_messages TYPE bdcmsgcoll,
          options TYPE ctu_params.
    DATA:  idx TYPE i,
           ch3(5) TYPE c,
           fname(40) TYPE c.
    DATA: indate TYPE d,
          intdate TYPE D.
    CLEAR wa_document_header.
    wa_document_header-obj_type = space.                        "
    wa_document_header-obj_key = space.
    wa_document_header-obj_sys = space.
    wa_document_header-bus_act = 'RFBU'.
    wa_document_header-username = 'INFAUSRTEST'.
    wa_document_header-header_txt = 'BAPI__POST'.
    wa_document_header-comp_code = '1001'.
    wa_document_header-doc_date = '20070814'.
    wa_document_header-pstng_date = '20070814'.
    CLEAR wa_document_header-trans_date.
    CLEAR wa_document_header-fisc_year.
    CLEAR wa_document_header-fis_period.
    wa_document_header-doc_type = 'SY'.
    wa_document_header-ref_doc_no = 'REQUIRED'.
    wa_document_header-ac_doc_no = space.
    wa_document_header-obj_key_r = space.
    wa_document_header-reason_rev = space.
    wa_document_header-compo_acc = space.
    wa_document_header-ref_doc_no_long = space.
    wa_document_header-acc_principle = 'LGAP'.
    wa_document_header-neg_postng = space.
    wa_document_header-obj_key_inv = space.
    wa_document_header-bill_category = space.
    Fill Line Item #1
    CLEAR: wa_document_line_item_main, wa_document_line_item_enhn, wa_document_line_item_amnt.
    Fill Main Portion Of Accounting Line Item
    wa_document_line_item_main-itemno_acc = '1'.         "Accounting Document Line Item Number
    wa_document_line_item_main-gl_account = '2412001067'."HKONT - Account
    wa_document_line_item_main-item_text = 'Test BAPI'.  "SGTXT - Item Text
    wa_document_line_item_main-doc_type = space.         "BLART - Document Type
    wa_document_line_item_main-comp_code = space.        "BUKRS - Company Code
    wa_document_line_item_main-pstng_date = '20070814'.  "BUDAT - Posting Date
    wa_document_line_item_main-alloc_nmbr = space.       "ZUONR - Allocation Number
    wa_document_line_item_main-costcenter = space.       "KOSTL - Cost Center
    wa_document_line_item_main-profit_ctr = space.       "PRCTR - Profit Center
    wa_document_line_item_main-de_cre_ind = 'D'.        "NEWBS - Posting Key / Debit Credit Indicator
    wa_document_line_item_main-trade_id = space.         "RASSC - Company ID Of Trading Partner
    Fill Amount Portion Of Accounting Line Item
    wa_document_line_item_amnt-itemno_acc = '1'.          "Accounting Document Line Item Number
    wa_document_line_item_amnt-curr_type = '00'.          "Currency Type
    wa_document_line_item_amnt-currency = 'USD'.          "WAERS - Currency Key
    wa_document_line_item_amnt-amt_doccur = '239959'.      "WRBTR - Amount In Document Currency Type
    APPEND: wa_document_line_item_main TO t_document_line_item_main,
            wa_document_line_item_amnt TO t_document_line_item_amnt.
    Fill Next Line Item #2
    CLEAR: wa_document_line_item_main, wa_document_line_item_enhn, wa_document_line_item_amnt.
    Fill Main Portion Of Accounting Line Item
    wa_document_line_item_main-itemno_acc = '2'.         "Accounting Document Line Item Number
    wa_document_line_item_main-gl_account = '2412001067'."HKONT - Account
    wa_document_line_item_main-item_text = 'Test BAPI'.  "SGTXT - Item Text
    wa_document_line_item_main-doc_type = space.         "BLART - Document Type
    wa_document_line_item_main-comp_code = space.        "BUKRS - Company Code
    wa_document_line_item_main-pstng_date = '20070814'.  "BUDAT - Posting Date
    wa_document_line_item_main-alloc_nmbr = space.       "ZUONR - Allocation Number
    wa_document_line_item_main-costcenter = space.       "KOSTL - Cost Center
    wa_document_line_item_main-profit_ctr = space.       "PRCTR - Profit Center
    wa_document_line_item_main-de_cre_ind = 'C'.        "NEWBS - Posting Key / Debit Credit Indicator
    wa_document_line_item_main-trade_id = space.         "RASSC - Company ID Of Trading Partner
    Fill Enhancement Portion Of Accounting Line Item
    Fill Amount Portion Of Accounting Line Item
    wa_document_line_item_amnt-itemno_acc = '2'.          "Accounting Document Line Item Number
    wa_document_line_item_amnt-curr_type = '00'.          "Currency Type
    wa_document_line_item_amnt-currency = 'USD'.          "WAERS - Currency Key
    wa_document_line_item_amnt-amt_doccur = '-239959'.     "WRBTR - Amount In Document Currency Type
    APPEND: wa_document_line_item_main TO t_document_line_item_main,
            wa_document_line_item_amnt TO t_document_line_item_amnt.
    *************************BDC PROGRAM**************************************************************
    PERFORM bdc_dynpro TABLES it_bdcdata USING 'SAPMF05A' wa_document_header-comp_code .
    PERFORM bdc_field TABLES it_bdcdata USING 'BDC_OKCODE'
    '=BP'.
      MOVE  wa_document_header-doc_date TO indate.
      CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
      EXPORTING
      date_external = indate
      IMPORTING
      date_internal = intdate.
      PERFORM bdc_field TABLES it_bdcdata USING 'ACGL_HEAD-BLDAT'
      INTDATE.
      perform bdc_field TABLES it_bdcdata USING 'ACGL_HEAD-WAERS'
      wa_document_line_item_amnt-currency.
      MOVE  wa_document_header-pstng_date TO indate.
      CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
      EXPORTING
      date_external = indate
      IMPORTING
      date_internal = intdate.
      PERFORM bdc_field TABLES it_bdcdata USING 'ACGL_HEAD-BUDAT'
      INTDATE.
      perform bdc_field TABLES it_bdcdata USING 'ACGL_HEAD-XBLNR'
      wa_document_header-ref_doc_no.
      PERFORM bdc_field TABLES it_bdcdata USING 'ACGL_HEAD-BKTXT'
      wa_document_header-header_txt.
      LOOP AT t_document_line_item_main INTO wa_document_line_item_main.
        idx = idx + 1.
        ch3 = idx.
        CONCATENATE 'ACGL_ITEM-HKONT(' ch3 ')' INTO fname.
        CONDENSE fname.
        PERFORM bdc_field TABLES it_bdcdata USING fname
        wa_document_line_item_main-gl_account.
        CONCATENATE 'ACGL_ITEM-SHKZG(' ch3 ')' INTO fname.
        CONDENSE fname.
        PERFORM bdc_field TABLES it_bdcdata USING fname
        wa_document_line_item_main-de_cre_ind.
        CONCATENATE 'ACGL_ITEM-WRBTR(' ch3 ')' INTO fname.
        CONDENSE fname.
        PERFORM bdc_field TABLES it_bdcdata USING fname
        wa_document_line_item_amnt-amt_doccur.
        CONCATENATE 'ACGL_ITEM-SGTXT(' ch3 ')' INTO fname.
        CONDENSE fname.
        PERFORM bdc_field TABLES it_bdcdata USING fname
        wa_document_line_item_main-item_text .
      ENDLOOP.
      options-dismode = 'A'.
      options-nobinpt = 'X'.
      CALL TRANSACTION 'FB50' USING it_bdcdata MESSAGES INTO
      it_messages OPTIONS FROM options.
    Start new screen
    FORM bdc_dynpro TABLES it_bdcdata STRUCTURE bdcdata USING program
    dynpro
      DATA: wa_bdcdata TYPE bdcdata.
      wa_bdcdata-program = program.
      wa_bdcdata-dynpro = dynpro.
      wa_bdcdata-dynbegin = 'X'.
      APPEND wa_bdcdata TO it_bdcdata.
    ENDFORM. "BDC_DYNPRO
    Insert field
    FORM bdc_field TABLES it_bdcdata STRUCTURE bdcdata USING fnam fval.
      DATA: wa_bdcdata TYPE bdcdata.
      IF fval <> space.
        CLEAR wa_bdcdata.
        wa_bdcdata-fnam = fnam.
        wa_bdcdata-fval = fval.
        APPEND wa_bdcdata TO it_bdcdata.
      ENDIF.
    ENDFORM.                    "BDC_FIELD
    Please suggest....
    Thanks

    data : amount(16).
    This below statement is not passing value wa_document_line_item_amnt-amt_doccur into it_bdcdata-fval. So try to move it to a character field and then use the perform statement.
    PERFORM bdc_field TABLES it_bdcdata USING fname
    wa_document_line_item_amnt-amt_doccur.
    change it to:
    WRITE wa_document_line_item_amnt-amt_doccur TO AMOUNT.
    PERFORM bdc_field TABLES it_bdcdata USING fname AMOUNT.
    -Kriss

  • How to reverse and reset documents cleared by FB1S

    Hi all,
    This is the scenario am into:
    Payment program cleared an open item doc say 19xxx for the vendor and created a clearing document 20xxx and check ABCD was send to vendor. Later found check was to be voided and the document reversed. Instead of doing FCH8, the user did an FB50 entry for the G/L account and executed the FB1S for manually clearing the G/L account with a document 30xxx. Now trying to void the check, gets an error saying "Document 20xxx is not purely a clearing document." The diagnosis explains that 'Payment doc 20xxx also has clearing document 30xxx in addition to its own clearing document number. As a result, the document cannot be reversed after resetting the cleared item.' The procedure explains again that to reset doc 20xxx, the cleared item 30xxx has to be reset prior.' I tried executing FB08 for the doc 30xxx, but errored out saying " specific document not reversible".
    I know its not an often situation. Has anyone comeacross something of this sort and voided the check?.
    Thanks alot in advance for all the help, suggestions and comments.. Points will be awarded for the helpful.

    Hi,
    using t.code FBRA reset&reverse the document no:30xxxxxxx.
    using fch8 youcancel check.
    regards
    Chandra

  • Hi Guru, BDC FOR F-02

    Hi Guru,
    Any one can send the BDC program for F-02.plssss its urgent
    PLZ I NEED IT VERY URGENT UR HELP MAKES MORE COMFORT TO  ME
    THANK Q U ALL
    10 POINTS ASSURED

    Try using the BAPI:
    BAPI_ACC_GL_POSTING_POST
    BAPI_ACC_DOCUMENT_POST
    User Exit/BADI available for the tcodes F-02, F-48, F-65, F-31 and F-53  
    Exits available:
    F050S001 FIDCMT, FIDCC1, FIDCC2: Edit user-defined IDoc segment
    F050S002 FIDCC1: Change IDoc/do not send
    F050S003 FIDCC2: Change IDoc/do not send
    F050S004 FIDCMT, FIDCC1, FIDCC2: Change outbound IDoc/do not sen
    F050S005 FIDCMT, FIDCC1, FIDCC2 Inbound IDoc: Change FI document
    F050S006 FI Outgoing IDoc: Reset Clearing in FI Document
    F050S007 FIDCCH Outbound: Influence on IDoc for Document Change
    F180A001 Balance Sheet Adjustment
    FARC0002 Additional Checks for Archiving MM Vendor Master Data
    FEDI0001 Function Exits for EDI in FI
    RFAVIS01 Customer Exit for Changing Payment Advice Segment Text
    RFEPOS00 Line item display: Checking of selection conditions
    RFKORIEX Automatic correspondence
    SAPLF051 Workflow for FI (pre-capture, release for payment)
    BADIs:
    AC_QUANTITY_GET
    AC_QUANTITY_GET
    BADI_ENJ_ALT_ADR
    BADI_ENJ_ALT_ADR
    BADI_F040_SCREEN_600
    BADI_FDCB_SUBBAS01
    BADI_FDCB_SUBBAS02
    BADI_FDCB_SUBBAS03
    BADI_FDCB_SUBBAS04
    BADI_FDCB_SUBBAS05
    BADI_MIRO_SPLT_ADD
    BADI_PRKNG_NO_UPDATE
    BADI_TAX1_XTXIT_SET
    F050S008
    FBAS_CIN_LTAX1F02
    FBAS_CIN_MF05AFA0
    FI_AUTHORITY_ITEM
    FI_DOC_DISP_LI
    FI_GET_INV_PYMT_AMT
    FI_HEADER_SUB_1300
    FI_PAYREF_BADI_010
    FI_TRANS_DATE_DERIVE
    INVOIC_FI_INBOUND
    RFESR000_BADI_001
    Reward points if useful.

  • BDC for Material master

    Hi ,
        I am developing the BI program for Material Master (MM01) and change MM02(Both create and change).
    Can you let me know how do i select particular views before creating/changing the material .
    Is there any specific function module available to do this ..
    If you help me with any sample coding ,that would be great.
    Thanks
    Raj

    & Description                : This program is used to create material
    *& master (tcode MM01) . Material data is available in tab delimited   *
    *& flat file.                                                          *
    *& The Following is the flat file Structure:                           *
                     MATNR(018)  "Material Number
                     MBRSH(001)  "Industry Sectory
                     MTART(004)  "Material Type
                     WERKS(004)  "Plant
                     LGORT(004)  "Storage Location
                     MAKTX(040)  "Material Text
                     MEINS(003)  "Basic Unit of Measurement
                     MATKL(009)  "Material Group
                     PRDHA(018), "Product Hierarchy
                     MTPOS_MARA(004), "General Item Categoy Group
                     ZEINR(022)  "Document
                     ZEIVR(002)  "Doc Version
                     SPART(002)  "Division
                     DWERK(004)  "Delivery Plant
                     TAXKM(001)  "Tax
                     KTGRM(002)  "Account Assignemnt Group
                     MTPOS_MARA(004), "General. Item Category Group
                     MTPOS(004), "Item Category Group
                     MTVFP(002)  "Availability check
    */ Begin of changes by Anoop for Sales Text Date: 17 feb 2004
                     s_ltex1(40), "Sales Text line 1
                     s_ltex2(40), "Sales Text line 2
                     s_ltex3(40), "Sales Text line 3
                     s_ltex4(40), "Sales Text line 4
                     s_ltex5(40), "Sales Text line 5
                     s_ltex6(40), "Sales Text line 6
    **/ End of changes by Anoop for Sales Text Date: 17 feb 2004
    **/ Begin of changes by Anoop for Purchase Order Text Date: 17 feb 2004
                     po_ltex1(40), "Purchase Order Text line 1
                     po_ltex2(40), "Purchase Order Text line 2
                     po_ltex3(40), "Purchase Order Text line 3
                     po_ltex4(40), "Purchase Order Text line 4
                     po_ltex5(40), "Purchase Order Text line 5
                     po_ltex6(40), "Purchase Order Text line 6
                     MAKTX(040)  "Sales text
                     EKGRP(003)  "Purchasing Group
                     DISMM(002)  "MRP Type
                     DISPO(003)  "MRP Controller
                     DISLS(002)  "Lot Size
                     EKGRP(003)  "Purchasing group
                     BSTFE(017)  "Fixed Lot Size
                     BESKZ(001)  "Procurement Type
                     LGPRO(004)  "Prod. Storage Location
                     DZEIT(003)  "In house production
                     PLIFZ(003)  "Planned Delivery Time
                     FHORI(003)  "Sch. Margin Key
                     STRGR(002)  "Planning Strategy Group
                     MTVFP(002)  "Availabilty Check
                     SBDKZ(001)  "Ind/Collective
                     SERNP(004)  "Serial Number Profile
                     LGPBE(010)  "Storage Bin
                     GROES(032)  "Size and Dimension
                     WEBAZ(003)  "GR Processing Time
                     BKLAS(004)  "Valuation Class
                     VPRSV(001)  "Price Control
                     VERPR(015)  "Moving Average Price
                     STPRS(015)  "Standard Price
                     MYPOL(004)  "LIFO Pool
                     EKALR(001)  "With Qty structure
                     HKMAT(001)  "Material Origin
                     ZPLP1(014)  "Planned Price 1
                     ZPLD1(010)  "Planned Price Date 1
    *Include
    INCLUDE bdcrecx1.
    *Variables
    DATA : v_filename TYPE string,
           v_flag(1) TYPE c,
           v_counter(2) TYPE c,
           v_lines TYPE i,
           v_count TYPE i VALUE 0.
    *Selection-screen
    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
    PARAMETER : filename LIKE rlgrap-filename OBLIGATORY.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN BEGIN OF BLOCK blk2 WITH FRAME TITLE text-002.
    PARAMETER : v_basic1    TYPE checkbox,
                v_basic2    TYPE checkbox,
                v_sales1    TYPE checkbox,
                v_sales2    TYPE checkbox,
                v_salesg    TYPE checkbox,
                v_salest    TYPE checkbox,
                v_purcha    TYPE checkbox,
    Begin of changes by Anoop Date: 18 feb 2004.
                v_potext    TYPE checkbox,
    *End of changes by Anoop Date: 18 feb 2004
                v_mrp1      TYPE checkbox,
                v_mrp2      TYPE checkbox,
                v_mrp3      TYPE checkbox,
                v_mrp4      TYPE checkbox,
                v_wrksch    TYPE checkbox,
                v_gplnt1    TYPE checkbox,
                v_gplnt2    TYPE checkbox,
                v_qality    TYPE checkbox,
                v_acct1     TYPE checkbox,
                v_acct2     TYPE checkbox,
                v_testi     TYPE checkbox,
                v_cost2     TYPE checkbox.
    SELECTION-SCREEN END OF BLOCK blk2.
    SELECTION-SCREEN END OF BLOCK blk1.
    */ Comments given are the view names that have been incorporated into
    the BDC for the transaction MM01.
    **Internal Tables
    DATA: BEGIN OF record,
    */ Basic Data 1..
    data element: MATNR
            matnr_001(018),  "Material Number
    data element: MBRSH
            mbrsh_002(001),  "Industry Sectory
    data element: MTART
            mtart_003(004),  "Material Type
    data element: WERKS_D
            werks_019(004),  "Plant
    data element: LGORT_D
            lgort_020(004),  "Storage Location
    *DATA ELEMENT : vkorg
            vkorg(004),      "Sales Organisation
    *DATA ELEMENT : VTWEG
            vtweg(002),      "Distribution channel
    data element: MAKTX
            maktx_021(040),  "Material Text
    data element: MEINS
            meins_022(003),  "Basic Unit of Measurement
    data element: MATKL
            matkl_023(009),  "Material Group
    data element: PRODH_D
            prdha_015(018),
    data element: MTPOS_MARA
            mtpos_mara_016(004),
    data element: MTPOS_MARA
           MTPOS_MARA_024(004),
    */ Basic Data 2...
    data element: DZEINR
            zeinr_026(022),  "Document
    data element: DZEIVR
            zeivr_027(002),  "Doc Version
    data element: MEINS
           MEINS_029(003),
    */ Sales : Sales Org. Data 1
    data element: SPART
            spart_020(002),
    data element: DWERK_EXT
            dwerk_021(004),
    data element: TAXKM
            taxkm_01_024(001),
    */ Sales  : Sales Org. Data 2
    data element: KTGRM
            ktgrm_033(002),
    data element: MTPOS_MARA
            mtpos_mara_034(004),
    data element: MTPOS
            mtpos_035(004),
    */ Sales : General Plant/Data
    data element: MTVFP
            mtvfp_040(002),
    data element: PRCTR
            prctr_041(007),
    */ Sales Text
    */commented by Anoop
    data element: MAKTX
           maktx_041(040),
    */commented up to here by Anoop
    */ Begin of changes by Anoop for Sales Text Date: 17 feb 2004
            s_ltex1(40),
            s_ltex2(40),
            s_ltex3(40),
            s_ltex4(40),
            s_ltex5(40),
            s_ltex6(40),
    */ End of changes by Anoop for Sales Text Date: 17 feb 2004
    */ Purchasing..
    data element: EKGRP
            ekgrp_030(003),
    data element: MEINS
           MEINS_033(003),
    data element: EKGRP
           EKGRP_034(003),
    */ Begin of changes by Anoop for Purchase Order Text Date: 17 feb 2004
    */ Purchase Order Text
            po_ltex1(40),
            po_ltex2(40),
            po_ltex3(40),
            po_ltex4(40),
            po_ltex5(40),
            po_ltex6(40),
    */ MRP1..
    data element: DISMM
            dismm_035(002), "MRP Type
    data element: DISPO
            dispo_036(003), "MRP Controller
    data element: DISLS
            disls_037(002), "Lot Size
    data element : EKGRP
            ekgrp(003),
    data element: MEINS
           MEINS_039(003),
    data element: EKGRP
           EKGRP_040(003),
    data element: DISMM
           DISMM_041(002),
    data element: DISPO
           DISPO_042(003),
    data element: DISLS
           DISLS_043(002), "Proc. Type
    data element: BSTFE
            bstfe_044(017),
    */ MRP2..
    data element: BESKZ
            beskz_046(001),
    data element: LGPRO
            lgpro_047(004),
    data element: DZEIT
            dzeit_048(003),
    data element: PLIFZ
            plifz_049(003),
    data element: FHORI
            fhori_050(003),
    data element: PERKZ
           PERKZ_052(001),
    */ MRP3..
    data element: STRGR
            strgr_053(002),
    data element: MTVFP
            mtvfp_054(002),
    */ MRP4
    data element: SBDKZ
            sbdkz_056(001),
    data element: MEINS
           MEINS_058(003),
    data element: LGPRO
           LGPRO_059(004),
    */ Work Scheduling
    data element: SERAIL
            sernp_060(004),
    data element: DZEIT
           DZEIT_061(003),
    data element: MEINS
           MEINS_063(003),
    */ Plant Data/Str1
    data element: LGPBE
            lgpbe_064(010),
    data element: DATTP
           IPRKZ_065(001),
    */ Plant Data/Str2
    data element: GROES
            groes_067(032),
    data element: SERAIL
           SERNP_068(004),
    data element: MEINS
           MEINS_070(003),
    */ Quality Management
    data element: WEBAZ
            webaz_071(003),
    data element: MEINS
           MEINS_073(003),
    */ Accounting 1
    data element: BKLAS
            bklas_074(004),
    data element: VPRSV
            vprsv_075(001),
    data element: PEINH
           PEINH_076(006),
    data element: VERPR
            verpr_077(015),
    data element: STPRS
            stprs_078(015),
    */ Accounting 2
    data element: MYPOOL
            mypol_080(004),
    data element: MEINS
           MEINS_082(003),
    */ Cost Estimate 1.
    data element: CK_EKALREL
            ekalr_083(001),
    data element: HKMAT
            hkmat_084(001),
    data element: CK_LOSGR
           LOSGR_085(017),
    */ Costing 2..
    data element: DZPLP1
           zplp1_087(014),
    data element: DZPLD1
            zpld1_088(010),
    data element: BKLAS
           BKLAS_089(004),
    data element: VPRSV
           VPRSV_090(001),
    data element: PEINH
           PEINH_091(006),
    data element: VERPR
           VERPR_092(015),
    data element: STPRS
           STPRS_093(015),
          END OF record.
    */ Begin of changes by Anoop Date: 17 feb 2004
    */ intermediate internal table for Sales Text and Purchase Order Text
    *DATA: BEGIN OF s_tab OCCURS 0,
         matnr LIKE mara-matnr,
         s_ltex1 LIKE makt-maktx,
         s_ltex2 LIKE makt-maktx,
         s_ltex3 LIKE makt-maktx,
         s_ltex4 LIKE makt-maktx,
         s_ltex5 LIKE makt-maktx,
         s_ltex6 LIKE makt-maktx,
         END OF s_tab.
    *DATA: BEGIN OF po_tab OCCURS 0,
         matnr LIKE mara-matnr,
         po_ltex1 LIKE makt-maktx,
         po_ltex2 LIKE makt-maktx,
         po_ltex3 LIKE makt-maktx,
         po_ltex4 LIKE makt-maktx,
         po_ltex5 LIKE makt-maktx,
         po_ltex6 LIKE makt-maktx,
         END OF po_tab.
    */ End of changes by Anoop Date: 17 feb 2004
    DATA : itab LIKE record OCCURS 0 WITH HEADER LINE.
    DATA : ok_code(5) TYPE c.
    *AT SELECTION-SCREEN
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR filename.
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
        EXPORTING
          field_name = filename
        CHANGING
          file_name  = filename.
    *START-OF-SELECTION
    START-OF-SELECTION.
      v_filename = filename.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename                      = v_filename
          filetype                      = 'ASC'
          has_field_separator           = 'X'
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
      CODEPAGE                      = ' '
      IGNORE_CERR                   = ABAP_TRUE
      REPLACEMENT                   = '#'
    IMPORTING
      FILELENGTH                    =
      HEADER                        =
        TABLES
          data_tab                      = itab.
    */ Begin of changes by Anoop Date: 17 feb 2004
       LOOP AT itab.
       move itab-s_ltext+0(40) to itab-s_ltex1.
       move itab-s_ltext+40(40) to itab-s_ltex2.
       move itab-s_ltext+80(40) to itab-s_ltex3.
       move itab-s_ltext+120(40) to itab-s_ltex4.
       move itab-s_ltext+160(40) to itab-s_ltex5.
       move itab-s_ltext+200(40) to itab-s_ltex6.
       move itab-po_ltext+0(40) to itab-po_ltex1.
       move itab-po_ltext+40(40) to itab-po_ltex2.
       move itab-po_ltext+80(40) to itab-po_ltex3.
       move itab-po_ltext+120(40) to itab-po_ltex4.
       move itab-po_ltext+160(40) to itab-po_ltex5.
       move itab-po_ltext+200(40) to itab-po_ltex6.
       modify itab.
       ENDLOOP.
    */ End of changes by Anoop Date: 17 feb 2004
      DELETE itab WHERE  matnr_001 = ' '.
      DESCRIBE TABLE itab LINES v_lines.
      PERFORM open_group.
      LOOP AT itab.
        v_count = v_count + 1.
        PERFORM bdc_dynpro      USING 'SAPLMGMM' '0060'.
        IF v_count = v_lines.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                       '=BACK'.
        ENDIF.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RMMG1-MATNR'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'RMMG1-MATNR'
                                      itab-matnr_001.
        PERFORM bdc_field       USING 'RMMG1-MBRSH'
                                      itab-mbrsh_002.
        PERFORM bdc_field       USING 'RMMG1-MTART'
                                      itab-mtart_003.
        PERFORM bdc_dynpro      USING 'SAPLMGMM' '0070'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'MSICHTAUSW-DYTXT(17)'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=P+'.
        TRANSLATE itab-mtart_003 TO UPPER CASE.
    */ IF the data to be uploaded is of Material type 'Trading Goods'
    the following view selection
        IF itab-mtart_003 = 'HAWA'.
          PERFORM view_sel3.
        ENDIF.
    */ IF the data to be uploaded is of Material type 'Finished Goods'
    the following view selection
        IF itab-mtart_003 = 'FERT'.
          PERFORM view_sel1.
        ENDIF.
    */ IF the data to be uploaded is of Material type 'Semi-Finished Goods'
    the following view selection
        IF itab-mtart_003 = 'HALB'.
          PERFORM view_sel2.
        ENDIF.
        PERFORM bdc_dynpro      USING 'SAPLMGMM' '0080'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'T001L-LGOBE'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=ENTR'.
        PERFORM bdc_field       USING 'RMMG1-WERKS'
                                      itab-werks_019.
        PERFORM bdc_field       USING 'RMMG1-LGORT'
                                      itab-lgort_020.
        PERFORM bdc_field       USING 'RMMG1-VKORG'
                                      itab-vkorg.
        PERFORM bdc_field       USING 'RMMG1-VTWEG'
                                      itab-vtweg.
        PERFORM bdc_dynpro      USING 'SAPLMGMM' '4004'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        IF  v_basic1 = 'X'.
    */ Basic Data 1
          PERFORM bdc_field       USING 'MAKT-MAKTX'
                                        itab-maktx_021.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'MARA-MATKL'.
          PERFORM bdc_field       USING 'MARA-MEINS'
                                        itab-meins_022.
          PERFORM bdc_field       USING 'MARA-MATKL'
                                        itab-matkl_023.
          PERFORM bdc_field       USING 'MARA-PRDHA'
                                        itab-prdha_015.
          PERFORM bdc_field       USING 'MARA-MTPOS_MARA'
                                        itab-mtpos_mara_016.
       perform bdc_field       using 'MARA-MTPOS_MARA'
                                     itab-MTPOS_MARA_024.
        ENDIF.
        IF v_basic2 = 'X'.
    */ Basic Data 2
          PERFORM bdc_dynpro      USING 'SAPLMGMM' '4004'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '/00'.
          PERFORM bdc_field       USING 'MAKT-MAKTX'
                                        itab-maktx_021.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'MARA-ZEIVR'.
          PERFORM bdc_field       USING 'MARA-ZEINR'
                                        itab-zeinr_026.
          PERFORM bdc_field       USING 'MARA-ZEIVR'
                                        itab-zeivr_027.
        ENDIF.
        IF itab-vkorg(004) <> ' '.
          IF v_sales1 = 'X'.
    */ Sales : Sales Org. Data 1
            PERFORM bdc_dynpro      USING 'SAPLMGMM' '4000'.
            PERFORM bdc_field       USING 'BDC_OKCODE'
                                          '/00'.
            PERFORM bdc_field       USING 'MAKT-MAKTX'
                                          itab-maktx_021.
            PERFORM bdc_field       USING 'MARA-MEINS'
                                          itab-meins_022.
            PERFORM bdc_field       USING 'MARA-SPART'
                                          itab-spart_020.
            PERFORM bdc_field       USING 'MVKE-DWERK'
                                          itab-dwerk_021.
            PERFORM bdc_field       USING 'MARA-MATKL'
                                          itab-matkl_023.
    ****perform bdc_field       using 'MVKE-SKTOF'
                                 record-SKTOF_023.
            IF itab-taxkm_01_024 <> ' '.
              PERFORM bdc_field       USING 'BDC_CURSOR'
                                            'MG03STEUER-TAXKM(01)'.
              PERFORM bdc_field       USING 'MG03STEUER-TAXKM(01)'
                                            itab-taxkm_01_024.
    */ After entering tax another screen in which no data has to be *
    populated
              PERFORM bdc_dynpro      USING 'SAPLMGMM' '4200'.
              PERFORM bdc_field       USING 'BDC_OKCODE'
                                            '/00'.
              PERFORM bdc_field       USING 'BDC_CURSOR'
                                            'MAKT-MAKTX'.
       PERFORM bdc_field       USING 'MAKT-MAKTX'
                                     record-maktx_021.
            ENDIF.
            PERFORM bdc_dynpro      USING 'SAPLMGMM' '4000'.
            PERFORM bdc_field       USING 'BDC_OKCODE'
                                          '/00'.
            PERFORM bdc_field       USING 'MAKT-MAKTX'
                                          itab-maktx_021.
            PERFORM bdc_field       USING 'MARA-MEINS'
                                          itab-meins_022.
            PERFORM bdc_field       USING 'MARA-SPART'
                                          itab-spart_020.
            PERFORM bdc_field       USING 'MVKE-DWERK'
                                          itab-dwerk_021.
            PERFORM bdc_field       USING 'MARA-MATKL'
                                          itab-matkl_023.
          ENDIF.
          IF v_sales2 = 'X'.
    */ Sales : Sales Org. Data 2
            PERFORM bdc_dynpro      USING 'SAPLMGMM' '4000'.
            PERFORM bdc_field       USING 'BDC_OKCODE'
                                          '/00'.
            PERFORM bdc_field       USING 'MAKT-MAKTX'
    */commented by Anoop
    */                                 itab-maktx_041.
    */commented up to here by Anoop
    */ Begin of changes by Anoop Date: 17 feb 2004
                                          itab-maktx_021.
    */ End of changes by Anoop Date: 17 feb 2004
            PERFORM bdc_field       USING 'BDC_CURSOR'
                                          'MVKE-MTPOS'.
            PERFORM bdc_field       USING 'MVKE-KTGRM'
                                          itab-ktgrm_033.
            IF itab-mtpos_mara_034 <> ' '.
              PERFORM bdc_field       USING 'MARA-MTPOS_MARA'
                                            itab-mtpos_mara_034.
            ENDIF.
            IF itab-mtpos_035 <> ' '.
              PERFORM bdc_field       USING 'MVKE-MTPOS'
                                            itab-mtpos_035.
            ENDIF.
          ENDIF.
          IF v_salesg = 'X'.
    */ Sales : General/Plant Data
            PERFORM bdc_dynpro      USING 'SAPLMGMM' '4000'.
            PERFORM bdc_field       USING 'BDC_OKCODE'
                                          '/00'.
            PERFORM bdc_field       USING 'MAKT-MAKTX'
                                          itab-maktx_021.
            PERFORM bdc_field       USING 'BDC_CURSOR'
                                          'MARC-MTVFP'.
           PERFORM bdc_field       USING 'MARA-MEINS'
                                         itab-meins_022.
    ***perform bdc_field       using 'MARA-GEWEI'
                                 record-GEWEI_039.
            PERFORM bdc_field       USING 'MARC-MTVFP'
                                          itab-mtvfp_040.
            IF itab-prctr_041 <> ' '.
              PERFORM bdc_field       USING 'BDC_CURSOR'
                                            'MARC-PRCTR'.
              PERFORM bdc_field       USING 'MARC-PRCTR'
                                            itab-prctr_041.
            ENDIF.
          ENDIF.
          IF v_salest = 'X'.
    */ Sales Text
            PERFORM bdc_dynpro      USING 'SAPLMGMM' '4040'.
            IF itab-mtart_003 = 'HAWA' OR itab-mtart_003 = 'HALB'.
              PERFORM bdc_field       USING 'BDC_OKCODE'
                                            '=SP09'.
              ok_code = '=SP09'.
            ELSEIF itab-mtart_003 = 'FERT'.
              PERFORM bdc_field       USING 'BDC_OKCODE'
                                           '=SP12'.
              ok_code = '=SP12'.
            ENDIF.
    */commented by Anoop
          PERFORM bdc_field       USING 'MAKT-MAKTX'
    */                                 itab-maktx_041.
    */commented up to here by Anoop
    */ Begin of changes by Anoop for Sales Text Date: 17 feb 2004
            PERFORM bdc_field      USING 'BDC_OKCODE'  '=LTEX'.
            PERFORM bdc_dynpro     USING 'SAPLSTXX'   '1100'.
            PERFORM bdc_field      USING 'BDC_CURSOR' 'RSTXT-TXLINE(02)' .
            PERFORM bdc_field      USING 'BDC_OKCODE' '=TXBA' .
            PERFORM bdc_field      USING 'RSTXT-TXLINE(02)' itab-s_ltex1.
            perform bdc_field      using 'RSTXT-TXLINE(03)' itab-s_ltex2.
            perform bdc_field      using 'RSTXT-TXLINE(04)' itab-s_ltex3.
            perform bdc_field      using 'RSTXT-TXLINE(05)' itab-s_ltex4.
            perform bdc_field      using 'RSTXT-TXLINE(06)' itab-s_ltex5.
            perform bdc_field      using 'RSTXT-TXLINE(07)' itab-s_ltex6.
            PERFORM bdc_dynpro      USING 'SAPLSPO1'   '0100'.
            PERFORM bdc_field       USING 'BDC_OKCODE'     '=YES' .
    */ End of changes by Anoop for Sales Text Date: 17 feb 2004
            PERFORM bdc_dynpro      USING 'SAPLMGMM' '4040'.
            PERFORM bdc_field       USING 'BDC_OKCODE'  '/00'.
          ENDIF.
        ENDIF.
        IF v_purcha = 'X' AND ok_code = '=SP09'.
          CLEAR ok_code.
    */ Purchasing
          PERFORM bdc_dynpro      USING 'SAPLMGMM' '4000'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        'SP11'.
          PERFORM bdc_field       USING 'MAKT-MAKTX'
                                        itab-maktx_021.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'MARC-EKGRP'.
          PERFORM bdc_field       USING 'MARA-MEINS'
                                        itab-meins_022.
          PERFORM bdc_field       USING 'MARC-EKGRP'
                                        itab-ekgrp_030.
          PERFORM bdc_field       USING 'MARA-MATKL'
                                        itab-matkl_023.
       perform bdc_dynpro      using 'SAPLMGMM' '4000'.
       perform bdc_field       using 'BDC_OKCODE'
                                     'ENTR'.
       perform bdc_field       using 'MAKT-MAKTX'
                                     itab-maktx_021.
       perform bdc_field       using 'MARA-MEINS'
                                     itab-meins_022.
       perform bdc_field       using 'MARC-EKGRP'
                                     itab-ekgrp_030.
       perform bdc_field       using 'BDC_CURSOR'
                                     'MARC-DISMM'.
       perform bdc_field       using 'MARC-DISMM'
                                     itab-DISMM_035.
       perform bdc_field       using 'MARC-DISPO'
                                     itab-DISPO_036.
       perform bdc_field       using 'MARC-DISLS'
                                     itab-DISLS_037.
        ENDIF.
    */ Begin of changes by Anoop for Purchase Order Text Date: 18 feb 2004
       PERFORM bdc_dynpro      USING 'SAPLMGMM' '4040'.
       PERFORM bdc_field       USING 'BDC_OKCODE'  '/00'.
        IF v_potext = 'X' .
          CLEAR ok_code.
    *Purchase Order Text
          PERFORM bdc_dynpro      USING 'SAPLMGMM'   '4040'.
          PERFORM bdc_field       USING 'BDC_OKCODE'  '=LTEX'.
          PERFORM bdc_dynpro      USING 'SAPLSTXX'   '1100'.
          PERFORM bdc_field       USING 'BDC_CURSOR' 'RSTXT-TXLINE(02)' .
          PERFORM bdc_field       USING 'BDC_OKCODE' '=TXBA' .
            PERFORM bdc_field      USING 'RSTXT-TXLINE(02)' itab-po_ltex1.
            perform bdc_field      using 'RSTXT-TXLINE(03)' itab-po_ltex2.
            perform bdc_field      using 'RSTXT-TXLINE(04)' itab-po_ltex3.
            perform bdc_field      using 'RSTXT-TXLINE(05)' itab-po_ltex4.
            perform bdc_field      using 'RSTXT-TXLINE(06)' itab-po_ltex5.
            perform bdc_field      using 'RSTXT-TXLINE(07)' itab-po_ltex6.
         PERFORM bdc_field       USING 'RSTXT-TXLINE(02)' itab-po_ltex1 .
       PERFORM bdc_field       USING 'BDC_CURSOR' 'RSTXT-TXPARGRAPH(03)'.
         PERFORM bdc_field       USING 'RSTXT-TXPARGRAPH(03)' '*'.
         PERFORM bdc_field       USING 'RSTXT-TXLINE(03)' itab-po_ltex2 .
        PERFORM bdc_field       USING 'BDC_CURSOR' 'RSTXT-TXPARGRAPH(04)'.
         PERFORM bdc_field       USING 'RSTXT-TXPARGRAPH(04)' '*'.
         PERFORM bdc_field       USING 'RSTXT-TXLINE(04)' itab-po_ltex3 .
         PERFORM bdc_field      USING 'BDC_CURSOR' 'RSTXT-TXPARGRAPH(05)'.
         PERFORM bdc_field       USING 'RSTXT-TXPARGRAPH(05)' '*'.
         PERFORM bdc_field       USING 'RSTXT-TXLINE(05)' itab-po_ltex4 .
         PERFORM bdc_field      USING 'BDC_CURSOR' 'RSTXT-TXPARGRAPH(06)'.
         PERFORM bdc_field       USING 'RSTXT-TXPARGRAPH(06)' '*'.
         PERFORM bdc_field       USING 'RSTXT-TXLINE(06)' itab-po_ltex5 .
        PERFORM bdc_field       USING 'BDC_CURSOR' 'RSTXT-TXPARGRAPH(07)'.
         PERFORM bdc_field       USING 'RSTXT-TXPARGRAPH(07)' '*'.
         PERFORM bdc_field       USING 'RSTXT-TXLINE(07)' itab-po_ltex6 .
        PERFORM bdc_field       USING 'BDC_CURSOR' 'RSTXT-TXPARGRAPH(08)'.
         PERFORM bdc_field       USING 'RSTXT-TXPARGRAPH(08)' '*'.
          PERFORM bdc_dynpro      USING 'SAPLSPO1'   '0100'.
          PERFORM bdc_field       USING 'BDC_OKCODE'     '=YES' .
          PERFORM bdc_dynpro      USING 'SAPLMGMM'   '4040'.
          PERFORM bdc_field       USING 'BDC_OKCODE'   '/00'.
        endif.
    */ End of changes by Anoop for Purchase Order Text Date: 18 feb 2004
        IF v_mrp1 = 'X'.
    */ MRP 1
          PERFORM bdc_dynpro      USING 'SAPLMGMM' '4000'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        'ENTR'.
          PERFORM bdc_field       USING 'MAKT-MAKTX'
                                        itab-maktx_021.
          PERFORM bdc_field       USING 'MARA-MEINS'
                                        itab-meins_022.
          PERFORM bdc_field       USING 'MARC-EKGRP'
                                        itab-ekgrp_030.
          PERFORM bdc_field       USING 'MARC-DISMM'
                                        itab-dismm_035.
          PERFORM bdc_field       USING 'MARC-DISPO'
                                        itab-dispo_036.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'MARC-DISLS'.
          PERFORM bdc_field       USING 'MARC-DISLS'
                                        itab-disls_037.
          IF itab-ekgrp <> ' '.
            PERFORM bdc_field       USING 'MARC-EKGRP'
                                          itab-ekgrp.
          ENDIF.
          PERFORM bdc_field       USING 'MARC-BSTFE'
                                        itab-bstfe_044.
        ENDIF.
        IF v_mrp2 = 'X'.
    */ MRP 2
          PERFORM bdc_dynpro      USING 'SAPLMGMM' '4000'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '/00'.
          PERFORM bdc_field       USING 'MAKT-MAKTX'
                                        itab-maktx_021.
          PERFORM bdc_field       USING 'MARC-BESKZ'
                                        itab-beskz_046.
          PERFORM bdc_field       USING 'MARC-LGPRO'
                                        itab-lgpro_047.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'MARC-DZEIT'.
          PERFORM bdc_field       USING 'MARC-DZEIT'
                                        itab-dzeit_048.
          PERFORM bdc_field       USING 'MARC-PLIFZ'
                                        itab-plifz_049.
          PERFORM bdc_field       USING 'MARC-FHORI'
                                        itab-fhori_050.
        ENDIF.
        IF v_mrp3 = 'X'.
    */ MRP 3
          PERFORM bdc_dynpro      USING 'SAPLMGMM' '4000'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '/00'.
          PERFORM bdc_field       USING 'MAKT-MAKTX'
                                        itab-maktx_021.
       perform bdc_field       using 'MARC-PERKZ'
                                     itab-PERKZ_052.
          PERFORM bdc_field       USING 'MARC-STRGR'
                                        itab-strgr_053.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'MARC-MTVFP'.
          PERFORM bdc_field       USING 'MARC-MTVFP'
                                        itab-mtvfp_054.
        ENDIF.
        IF v_mrp4 = 'X'.
    */ MRP 4
          PERFORM bdc_dynpro      USING 'SAPLMGMM' '4000'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '/00'.
          PERFORM bdc_field       USING 'MAKT-MAKTX'
                                        itab-maktx_021.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'MARC-SBDKZ'.
          PERFORM bdc_field       USING 'MARC-SBDKZ'
                                        itab-sbdkz_056.
        ENDIF.
        IF v_wrksch = 'X'.
    */ WORK SCHEDULES
          PERFORM bdc_dynpro      USING 'SAPLMGMM' '4000'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '/00'.
          PERFORM bdc_field       USING 'MAKT-MAKTX'
                                        itab-maktx_021.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'MARC-SERNP'.
          PERFORM bdc_field       USING 'MARA-MEINS'
                                        itab-meins_022.
          PERFORM bdc_field       USING 'MARC-LGPRO'
                                        itab-lgpro_047.
          PERFORM bdc_field       USING 'MARC-SERNP'
                                        itab-sernp_060.
          PERFORM bdc_field       USING 'MARC-DZEIT'
                                        itab-dzeit_048.
        ENDIF.
        IF v_gplnt1 = 'X'.
    */ PLANT DATA/STR1
          PERFORM bdc_dynpro      USING 'SAPLMGMM' '4000'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '/00'.
          PERFORM bdc_field       USING 'MAKT-MAKTX'
                                        itab-maktx_021.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'MARD-LGPBE'.
          PERFORM bdc_field       USING 'MARA-MEINS'
                                        itab-meins_022.
          PERFORM bdc_field       USING 'MARD-LGPBE'
                                        itab-lgpbe_064.
       perform bdc_field       using 'MARA-IPRKZ'
                                     itab-IPRKZ_065.
        ENDIF.
        IF v_gplnt2 = 'X'.
    */ PLANT DATA/STR2
          PERFORM bdc_dynpro      USING 'SAPLMGMM' '4000'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '/00'.
          PERFORM bdc_field       USING 'MAKT-MAKTX'
                                        itab-maktx_021.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'MARA-GROES'.
          PERFORM bdc_field       USING 'MARA-GROES'
                                        itab-groes_067.
          PERFORM bdc_field       USING 'MARC-SERNP'
                                        itab-sernp_060.
        ENDIF.
        IF v_qality = 'X'.
    */ QUALITY MANAGEMENT
          PERFORM bdc_dynpro      USING 'SAPLMGMM' '4000'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '=PB01'.
          PERFORM bdc_field       USING 'MAKT-MAKTX'
                                        itab-maktx_021.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'MARC-WEBAZ'.
          PERFORM bdc_field       USING 'MARA-MEINS'
                                        itab-meins_022.
          PERFORM bdc_field       USING 'MARC-WEBAZ'
                                        itab-webaz_071.
    Addition done by Hymavathi on 24-01-2005
          PERFORM bdc_dynpro      USING 'SAPLQPLS' '0100'.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'RMQAM-ARGUMENT'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '=NEU'.
          PERFORM bdc_dynpro      USING 'SAPLQPLS' '0100'.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'RMQAM-AKTIV(01)'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '=WEIT'.
          PERFORM bdc_field       USING 'RMQAM-ART(01)'
                                         '01'.
          PERFORM bdc_field       USING 'RMQAM-AKTIV(01)'
                                        'X'.
          PERFORM bdc_dynpro      USING 'SAPLMGMM' '4000'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '/00'.
          PERFORM bdc_field       USING 'MAKT-MAKTX'
                                        itab-maktx_021.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'MARC-WEBAZ'.
          PERFORM bdc_field       USING 'MARA-MEINS'
                                        itab-meins_022.
          PERFORM bdc_field       USING 'MARC-WEBAZ'
                                        itab-webaz_071.
    End Of Addition Done By Hymavathi
        ENDIF.
        IF v_acct1 = 'X'.
    */ ACCOUNTING 1
          PERFORM bdc_dynpro      USING 'SAPLMGMM' '4000'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '/00'.
          PERFORM bdc_field       USING 'MAKT-MAKTX'
                                        itab-maktx_021.
          PERFORM bdc_field       USING 'MARA-MEINS'
                                        itab-meins_022.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'MBEW-STPRS'.
          PERFORM bdc_field       USING 'MBEW-BKLAS'
                                        itab-bklas_074.
          PERFORM bdc_field       USING 'MBEW-VPRSV'
                                 

  • Enhancement for t.code FBRA

    Hi,
    I tried using user-exit F050S006. i inserted a break-piont in the exit and executed transaction code FBRA but control doesnt go to this exit. please help me out in finding an enhancement while executing FBRA.
    Regards,
    Sonali.

    hi,
    check this
    Enhancement
    F050S003                                FIDCC2: Change IDoc/do not send
    F050S002                                FIDCC1: Change IDoc/do not send
    F050S001                                FIDCMT, FIDCC1, FIDCC2: Edit user-defined IDoc segment
    SAPLF051                                Workflow for FI (pre-capture, release for payment)
    RFKORIEX                                Automatic correspondence
    RFEPOS00                                Line item display: Checking of selection conditions
    RFAVIS01                                Customer Exit for Changing Payment Advice Segment Text
    F050S004                                FIDCMT, FIDCC1, FIDCC2: Change outbound IDoc/do not send
    F050S005                                FIDCMT, FIDCC1, FIDCC2 Inbound IDoc: Change FI document
    F050S006                                FI Outgoing IDoc: Reset Clearing in FI Document
    F050S007                                FIDCCH Outbound: Influence on IDoc for Document Change
    F180A001                                Balance Sheet Adjustment
    FARC0002                                Additional Checks for Archiving MM Vendor Master Data
    FEDI0001                                Function Exits for EDI in FI
    Business Add-in
    FI_FB08_SUBST_BUDAT                     FB08: Check Posting Date for Reversal of FI Doc. with FB08
    FI_GET_INV_PYMT_AMT                     BAdI for determining the payment amount for an invoice
    FI_HEADER_SUB_1300                      Screen Enhancement for Document Header SAPMF05A
    FI_PAYREF_BADI_010                      BAdI: Payment Reference Number
    FI_RES_ITEM_CURRENCY                    Document of Residual Item with Invoice Currency
    FI_TRANS_DATE_DERIVE                    Derive BKPF-WWERT from Other Document Header Data
    BADI_ENJ_ALT_ADR                        Go to alternative vendor/customer data
    BADI_F040_SCREEN_600                    Screen Enhancement on F040 0600 Document Header
    BADI_FDCB_SUBBAS01                      Screen Enhancement 1 on FDCB Basic Data Screen (010, 510)
    BADI_FDCB_SUBBAS02                      Screen Enhancement 2 on FDCB Basic Data Screen (010, 510)
    BADI_FDCB_SUBBAS03                      Screen Enhancement 3 on FDCB Basic Data Screen (010, 510)
    BADI_FDCB_SUBBAS04                      Screen Enhancement 4 on FDCB Basic Data Screen (010, 510)
    RFESR000_BADI_001                       BAdI for Own Processing of POR Item
    BADI_FDCB_SUBBAS05                      Screen Enhancement 5 on FDCB Basic Data Screen (010, 510)
    BADI_MIRO_SPLT_ADD                      Append additional fields of ACCVS to ACCIT
    BADI_PRKNG_NO_UPDATE                    BAdI for Deactivating Update of Parked Documents
    FVFZ                                    Replacement for Function Modules of Function Group FVFZ
    INVOIC_FI_INBOUND                       BADIs for Inbound IDoc INVOIC FI (Vendor Invoice)
    F050S008                                FIDCC1, FIDCC2 Inbound IDoc: Update Comparison Ledger
    AC_QUANTITY_GET                         Transfer of Quantities to Accounting - Customer Exit
    ADJUST_NET_DAYS                         Change to Net Due Date
    FBAS_CIN_LTAX1F02                       Tax interface
    FBAS_CIN_MF05AFA0                       EWT - Downpayment Clearing - Tax transfer for CIN
    FISPLIT                                 Online Split: Cash Discount, Exchange Rate Differences
    FI_AUTHORITY_ITEM                       Extended Authorization Check for Document Display (FB03)
    FI_DOC_DISP_LI                          Diversion to Document Items (FB03)
    Yogesh N

  • Problem in creation of BDC for transaction phap_create

    Hello Friends,
    I am trying to create BDC for PHAP_CREATE.
    When you run a transaction a pop up window appears to select the template id.
    And in BDC it is selected by cursor position. So once selected, the value of template id cannot be changed.
    I want this as a parameter.So that each time I run a BDC I will be able to create different types of Appraisal documents i.e with different template ids.
    How to go about it???
    Regards,
    Bhushan

    Hi,
    For selecting the id, while doing recording,
    record with
    CTRL + F ( Where u can give ur id) and proceed further.

Maybe you are looking for

  • LTE no longer showing up in my area

    The area in question is the Spotyslvania Courthouse area (zips 22407 & 22553). The last few days, LTE service has dropped and the phone fluctuates between 1X and 3G. I have friends with iPhones, a Samsung Note 2 and other Android devices having the s

  • How to publish PDF online as Flash player Flip Book

    Hello, Im not sure if this question belongs in this thread, but none the less, here it is: How can I publish a pdf of a magazine to a website where viewers can flip through the pages like a flipbook. I noticed several publications doing this, and it

  • APEX Export Report running query again

    Greetings all! Version - Oracle 11.2 Apex 4.1 We have an Apex report that is generated by calling a function. After the report is displayed in the region, when Export link is clicked to export to CSV, the query is run again. Shouldn't the report be e

  • 3D Cube Mesh Preset missing in Photoshop CS6 Extended?

    I only see the Cube Wrap, which puts the same texture on all faces. I want to have a different image on each face, and the Cube Preset in CS5 lets me do that. Am I missing something in CS6?

  • Has anyone got feedback of how their sites look on a PC?

    Hi, Having finally got my site up web.mac.com/nlevy1 I nervously had a look at it on a friends PC. Of course they didn't have QT to view, but even so it looked very strange - the frame around the QT movie had moved to the bottom left hand part of the