<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Batch input program for tcode FV50L in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-input-program-for-tcode-fv50l/m-p/10683168#M1869215</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could ne body suggest bapi or FM for it???&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Oct 2014 08:50:00 GMT</pubDate>
    <dc:creator>JeetOP</dc:creator>
    <dc:date>2014-10-20T08:50:00Z</dc:date>
    <item>
      <title>Batch input program for tcode FV50L</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-input-program-for-tcode-fv50l/m-p/10683167#M1869214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can Sap standard program RFBIBL00 &amp;amp; RSBDCSUB be used for batch input session creation &amp;amp; execution for tcode FV50l?.&lt;/P&gt;&lt;P&gt;If not, is there any SAP standard batch input program for FV50l,just lyk above programs are for FBV1. Or any FM / Bapi for FV50L?.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly suggest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Oct 2014 06:58:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-input-program-for-tcode-fv50l/m-p/10683167#M1869214</guid>
      <dc:creator>JeetOP</dc:creator>
      <dc:date>2014-10-17T06:58:47Z</dc:date>
    </item>
    <item>
      <title>Re: Batch input program for tcode FV50L</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-input-program-for-tcode-fv50l/m-p/10683168#M1869215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could ne body suggest bapi or FM for it???&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Oct 2014 08:50:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-input-program-for-tcode-fv50l/m-p/10683168#M1869215</guid>
      <dc:creator>JeetOP</dc:creator>
      <dc:date>2014-10-20T08:50:00Z</dc:date>
    </item>
    <item>
      <title>Re: Batch input program for tcode FV50L</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-input-program-for-tcode-fv50l/m-p/10683169#M1869216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Abhijeet,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope you can use BAPI_ACC_DOCUMENT_POST bapi for FV50 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find the example code .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;*Global DATA declarations&lt;BR /&gt;TYPES: BEGIN OF type_upload, "Work table used for upload&lt;BR /&gt;rec(500) TYPE c,&lt;BR /&gt; END OF type_upload.&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;*Global work area declarations&lt;BR /&gt;DATA: w_postingsTYPE ,&lt;BR /&gt;w_header TYPE bapiache09,&lt;BR /&gt;w_bukrs TYPE type_bukrs,&lt;BR /&gt;w_upload TYPE type_upload,&lt;BR /&gt;w_item_gl TYPE bapiacgl09,&lt;BR /&gt;w_dummy(1) TYPE c, "#EC NEEDED&lt;BR /&gt;w_item_curr TYPE bapiaccr09.&lt;BR /&gt;DATA:t_posting TYPE STANDARD TABLE OF ,&lt;BR /&gt;t_return TYPE STANDARD TABLE OF bapiret2,&lt;BR /&gt;t_bukrs TYPE STANDARD TABLE OF type_bukrs,&lt;BR /&gt;t_item_gl TYPE STANDARD TABLE OF bapiacgl09,&lt;BR /&gt;t_upload TYPE STANDARD TABLE OF type_upload,&lt;BR /&gt;t_filename TYPE STANDARD TABLE OF type_filename,&lt;BR /&gt;t_item_curr TYPE STANDARD TABLE OF bapiaccr09.&lt;BR /&gt;*&amp;amp;--------------------------------------------------------------------*&lt;BR /&gt;*&amp;amp;Form UPLOAD_FROM_EXCEL&lt;BR /&gt;*&amp;amp;--------------------------------------------------------------------*&lt;BR /&gt;FORM upload_from_excel.&lt;BR /&gt;&amp;nbsp; REFRESH t_upload.&lt;BR /&gt;*--upload data from excel to internal table&lt;BR /&gt;&amp;nbsp; DATA: lw_filename TYPE string.&lt;BR /&gt;lw_filename = p_file.&lt;BR /&gt;&amp;nbsp; CALL FUNCTION 'GUI_UPLOAD'&lt;BR /&gt;&amp;nbsp; EXPORTING&lt;BR /&gt;&amp;nbsp; filename = lw_filename&lt;BR /&gt;filetype = 'ASC'&lt;BR /&gt;&amp;nbsp; TABLES&lt;BR /&gt;data_tab = t_upload&lt;BR /&gt;&amp;nbsp; EXCEPTIONS&lt;BR /&gt;file_open_error = 1&lt;BR /&gt;file_read_error = 2&lt;BR /&gt;no_batch = 3&lt;BR /&gt;gui_refuse_filetransfer = 4&lt;BR /&gt;invalid_type = 5&lt;BR /&gt;no_authority = 6&lt;BR /&gt;unknown_error = 7&lt;BR /&gt;bad_data_format = 8&lt;BR /&gt;header_not_allowed = 9&lt;BR /&gt;separator_not_allowed = 10&lt;BR /&gt;header_too_long = 11&lt;BR /&gt;unknown_dp_error = 12&lt;BR /&gt;access_denied = 13&lt;BR /&gt;dp_out_of_memory = 14&lt;BR /&gt;disk_full = 15&lt;BR /&gt;dp_timeout = 16&lt;BR /&gt;&amp;nbsp; OTHERS = 17.&lt;BR /&gt;*- End of change @ECC&lt;BR /&gt;ENDFORM." UPLOAD_FROM_EXCEL&lt;BR /&gt;*&amp;amp;--------------------------------------------------------------------*&lt;BR /&gt;*&amp;amp;Form SPLIT_INTO_RECORDS&lt;BR /&gt;*&amp;amp;--------------------------------------------------------------------*&lt;BR /&gt;FORM split_into_records.&lt;BR /&gt;&amp;nbsp; DATA: lv_doc_date TYPE sy-datum,&lt;BR /&gt;lv_account TYPE char10,&lt;BR /&gt;lv_product TYPE char20,&lt;BR /&gt;lv_period TYPE char2,&lt;BR /&gt;lv_kursf TYPE char9,&lt;BR /&gt;lv_aufnr TYPE char12,&lt;BR /&gt;lv_plant TYPE char10,&lt;BR /&gt;lv_customer TYPE kunnr,&lt;BR /&gt;&amp;nbsp; lv_cust_hie2 TYPE hiezu02,&lt;BR /&gt;lv_pstng_date TYPE sy-datum,&lt;BR /&gt;lv_amount TYPE char30.&lt;BR /&gt;CLEAR:lv_doc_date,&lt;BR /&gt;lv_account,&lt;BR /&gt;lv_product,&lt;BR /&gt;lv_period,&lt;BR /&gt;lv_kursf,&lt;BR /&gt;lv_plant,&lt;BR /&gt;lv_customer,&lt;BR /&gt;&amp;nbsp; lv_cust_hie2,&lt;BR /&gt;lv_pstng_date,&lt;BR /&gt;lv_amount.&lt;BR /&gt;*Split header data&lt;BR /&gt;&amp;nbsp; LOOP AT t_upload INTO w_upload.&lt;BR /&gt;CASE sy-tabix.&lt;BR /&gt;* start of insert @007&lt;BR /&gt;&amp;nbsp; WHEN 2.&lt;BR /&gt;&amp;nbsp; SPLIT w_upload AT c_tab INTO&lt;BR /&gt;w_dummyw_dummyw_dummy&lt;BR /&gt;w_dummyw_dummyw_dummy&lt;BR /&gt;w_dummyw_dummyw_dummy&lt;BR /&gt;w_header-ac_doc_no&lt;BR /&gt;w_dummy.&lt;BR /&gt;* end of insert @007&lt;BR /&gt;&amp;nbsp; WHEN 4.&lt;BR /&gt;&amp;nbsp; SPLIT w_upload AT c_tab INTO&lt;BR /&gt;w_dummyw_dummy&lt;BR /&gt;w_dummyw_dummy&lt;BR /&gt;lv_doc_date&lt;BR /&gt;w_dummyw_dummy&lt;BR /&gt;w_header-header_txt&lt;BR /&gt;w_dummyw_dummy&lt;BR /&gt;w_header-comp_code&lt;BR /&gt;w_dummy.&lt;BR /&gt;WHEN 6.&lt;BR /&gt;&amp;nbsp; SPLIT w_upload AT c_tab INTO&lt;BR /&gt;w_dummyw_dummy&lt;BR /&gt;w_dummyw_dummy&lt;BR /&gt;lv_pstng_date&lt;BR /&gt;w_dummyw_dummy&lt;BR /&gt;w_header-ref_doc_no&lt;BR /&gt;w_dummyw_dummy&lt;BR /&gt;w_header-doc_type&lt;BR /&gt;w_dummy.&lt;BR /&gt;WHEN 8.&lt;BR /&gt;&amp;nbsp; SPLIT w_upload AT c_tab INTO&lt;BR /&gt;w_dummyw_dummy&lt;BR /&gt;w_dummyw_dummy&lt;BR /&gt;lv_period&lt;BR /&gt;w_dummyw_dummy&lt;BR /&gt;g_jtype&lt;BR /&gt;w_dummyw_dummy"@008&lt;BR /&gt;&amp;nbsp; w_header1-curr "@008&lt;BR /&gt;w_dummy. "@008&lt;BR /&gt;&amp;nbsp; WHEN 10.&lt;BR /&gt;&amp;nbsp; SPLIT w_upload AT c_tab INTO&lt;BR /&gt;w_dummyw_dummy&lt;BR /&gt;w_dummyw_dummy&lt;BR /&gt;g_rdate&lt;BR /&gt;w_dummyw_dummy&lt;BR /&gt;w_header-reason_rev&lt;BR /&gt;w_dummyw_dummy "@008&lt;BR /&gt;lv_kursf "@008&lt;BR /&gt;w_dummy. "@008&lt;BR /&gt;&amp;nbsp; EXIT.&lt;BR /&gt;ENDCASE.&lt;BR /&gt;*Split line item data&lt;BR /&gt;&amp;nbsp; LOOP AT t_upload INTO w_upload FROM 14.&lt;BR /&gt;CLEAR lv_account.&lt;BR /&gt;&amp;nbsp; SPLIT w_upload AT c_tab INTO w_postings-company&lt;BR /&gt;lv_account&lt;BR /&gt;w_postings-ttype&lt;BR /&gt;w_postings-pkey&lt;BR /&gt;lv_amount&lt;BR /&gt;w_postings-ccent&lt;BR /&gt;w_postings-prcent&lt;BR /&gt;w_postings-description&lt;BR /&gt;w_postings-assignment&lt;BR /&gt;w_postings-tax_code&lt;BR /&gt;w_postings-juridiction_code&lt;BR /&gt;lv_aufnr&lt;BR /&gt;w_postings-psa&lt;BR /&gt;lv_plant&lt;BR /&gt;w_postings-wbs_element&lt;BR /&gt;lv_product&lt;BR /&gt;w_postings-product_hie&lt;BR /&gt;w_postings-meins&lt;BR /&gt;w_postings-quantity&lt;BR /&gt;w_postings-asgm&lt;BR /&gt;w_postings-asgc&lt;BR /&gt;w_postings-billing_type&lt;BR /&gt;lv_customer&lt;BR /&gt;&amp;nbsp; lv_cust_hie2&lt;BR /&gt;w_postings-order_reason&lt;BR /&gt;w_postings-dsd_return_rsn&lt;BR /&gt;&amp;nbsp; w_postings-reson1&lt;BR /&gt;w_postings-item_sales&lt;BR /&gt;w_postings-sales_order&lt;BR /&gt;w_postings-dist_channel&lt;BR /&gt;w_postings-sales_org&lt;BR /&gt;w_postings-division&lt;BR /&gt;w_postings-shipping_type&lt;BR /&gt;w_postings-partner_pc&lt;BR /&gt;w_postings-item_category&lt;BR /&gt;w_postings-trading_partner&lt;BR /&gt;w_postings-market&lt;BR /&gt;w_postings-sales_office&lt;BR /&gt;w_postings-country&lt;BR /&gt;w_postings-resp&lt;BR /&gt;w_postings-value_date&lt;BR /&gt;w_postings-trade_type&lt;BR /&gt;w_postings-controlling_area&lt;BR /&gt;w_postings-cost_object&lt;BR /&gt;&amp;nbsp; w_postings-cust_hie1&lt;BR /&gt;&amp;nbsp; w_postings-cust_hie3&lt;BR /&gt;&amp;nbsp; w_postings-cust_hie4&lt;BR /&gt;&amp;nbsp; w_postings-cust_hie5&lt;BR /&gt;&amp;nbsp; w_postings-cust_hie6&lt;BR /&gt;&amp;nbsp; w_postings-cust_hie7&lt;BR /&gt;w_postings-ship_to_party&lt;BR /&gt;w_postings-fin_plning_lvl&lt;BR /&gt;w_postings-ext_ic_mod_std&lt;BR /&gt;&amp;nbsp; w_postings-vv160_intrprtation&lt;BR /&gt;&amp;nbsp; w_postings-vv161_intrprtation&lt;BR /&gt;w_postings-crm_marketing&lt;BR /&gt;w_dummy.&lt;BR /&gt;w_postings-amount = lv_amount.&lt;BR /&gt;* END OF @007&lt;BR /&gt;&amp;nbsp; IF NOT ( w_postings-pkey IS INITIAL ).&lt;BR /&gt;&amp;nbsp; APPEND w_postings TO t_posting.&lt;BR /&gt;ENDIF.&lt;BR /&gt;&amp;nbsp; CLEAR: w_postings, lv_aufnr,lv_cust_hie2, lv_customer, lv_product,&lt;BR /&gt;lv_plant, lv_account, lv_amount.&lt;BR /&gt;ENDLOOP.&lt;BR /&gt;IF t_bukrs IS NOT INITIAL.&lt;BR /&gt;&amp;nbsp; DELETE ADJACENT DUPLICATES FROM t_bukrs COMPARING bukrs.&lt;BR /&gt;*Fecth the currency for company codes&lt;BR /&gt;&amp;nbsp; SELECT&lt;BR /&gt;bukrs&lt;BR /&gt;waers&lt;BR /&gt;&amp;nbsp; FROM t001&lt;BR /&gt;&amp;nbsp; INTO TABLE t_curr&lt;BR /&gt;&amp;nbsp; FOR ALL ENTRIES IN t_bukrs&lt;BR /&gt;&amp;nbsp; WHERE bukrs EQ t_bukrs-bukrs.&lt;BR /&gt;ENDIF.&lt;BR /&gt;IF t_curr IS NOT INITIAL.&lt;BR /&gt;SORT t_curr BY bukrs.&lt;BR /&gt;ENDIF.&lt;BR /&gt;ENDFORM." SPLIT_INTO_RECORDS&lt;BR /&gt;*&amp;amp;---------------------------------------------------------------------*&lt;BR /&gt;*&amp;amp; Form VALIDATE_GL&lt;BR /&gt;*&amp;amp;---------------------------------------------------------------------*&lt;BR /&gt;FORM validate_gl.&lt;BR /&gt;&amp;nbsp; TYPES: BEGIN OF ltype_gl,&lt;BR /&gt;bukrs TYPE bukrs,&lt;BR /&gt;saknr TYPE saknr,&lt;BR /&gt;xintb TYPE xintb,&lt;BR /&gt;&amp;nbsp; END OF ltype_gl.&lt;BR /&gt;&amp;nbsp; DATA: lt_postings_temp TYPE STANDARD TABLE OF type_item,&lt;BR /&gt;lt_gl_flag TYPE STANDARD TABLE OF ltype_gl,&lt;BR /&gt;lw_gl_flag TYPE ltype_gl,&amp;nbsp; &lt;BR /&gt;lv_msg TYPE char100,&lt;BR /&gt;lw_message TYPE type_message,&lt;BR /&gt;lv_counter TYPE posnr_acc.&lt;BR /&gt;&amp;nbsp; REFRESH: lt_postings_temp,&lt;BR /&gt;lt_gl_flag.&lt;BR /&gt;&amp;nbsp; CLEAR: lw_gl_flag,&lt;BR /&gt;lv_counter.&lt;BR /&gt;lt_postings_temp = t_posting.&lt;BR /&gt;* lt_postings_temp = t_posting.&lt;BR /&gt;IF lt_postings_temp IS NOT INITIAL.&lt;BR /&gt;&amp;nbsp; SORT lt_postings_tempBY company account.&lt;BR /&gt;&amp;nbsp; DELETE ADJACENT DUPLICATES FROM lt_postings_temp COMPARING company account.&lt;BR /&gt;&amp;nbsp; SELECT "#EC CI_SGLSELECT&lt;BR /&gt;bukrs&lt;BR /&gt;saknr&lt;BR /&gt;xintb&lt;BR /&gt;&amp;nbsp; FROM skb1&lt;BR /&gt;&amp;nbsp; INTO TABLE lt_gl_flag&lt;BR /&gt;&amp;nbsp; FOR ALL ENTRIES IN lt_postings_temp&lt;BR /&gt;&amp;nbsp; WHERE bukrs = lt_postings_temp-company&lt;BR /&gt;AND saknr = lt_postings_temp-account.&lt;BR /&gt;ENDIF.&lt;BR /&gt;**Intialize counter&lt;BR /&gt;lv_counter = 1.&lt;BR /&gt;&amp;nbsp; LOOP AT t_posting INTO w_postings.&lt;BR /&gt;&amp;nbsp; READ TABLE lt_gl_flag INTO lw_gl_flag&lt;BR /&gt;&amp;nbsp; WITH KEY saknr = w_postings-account&lt;BR /&gt;bukrs = w_postings-company.&lt;BR /&gt;IF sy-subrc IS INITIAL.&lt;BR /&gt;&amp;nbsp; IF lw_gl_flag-xintb = c_x.&lt;BR /&gt;&amp;nbsp; CONCATENATE text-004 w_postings-account text-006&lt;BR /&gt;&amp;nbsp; INTO lv_msg SEPARATED BY space.&lt;BR /&gt;* Else display the error message for GL account.&lt;BR /&gt;lw_message-mes_type = c_e.&lt;BR /&gt;lw_message-text = lv_msg.&lt;BR /&gt;&amp;nbsp; APPEND lw_message TO t_message.&lt;BR /&gt;CLEAR lw_message.&lt;BR /&gt;g_error_flag = c_x.&lt;BR /&gt;&amp;nbsp; ELSE.&lt;BR /&gt;&amp;nbsp; PERFORM populate_bapi USING lv_counter.&lt;BR /&gt;* Increase counter by one&lt;BR /&gt;lv_counter = lv_counter + 1.&lt;BR /&gt;ENDIF.&lt;BR /&gt;&amp;nbsp; ELSE.&lt;BR /&gt;"error message lv_msg&lt;BR /&gt;* Else display the error message for GL account.&lt;BR /&gt;lw_message-mes_type = c_e.&lt;BR /&gt;lw_message-text = lv_msg.&lt;BR /&gt;&amp;nbsp; APPEND lw_message TO t_message.&lt;BR /&gt;CLEAR lw_message.&lt;BR /&gt;g_error_flag = c_x.&lt;BR /&gt;&amp;nbsp; ENDIF.&lt;BR /&gt;ENDLOOP.&lt;BR /&gt;ENDFORM." VALIDATE_GL&lt;BR /&gt;*&amp;amp;---------------------------------------------------------------------*&lt;BR /&gt;*&amp;amp; Form POPULATE_BAPI&lt;BR /&gt;*&amp;amp;---------------------------------------------------------------------*&lt;BR /&gt;FORM populate_bapi USING rlv_counter TYPE posnr_acc.&lt;BR /&gt;**Populate line item details&lt;BR /&gt;&amp;nbsp; IF w_postings-company NE w_header-comp_code.&lt;BR /&gt;g_cross_flag = c_x.&lt;BR /&gt;&amp;nbsp; ENDIF.&lt;BR /&gt;*Fill Credit line item data&lt;BR /&gt;&amp;nbsp; IF w_postings-pkey=50.&lt;BR /&gt;w_item_gl-itemno_acc = rlv_counter.&lt;BR /&gt;w_item_gl-comp_code = w_postings-company.&lt;BR /&gt;w_item_gl-gl_account = w_postings-account.&lt;BR /&gt;w_item_gl-pstng_date = w_header-pstng_date.&lt;BR /&gt;w_item_gl-cs_trans_t = w_postings-ttype.&lt;BR /&gt;w_item_gl-costcenter = w_postings-ccent.&lt;BR /&gt;w_item_gl-profit_ctr = w_postings-prcent.&lt;BR /&gt;w_item_gl-wbs_element = w_postings-wbs_element.&lt;BR /&gt;w_item_gl-orderid = w_postings-internal_order.&lt;BR /&gt;w_item_gl-item_text = w_postings-description.&lt;BR /&gt;w_item_gl-alloc_nmbr = w_postings-assignment.&lt;BR /&gt;w_item_gl-tax_code = w_postings-tax_code.&lt;BR /&gt;w_item_gl-taxjurcode = w_postings-juridiction_code.&lt;BR /&gt;w_item_gl-orderid = w_postings-internal_order.&lt;BR /&gt;w_item_gl-base_uom = w_postings-meins.&lt;BR /&gt;w_item_gl-quantity = w_postings-quantity.&lt;BR /&gt;w_item_gl-trade_id = w_postings-trading_partner.&lt;BR /&gt;w_item_gl-value_date = w_postings-value_date.&lt;BR /&gt;&amp;nbsp; APPEND w_item_gl TO t_item_gl.&lt;BR /&gt;&amp;nbsp; IF w_header2-kursf IS NOT INITIAL.&lt;BR /&gt;* To fetch company code currency&lt;BR /&gt;&amp;nbsp; READ TABLE t_curr INTO w_curr&lt;BR /&gt;&amp;nbsp; WITH KEY bukrs = w_postings-company&lt;BR /&gt;&amp;nbsp; BINARY SEARCH.&lt;BR /&gt;&amp;nbsp; IF w_curr-waers NE w_header1-curr.&lt;BR /&gt;w_item_curr-exch_rate = w_header2-kursf.&lt;BR /&gt;ENDIF.&lt;BR /&gt;ENDIF.&lt;BR /&gt;w_item_curr-itemno_acc =rlv_counter.&lt;BR /&gt;w_item_curr-curr_type = c_doc_curr. "Document Currency&lt;BR /&gt;w_item_curr-currency = w_header1-curr.&lt;BR /&gt;w_item_curr-amt_doccur =w_postings-amount * ( -1 ).&lt;BR /&gt;&amp;nbsp; APPEND w_item_curr TO t_item_curr.&lt;BR /&gt;CLEAR w_item_curr.&lt;BR /&gt;g_credit_total = g_credit_total + w_postings-amount.&lt;BR /&gt;* Clear variables&lt;BR /&gt;&amp;nbsp; CLEAR: w_postings,&lt;BR /&gt;w_item_curr,&lt;BR /&gt;w_curr,&lt;BR /&gt;w_item_gl.&lt;BR /&gt;*Fill Debit line item data&lt;BR /&gt;&amp;nbsp; ELSEIF w_postings-pkey= 40.&lt;BR /&gt;w_item_gl-itemno_acc = rlv_counter.&lt;BR /&gt;w_item_gl-comp_code = w_postings-company.&lt;BR /&gt;w_item_gl-gl_account = w_postings-account.&lt;BR /&gt;w_item_gl-pstng_date = w_header-pstng_date.&lt;BR /&gt;w_item_gl-cs_trans_t = w_postings-ttype.&lt;BR /&gt;w_item_gl-costcenter = w_postings-ccent.&lt;BR /&gt;w_item_gl-profit_ctr = w_postings-prcent.&lt;BR /&gt;w_item_gl-wbs_element = w_postings-wbs_element.&lt;BR /&gt;w_item_gl-orderid = w_postings-internal_order.&lt;BR /&gt;w_item_gl-item_text = w_postings-description.&lt;BR /&gt;w_item_gl-alloc_nmbr = w_postings-assignment.&lt;BR /&gt;w_item_gl-tax_code = w_postings-tax_code.&lt;BR /&gt;w_item_gl-taxjurcode = w_postings-juridiction_code.&lt;BR /&gt;w_item_gl-orderid = w_postings-internal_order.&lt;BR /&gt;w_item_gl-base_uom = w_postings-meins.&lt;BR /&gt;w_item_gl-quantity = w_postings-quantity.&lt;BR /&gt;w_item_gl-part_prctr = w_postings-partner_pc.&lt;BR /&gt;w_item_gl-trade_id = w_postings-trading_partner.&lt;BR /&gt;w_item_gl-value_date = w_postings-value_date.&lt;BR /&gt;&amp;nbsp; APPEND w_item_gl TO t_item_gl.&lt;BR /&gt;&amp;nbsp; IF w_header2-kursf IS NOT INITIAL.&lt;BR /&gt;* To fetch company code currency&lt;BR /&gt;&amp;nbsp; READ TABLE t_curr INTO w_curr&lt;BR /&gt;&amp;nbsp; WITH KEY bukrs = w_postings-company&lt;BR /&gt;&amp;nbsp; BINARY SEARCH.&lt;BR /&gt;&amp;nbsp; IF w_curr-waers NE w_header1-curr.&lt;BR /&gt;w_item_curr-exch_rate = w_header2-kursf.&lt;BR /&gt;ENDIF.&lt;BR /&gt;ENDIF.&lt;BR /&gt;w_item_curr-itemno_acc =rlv_counter.&lt;BR /&gt;w_item_curr-curr_type = c_doc_curr. "Document Currency&lt;BR /&gt;w_item_curr-currency = w_header1-curr.&lt;BR /&gt;w_item_curr-amt_doccur =w_postings-amount .&lt;BR /&gt;&amp;nbsp; APPEND w_item_curr TO t_item_curr.&lt;BR /&gt;CLEAR w_item_curr.&lt;BR /&gt;g_debit_total = g_debit_total + w_postings-amount.&lt;BR /&gt;* Clear variables&lt;BR /&gt;&amp;nbsp; CLEAR: w_postings,&lt;BR /&gt;w_item_curr,&lt;BR /&gt;w_curr,&lt;BR /&gt;w_item_gl.&lt;BR /&gt;&amp;nbsp; ENDIF.&lt;BR /&gt;ENDFORM." POPULATE_BAPI&lt;BR /&gt;*&amp;amp;---------------------------------------------------------------------*&lt;BR /&gt;*&amp;amp;Form POST_DOCUMENT&lt;BR /&gt;*&amp;amp;---------------------------------------------------------------------*&lt;BR /&gt;FORM post_document.&lt;BR /&gt;&amp;nbsp; TYPES:BEGIN OF type_bkpf,&lt;BR /&gt;bukrs TYPE bkpf-bukrs,&lt;BR /&gt;belnr TYPE bkpf-belnr,&lt;BR /&gt;gjahr TYPE bkpf-gjahr,&lt;BR /&gt;&amp;nbsp; END OF type_bkpf.&lt;BR /&gt;*Local variable declarations&lt;BR /&gt;&amp;nbsp; DATA: lv_belnr TYPE belnr_d,&lt;BR /&gt;lv_bukrs TYPE bukrs,&lt;BR /&gt;lv_gjahr TYPE gjahr,&lt;BR /&gt;lw_message TYPE type_message,&lt;BR /&gt;lv_msg TYPE symsgv,&lt;BR /&gt;lv_rdate TYPE sy-datum,&lt;BR /&gt;lt_return TYPE STANDARD TABLE OF bapiret2,&lt;BR /&gt;lw_return TYPE bapiret2, "#EC NEEDED&lt;BR /&gt;lt_bkpf TYPE STANDARD TABLE OF type_bkpf,&lt;BR /&gt;lw_bkpf TYPE type_bkpf,&lt;BR /&gt;lv_bvorg TYPE bvor-bvorg.&lt;BR /&gt;*Clear local work area and variables&lt;BR /&gt;&amp;nbsp; CLEAR: lw_message,&lt;BR /&gt;lv_msg,&lt;BR /&gt;lw_return,&lt;BR /&gt;lw_bkpf.&lt;BR /&gt;&amp;nbsp; CLEAR: w_header-obj_type,&lt;BR /&gt;w_header-obj_key,&lt;BR /&gt;w_header-obj_sys.&lt;BR /&gt;&amp;nbsp; IF g_error_flag NE c_x.&lt;BR /&gt;&amp;nbsp; IF g_credit_total&amp;lt;&amp;gt; 0 AND g_debit_total&amp;lt;&amp;gt; 0.&lt;BR /&gt;CALL FUNCTION 'BAPI_ACC_DOCUMENT_CHECK'&lt;BR /&gt;&amp;nbsp; EXPORTING&lt;BR /&gt;documentheader= w_header&lt;BR /&gt;&amp;nbsp; TABLES&lt;BR /&gt;accountgl = t_item_gl&lt;BR /&gt;currencyamount = t_item_curr&lt;BR /&gt;&amp;nbsp; return = t_return.&lt;BR /&gt;If t_return is not initial.&lt;BR /&gt;* Posting journal entries&lt;BR /&gt;&amp;nbsp; CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'&lt;BR /&gt;&amp;nbsp; EXPORTING&lt;BR /&gt;documentheader = w_header&lt;BR /&gt;&amp;nbsp; IMPORTING&lt;BR /&gt;obj_type = g_obj_type&lt;BR /&gt;obj_key = g_obj_key&lt;BR /&gt;obj_sys = g_obj_sys&lt;BR /&gt;&amp;nbsp; TABLES&lt;BR /&gt;accountgl = t_item_gl&lt;BR /&gt;currencyamount = t_item_curr&lt;BR /&gt;&amp;nbsp; return = t_return.&lt;BR /&gt;IF sy-subrc&amp;lt;&amp;gt; 0.&lt;BR /&gt;&amp;nbsp; CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'&lt;BR /&gt;&amp;nbsp; EXPORTING&lt;BR /&gt;&amp;nbsp; wait = c_x.&lt;BR /&gt;&amp;nbsp; ENDIF.&lt;BR /&gt;Endif.&lt;BR /&gt;ENDIF.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Oct 2014 11:43:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-input-program-for-tcode-fv50l/m-p/10683169#M1869216</guid>
      <dc:creator>former_member226225</dc:creator>
      <dc:date>2014-10-20T11:43:55Z</dc:date>
    </item>
    <item>
      <title>Re: Batch input program for tcode FV50L</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-input-program-for-tcode-fv50l/m-p/10683170#M1869217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks for reply, but the thing is i want for FV50l , having ledgr grp.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Oct 2014 06:06:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-input-program-for-tcode-fv50l/m-p/10683170#M1869217</guid>
      <dc:creator>JeetOP</dc:creator>
      <dc:date>2014-10-21T06:06:56Z</dc:date>
    </item>
  </channel>
</rss>

