BAPI for FB60
Hi all,
I need to park a document using FB60 tansaction. I need to use BAPI to do the job. Which BAPI can i use to park the document?
When the document is park, how do i know the status? Which database table stored the information that is pass via BAPI?
Please Advice. Thanks
Regards,
Rayden
Use BAPI_INCOMINGINVOICE_PARK
Import parameters HEADERDATA is mandatory in BAPI_INCOMINGINVOICE_PARK .
Also tables ITEMDATA and RETURN are mandatory.
Check the following sample code
LOOP AT i_ekbe INTO wa_ekbe.
CLEAR: wa_invoice_header,
i_invoice_item,
i_return,
v_inv_doc_no,
v_fisc_year,
wa_return.
REFRESH: i_invoice_item,
i_return.
Appending Invoice header Work Area
wa_invoice_header-invoice_ind = c_x.
wa_invoice_header-doc_date = sy-datum.
wa_invoice_header-pstng_date = wa_ekbe-budat.
wa_invoice_header-comp_code = c_100.
wa_invoice_header-gross_amount =
wa_invoice_header-currency = c_usd.
wa_invoice_header-calc_tax_ind = c_x.
Appending Invoice item data
i_invoice_item-invoice_doc_item = '0001'.
i_invoice_item-po_number = wa_ekbe-ebeln.
i_invoice_item-po_item = wa_ekbe-ebelp.
i_invoice_item-tax_code = ' '.
i_invoice_item-item_amount = '20.00'.
i_invoice_item-quantity = '10.000'.
i_invoice_item-ref_doc = '5600000634'.
i_invoice_item-ref_doc_year = '2006'.
i_invoice_item-ref_doc_it = '10'.
i_invoice_item-po_unit = 'EA'.
i_invoice_item-COND_TYPE = 'VPRS'.
APPEND i_invoice_item.
Calling module BAPI_INCOMINGINVOICE_PARK
CALL FUNCTION 'BAPI_INCOMINGINVOICE_PARK'
EXPORTING
headerdata = wa_invoice_header
ADDRESSDATA =
IMPORTING
invoicedocnumber = v_inv_doc_no
fiscalyear = v_fisc_year
TABLES
itemdata = i_invoice_item
NFMETALLITMS =
ACCOUNTINGDATA =
GLACCOUNTDATA = i_gla
MATERIALDATA = i_mat
TAXDATA =
WITHTAXDATA =
VENDORITEMSPLITDATA =
return = i_return.
READ TABLE i_return INTO wa_return
WITH KEY type = c_e.
IF sy-subrc EQ 0.
ENDIF.
ENDLOOP.
Hope this helps
Vinodh Balakrishnan
Similar Messages
-
BAPI for FB60 park vendor invoice
Hi SAP Gurus,
Please let me know what is the BAPI for Park Vendor invoice in FB60.
Thanks in advance
Vinod
Edited by: Vinod Malagi on Dec 9, 2008 7:21 AM
Message was edited by: Jürgen L.Hi Preethi,
I ahev checked this BApi this is for With PO and i need for without refernce to PO.
only Vendor number, GL account numbers, amount, date and other details.
Please suggest.
Thanks in advance
Vinod -
Is there a BAPI for changing/updating documents that were created by FB60?
BAPI_INCOMINGINVOICE*, package MRM, object IncomingInvoice, are linked to transacton MIRO; not FB60 which is "pure" FI and not MM.
Look for FI BAPI via objects like AcctngInvoiceReceipt, package ACID, with BAPI BAPI_ACC_PYMNTBLK_UPDATE_POST or BAPI_ACC_INVOICE_REV_POST and BAPI_ACC_INVOICE_RECEIPT_POST.
Regards -
Hi All,
Can Any one Tell me which bapi should i use for fb60 transaction i have tried BAPI_INCOMINGINVOICE_PARK but it is asking PO as mandatory field but i don't have po for this scenario.
i have tried BAPI_ACC_DOCUMENT_POST but its not having a export parameter to give the invoice number.
So can anyone suggest me which bapi i have to go without referring the po.
Regards,
Karthik.Hi Sudharshan,
Thanks For your quick response could you provide any sample program for this type of scenario so that it is easy to understand .I have tried BAPI_ACC_DOCUMENT_POST but in the ACCOUNTTAX tables its asking me to fill the posting date but its not there ,so can you provide any sample program. -
Hi,
I would like to do the Invoice posting by modifying the tax base amount and tax amount(as against system computing on its own) through FB60 transaction code. Is there any suitable bapi I can use to achieve this scenario. I am not sure whether we can use the BAPI_ACC_DOCUMENT_POST to solve this.Please suggest.
Thanks,
RamHi,
Yes. You can use the BAPI BAPI_ACC_DOCUMENT_POST to post the vendor Invoices. Use the below tables parameter structures of BAPI.
ACCOUNTGL LIKE BAPIACGL09 G/L account item
ACCOUNTRECEIVABLE LIKE BAPIACAR09 Customer Item
ACCOUNTPAYABLE LIKE BAPIACAP09 Vendor Item
ACCOUNTTAX LIKE BAPIACTX09 Tax item
CURRENCYAMOUNT LIKE BAPIACCR09 Currency Items
Fill the corresponding structures for line items and call this BAPI.
Regards
Gangadhar -
Bapi for FB60 - Park an invoice
Hi gurus,
Im trying to park an invoice in transaction FB60. i allready tried an batch inout but it's giving me an error, that i can't park an invoice using a batch input in transaction FB60... Don't know why, if someone can explain me why i cant park using an batch input i'll be appreciated..
Anyway , is it any bapi that i can use to park an invoice to transaction FB60??
Thanks in advance,
Best RegardsI worked with the FV60 transaction and able to park the invoice successfully by batch input method. I am pasting the sample code. Try with the below code::
Populating the Header Details
PERFORM bdc_dynpro USING 'SAPMF05A' '1100'.
PERFORM bdc_field USING 'BDC_OKCODE' '/ECCDE'.
PERFORM bdc_field USING 'INVFO-ACCNT' pv_vendor.
MOVE pv_invoice_date TO lw_date.
WRITE lw_date TO lw_fdate.
PERFORM bdc_field USING 'INVFO-BLDAT' lw_fdate.
PERFORM bdc_field USING 'INVFO-XBLNR' vendor_invoice.
IF pr_posting_date IS INITIAL.
MOVE sy-datum TO pr_posting_date.
ENDIF.
CLEAR: lw_date, lw_fdate.
MOVE pr_posting_date TO lw_date.
WRITE lw_date TO lw_fdate.
PERFORM bdc_field USING 'INVFO-BUDAT' lw_fdate.
PERFORM bdc_field USING 'INVFO-SGTXT' pv_text.
PERFORM bdc_dynpro USING 'SAPLACHD' '1000'.
PERFORM bdc_field USING 'BDC_OKCODE' '=ENTR'.
PERFORM bdc_field USING 'BKPF-BUKRS' pv_bukrs.
Populating the Item Details
LOOP AT pr_item_details INTO fs_item_details.
IF sy-tabix NE 1.
PERFORM bdc_dynpro USING 'SAPMF05A' '1100'.
PERFORM bdc_field USING 'BDC_OKCODE' '=0005'.
PERFORM bdc_field USING 'ACGL_ITEM-MARKSP(01)' 'X'.
ENDIF. " If sy-tabix...
PERFORM bdc_dynpro USING 'SAPMF05A' '1100'.
PERFORM bdc_field USING 'BDC_OKCODE' '/00'.
PERFORM bdc_field USING 'ACGL_ITEM-HKONT(01)'
fs_item_details-expense.
PERFORM bdc_field USING 'ACGL_ITEM-WRBTR(01)' lw_amount.
PERFORM bdc_field USING 'ACGL_ITEM-MWSKZ(01)' pv_tax.
PERFORM bdc_field USING 'ACGL_ITEM-KOSTL(01)' pv_costcenter.
PERFORM bdc_field USING 'ACGL_ITEM-SGTXT(01)'
fs_item_details-item_text.
lw_totamount = lw_totamount + lw_amount.
ENDLOOP.
lw_totamount = lw_totamount + lw_taxamount.
PERFORM bdc_dynpro USING 'SAPMF05A' '1100'.
PERFORM bdc_field USING 'BDC_OKCODE' '=PBBP'.
PERFORM bdc_field USING 'INVFO-WRBTR' lw_totamount.
PERFORM bdc_field USING 'INVFO-WMWST' lw_taxamount.
CALL TRANSACTION 'FV60' USING t_bdc_data
MODE lw_mode
UPDATE c_update
MESSAGES INTO t_bdcmsgcoll.
**ignore the variable used
Regards,
Kiran Bobbala -
Need Bapi for posting docuemtn through - FB60
Hi Friends..
I need a Bapi for Transaction FB60.I tried with lot of option including BAPI_INCOMINGINVOICE_CREATE.But I didn't get a proper one.
No Bapi have a Vendor input field.Plz help me to identify the right Bapi for FB60.
Thanks
GowrishankarHi,
Check the link given: ["Change" BAPI for FB60]
Regards,
Naveen M. -
IDOC/ BAPI for transaction FB60
Hi Experts,
Can anybody tell me IDOC/ BAPI for transaction FB60 for document type (KR = Original Invoice).
ThanksHi Venkata,
Please refer below code, this works similar to FB60.
REPORT z_bapi_test.
*REPORT acc_bapi_test_document .
SELECTION-SCREEN BEGIN OF BLOCK bl01 .
PARAMETERS:
check_l RADIOBUTTON GROUP rb1,
check_a DEFAULT 'X' RADIOBUTTON GROUP rb1,
post RADIOBUTTON GROUP rb1.
SELECTION-SCREEN ULINE.
PARAMETERS:
rev_c RADIOBUTTON GROUP rb1,
rev_p RADIOBUTTON GROUP rb1.
SELECTION-SCREEN ULINE.
PARAMETERS:
ref_key LIKE bapiache01-obj_key DEFAULT 'TEST000001BAPICALL',
dest LIKE bdi_logsys-logsys DEFAULT ' '.
SELECTION-SCREEN END OF BLOCK bl01 .
DATA:
gd_documentheader LIKE bapiache09,
gd_customercpd LIKE bapiacpa09,
gd_fica_hd LIKE bapiaccahd,
it_accountreceivable LIKE TABLE OF bapiacar09 WITH HEADER LINE,
it_accountgl LIKE TABLE OF bapiacgl09 WITH HEADER LINE,
it_accounttax LIKE TABLE OF bapiactx09 WITH HEADER LINE,
it_criteria LIKE TABLE OF bapiackec9 WITH HEADER LINE,
it_valuefield LIKE TABLE OF bapiackev9 WITH HEADER LINE,
it_currencyamount LIKE TABLE OF bapiaccr09 WITH HEADER LINE,
it_return LIKE TABLE OF bapiret2 WITH HEADER LINE,
it_receivers LIKE TABLE OF bdi_logsys WITH HEADER LINE,
it_fica_it LIKE TABLE OF bapiaccait WITH HEADER LINE,
it_accountpayable LIKE TABLE OF bapiacap09 WITH HEADER LINE,
it_paymentcard LIKE TABLE OF bapiacpc09 WITH HEADER LINE,
it_ext LIKE TABLE OF bapiacextc WITH HEADER LINE.
it_re LIKE TABLE OF bapiacre09 WITH HEADER LINE,
it_ext2 LIKE TABLE OF bapiparex WITH HEADER LINE.
PERFORM fill_internal_tables.
IF check_l = 'X'.
CALL FUNCTION 'BAPI_ACC_DOCUMENT_CHECK'
DESTINATION dest
EXPORTING
documentheader = gd_documentheader
customercpd = gd_customercpd
contractheader = gd_fica_hd
TABLES
accountgl = it_accountgl
accountreceivable = it_accountreceivable
accountpayable = it_accountpayable
accounttax = it_accounttax
currencyamount = it_currencyamount
criteria = it_criteria
valuefield = it_valuefield
extension1 = it_ext
return = it_return
paymentcard = it_paymentcard
contractitem = it_fica_it.
extension2 = it_ext2
realestate = it_re.
WRITE: / 'Result of check lines:'. "#EC NOTEXT
PERFORM show_messages.
ENDIF.
IF check_a = 'X'.
CALL FUNCTION 'BAPI_ACC_DOCUMENT_CHECK'
DESTINATION dest
EXPORTING
documentheader = gd_documentheader
customercpd = gd_customercpd
contractheader = gd_fica_hd
TABLES
accountgl = it_accountgl
accountreceivable = it_accountreceivable
accountpayable = it_accountpayable
accounttax = it_accounttax
currencyamount = it_currencyamount
criteria = it_criteria
valuefield = it_valuefield
extension1 = it_ext
return = it_return
paymentcard = it_paymentcard
contractitem = it_fica_it.
extension2 = it_ext2
realestate = it_re.
WRITE: / 'Result of check all:'. "#EC NOTEXT
PERFORM show_messages.
ENDIF.
IF post = 'X'.
DATA: l_type LIKE gd_documentheader-obj_type,
l_key LIKE gd_documentheader-obj_key,
l_sys LIKE gd_documentheader-obj_sys.
IF dest = space OR
dest = gd_documentheader-obj_sys.
post synchron
CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
EXPORTING
documentheader = gd_documentheader
customercpd = gd_customercpd
contractheader = gd_fica_hd
IMPORTING
obj_type = l_type
obj_key = l_key
obj_sys = l_sys
TABLES
accountgl = it_accountgl
accountreceivable = it_accountreceivable
accountpayable = it_accountpayable
accounttax = it_accounttax
currencyamount = it_currencyamount
criteria = it_criteria
valuefield = it_valuefield
extension1 = it_ext
return = it_return
paymentcard = it_paymentcard
contractitem = it_fica_it.
extension2 = it_ext2
realestate = it_re.
WRITE: / 'Result of post:'. "#EC NOTEXT
PERFORM show_messages.
ELSE.
create Idoc
it_receivers-logsys = dest.
APPEND it_receivers.
CALL FUNCTION 'ALE_ACC_DOCUMENT_POST'
EXPORTING
documentheader = gd_documentheader
customercpd = gd_customercpd
contractheader = gd_fica_hd
TABLES
accountgl = it_accountgl
accountreceivable = it_accountreceivable
accountpayable = it_accountpayable
accounttax = it_accounttax
currencyamount = it_currencyamount
criteria = it_criteria
valuefield = it_valuefield
extension1 = it_ext
paymentcard = it_paymentcard
contractitem = it_fica_it
extension2 = it_ext2
realestate = it_re
receivers = it_receivers
COMMUNICATION_DOCUMENTS* APPLICATION_OBJECTS EXCEPTIONS
error_creating_idocs = 1
OTHERS = 2 .
IF sy-subrc = 0.
WRITE: / 'IDoc created'. "#EC NOTEXT
ELSE.
WRITE: sy-msgid.
ENDIF.
ENDIF.
ENDIF.
IF rev_p = 'X' OR rev_c = 'X'.
DATA: rev LIKE bapiacrev,
rev_key LIKE ref_key.
rev_key = ref_key.
rev_key(1) = 'R'.
rev-obj_type = gd_documentheader-obj_type.
rev-obj_key = rev_key.
rev-obj_sys = gd_documentheader-obj_sys.
rev-obj_key_r = ref_key.
IF rev_c IS INITIAL.
IF dest = space OR
dest = gd_documentheader-obj_sys.
CALL FUNCTION 'BAPI_ACC_DOCUMENT_REV_POST'
EXPORTING
reversal = rev
bus_act = gd_documentheader-bus_act
TABLES
return = it_return.
ELSE.
it_receivers-logsys = dest.
APPEND it_receivers.
CALL FUNCTION 'ALE_ACC_DOCUMENT_REV_POST'
EXPORTING
reversal = rev
busact = gd_documentheader-bus_act
OBJ_TYPE = 'BUS6035'
SERIAL_ID = '0'
TABLES
receivers = it_receivers
COMMUNICATION_DOCUMENTS* APPLICATION_OBJECTS EXCEPTIONS
error_creating_idocs = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
WRITE: / 'IDoc created'. "#EC NOTEXT
ENDIF.
ENDIF.
ELSE.
CALL FUNCTION 'BAPI_ACC_DOCUMENT_REV_CHECK'
EXPORTING
reversal = rev
bus_act = gd_documentheader-bus_act
TABLES
return = it_return.
ENDIF.
WRITE: / 'Result of Reversal Posting:'. "#EC NOTEXT
PERFORM show_messages.
ENDIF.
COMMIT WORK.
Kindly close if it helps you.
Regards
Abhii... -
BAPI functions for FB60 and F-02
Hi,
Can any one please tell me the BAPI functions for FB60 and F-02 tcodes.
I had searched in forum,but din't solved my purpose.
Thanks.
Sri
Moderator message - Search harder. Maybe Google will help - post locked
Edited by: Rob Burbank on May 8, 2010 6:25 PMThis has been solved for FB50. The original variant for FB50 had never beer created in our QAS system! So I was able to get the screen variant menu selections to reappear by running SHD0, editing, and then saving the transaction variant 'STANDARD 1' (not sure if that is SAP's name for the default variant).
Hope others find this information useful.
J. Haynes
Denver, CO -
Hi friends,
I want to upload data to transaction FB60. I have found a BAPI 'BAPI_ACC_DOCUMENT_POST' for the same but I am not sure about it.
Can anybody help me or if anybody has used the BAPI for uploading data to Txn FB60.
Thanks in Advance,
PunitHi,
check this code..
REPORT Z_FI_GL_POSTING.
include <icon>.
*/ =================================================================== *
CONSTANTS: on VALUE 'X',
off VALUE ' ',
tabx TYPE X VALUE '09',
c_e1bpache08 TYPE edilsegtyp VALUE 'E1BPACHE08',
c_e1bpacgl08 TYPE edilsegtyp VALUE 'E1BPACGL08',
c_e1bpaccr08 TYPE edilsegtyp VALUE 'E1BPACCR08'.
TYPES: BEGIN OF t_tab_index,
from TYPE i,
to TYPE i,
END OF t_tab_index.
data : tab type c.
DATA:
e1bpache08 LIKE e1bpache08,
e1bpacgl08 LIKE e1bpacgl08,
e1bpaccr08 LIKE e1bpaccr08.
DATA: g_subrc TYPE subrc.
DATA: g_file TYPE string.
DATA: g_segname TYPE edilsegtyp.
DATA: g_sdata TYPE edi_sdata.
DATA: g_first_doc.
DATA: i_dataf TYPE char2000 OCCURS 900 WITH HEADER LINE,
i_dataf_doc TYPE char2000 OCCURS 50 WITH HEADER LINE.
DATA: g_tab_index TYPE t_tab_index OCCURS 100 WITH HEADER LINE.
DATA: i_accountgl TYPE bapiacgl08 OCCURS 100 WITH HEADER LINE,
i_curramnt TYPE bapiaccr08 OCCURS 100 WITH HEADER LINE,
i_return TYPE bapiret2 OCCURS 10 WITH HEADER LINE,
g_docheader TYPE bapiache08.
*/ ======================== SELECTION ================================ *
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-010.
PARAMETERS: excelf TYPE file_name LOWER CASE
DEFAULT 'C:my_excel_file.txt'.
SELECTION-SCREEN END OF BLOCK b1.
*/ =========================== CORE ================================== *
START-OF-SELECTION.
*/ Call text File with GUI_UPLOAD
g_file = excelf.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = g_file
* FILETYPE = 'ASC'
* HAS_FIELD_SEPARATOR = ' '
* HEADER_LENGTH = 0
* READ_BY_LINE = 'X'
* IMPORTING
* FILELENGTH =
* HEADER =
TABLES
data_tab = i_dataf
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17
IF sy-subrc <> 0.
write: / Text-032.
stop.
ENDIF.
*/ Initialisation
write tabx to tab. " required as of ABAP 610 split cannot
*/ have mixed char and byte types
CLEAR g_tab_index.
REFRESH g_tab_index.
*/ how to process several doc : detecting docs in i_dataf
g_first_doc = on.
LOOP AT i_dataf.
CLEAR: g_segname, g_sdata.
SPLIT i_dataf AT tab INTO g_segname g_sdata.
CHECK: g_segname = c_e1bpache08,
sy-tabix > 1.
*/ 1st document
IF g_first_doc = on.
g_tab_index-from = 1.
g_tab_index-to = sy-tabix - 1.
APPEND g_tab_index.
*/ Next Documents
ELSE.
g_tab_index-from = g_tab_index-to + 1.
g_tab_index-to = sy-tabix - 1.
APPEND g_tab_index.
ENDIF.
g_first_doc = off.
ENDLOOP.
*/ Last doc.
g_tab_index-from = g_tab_index-to + 1.
g_tab_index-to = sy-tfill.
APPEND g_tab_index.
*/ Process documents.
loop at g_tab_index.
clear i_dataf_doc.
refresh i_dataf_doc.
append lines of i_dataf from g_tab_index-from
to g_tab_index-to
to i_dataf_doc.
perform process_document.
endloop.
END-OF-SELECTION.
*/ =========================== ROUTINES ============================== *
* FORM process_document *
FORM process_document.
*/ Clearing Memory
CLEAR: g_docheader, i_accountgl, i_curramnt, i_return, g_subrc.
REFRESH: i_accountgl, i_curramnt, i_return.
*/ Checking i_dataf_doc
*/ Mapping dataf => Bapi structures & internal tables
CLEAR g_subrc.
CATCH SYSTEM-EXCEPTIONS conversion_errors = 1.
LOOP AT i_dataf_doc.
CLEAR g_sdata.
SPLIT i_dataf_doc AT tab INTO g_segname g_sdata.
CASE g_segname.
*/ HEADER
WHEN c_e1bpache08.
PERFORM do_split_ache08.
MOVE-CORRESPONDING e1bpache08 TO g_docheader.
IF e1bpache08-doc_date IS INITIAL.
CLEAR g_docheader-doc_date.
ENDIF.
IF e1bpache08-pstng_date IS INITIAL.
CLEAR g_docheader-pstng_date.
ENDIF.
IF e1bpache08-trans_date IS INITIAL.
CLEAR g_docheader-trans_date.
ENDIF.
*/ Account GL
WHEN c_e1bpacgl08.
PERFORM do_split_acgl08.
MOVE-CORRESPONDING e1bpacgl08 TO i_accountgl.
IF e1bpacgl08-pstng_date IS INITIAL.
CLEAR i_accountgl-pstng_date.
ENDIF.
APPEND i_accountgl.
*/ Account Currency & Amounts
WHEN c_e1bpaccr08.
PERFORM do_split_accr08.
MOVE-CORRESPONDING e1bpaccr08 TO i_curramnt.
APPEND i_curramnt.
*/ kick the line if segment name not filled
WHEN space.
*/ Other names => Bad file structure !
WHEN OTHERS.
g_subrc = 2.
ENDCASE.
ENDLOOP. " i_dataf_doc
ENDCATCH.
IF sy-subrc = 1 OR
NOT g_subrc IS INITIAL.
perform message_output using on.
exit.
ENDIF.
*/ Calling the BAPI
CALL FUNCTION 'BAPI_ACC_GL_POSTING_POST'
EXPORTING
documentheader = g_docheader
TABLES
accountgl = i_accountgl
currencyamount = i_curramnt
return = i_return
* EXTENSION1 =
LOOP AT i_return WHERE type CA 'AE'.
g_subrc = 1.
EXIT.
ENDLOOP.
IF NOT g_subrc IS INITIAL.
perform message_output using on.
ELSE.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
* EXPORTING
* WAIT =
* IMPORTING
* RETURN =
perform message_output using off.
ENDIF.
ENDFORM.
*& Form do_split_ACHE08
* text
* --> p1 text
* <-- p2 text
FORM do_split_ache08.
CLEAR e1bpache08.
SPLIT g_sdata AT tab INTO
e1bpache08-obj_type
e1bpache08-obj_key
e1bpache08-obj_sys
e1bpache08-username
e1bpache08-header_txt
e1bpache08-obj_key_r
e1bpache08-comp_code
e1bpache08-ac_doc_no
e1bpache08-fisc_year
e1bpache08-doc_date
e1bpache08-pstng_date
e1bpache08-trans_date
e1bpache08-fis_period
e1bpache08-doc_type
e1bpache08-ref_doc_no
e1bpache08-compo_acc
e1bpache08-reason_rev
ENDFORM. " do_split_ACHE08
*& Form do_split_ACGL08
* text
* --> p1 text
* <-- p2 text
FORM do_split_acgl08.
CLEAR e1bpacgl08.
SPLIT g_sdata AT tab INTO
e1bpacgl08-itemno_acc
e1bpacgl08-gl_account
e1bpacgl08-comp_code
e1bpacgl08-pstng_date
e1bpacgl08-doc_type
e1bpacgl08-ac_doc_no
e1bpacgl08-fisc_year
e1bpacgl08-fis_period
e1bpacgl08-stat_con
e1bpacgl08-ref_key_1
e1bpacgl08-ref_key_2
e1bpacgl08-ref_key_3
e1bpacgl08-customer
e1bpacgl08-vendor_no
e1bpacgl08-alloc_nmbr
e1bpacgl08-item_text
e1bpacgl08-bus_area
e1bpacgl08-costcenter
e1bpacgl08-acttype
e1bpacgl08-orderid
e1bpacgl08-orig_group
e1bpacgl08-cost_obj
e1bpacgl08-profit_ctr
e1bpacgl08-part_prctr
e1bpacgl08-wbs_element
e1bpacgl08-network
e1bpacgl08-routing_no
e1bpacgl08-order_itno
ENDFORM. " do_split_ACGL08
*& Form do_split_ACCR08
* text
* --> p1 text
* <-- p2 text
FORM do_split_accr08.
data: l_filler(100).
CLEAR e1bpaccr08.
SPLIT g_sdata AT tab INTO
e1bpaccr08-itemno_acc
e1bpaccr08-curr_type
e1bpaccr08-currency
e1bpaccr08-currency_iso
e1bpaccr08-amt_doccur
e1bpaccr08-exch_rate
e1bpaccr08-exch_rate_v
l_filler
ENDFORM. " do_split_ACCR08
*& Form message_output
* text
* --> p1 text
* <-- p2 text
FORM message_output using if_error.
data: l_message(200),
l_return type i.
format color 1.
skip.
write: / text-020, g_tab_index-from,
text-021, g_tab_index-to.
skip.
if if_error = on.
write: / icon_red_light as icon, text-030 color 6.
else.
write: / icon_green_light as icon, text-031 color 5.
endif.
describe table i_return lines l_return.
if l_return is initial.
write: / text-032.
endif.
loop at i_return.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
ID = i_return-id
LANG = sy-langu
NO = i_return-number
V1 = i_return-MESSAGE_V1
V2 = i_return-MESSAGE_V2
V3 = i_return-MESSAGE_V3
V4 = i_return-MESSAGE_V4
IMPORTING
MSG = l_message
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2
check sy-subrc = 0.
write: / l_message.
endloop.
ENDFORM. " message_output
regards
vijay -
Hi All,
I need bapi which can create document for transaction FB60 and later we can do the commit explicitly. we need to upload
*HEADER *
BESG-LIFNR, BKPF-BLDAT, BKPF-BUDAT, INVFO-WRBTR,
BKPF-BUKRS, BKPF-WAERS, BKPF-XBLNR, BSEG-MWSKZ,
BKPF-BKTXT, INVFO-ZFBDT, INVFO-ZTERM
LINE ITEM
BSEG-HKONT, BSEG-SGTXT, BSEG-WRBTR, BSEG-MWSKZ, BSEG-TXJCD, BSEG-KOSTL, BSEG-KSTRG,
BSEG-MATNR, BSEG-MENGE, BSEG-MEINS
i know one bapi BAPI_ACC_INVOICE_RECEIPT_POST but i am not able to pass the value of vendor as a header data on this bapi. please suggest.
Thanks,
MadhuI have one BAPI API_ACC_INVOICE_RECEIPT_POST, i think i hcan use this BAPI for my requirement but while posting the data i am getting errors :
1. Required field AMT_BASE was not transferred in parameter CURRENCYAMOUNT
2. Required field ACCT_KEY was not transferred in parameter ACCOUNTTAX
In the excel sheet these two fields data is not given, then how can i pass the values in these two fileds.
Please reply,
Thanks -
Hi,
Please tell me BAPI for post Tax Amount.
Which tcode use for Post tax code, is it FB01 or FB60.
Regards
JanaHi,
Use BAPI_ACC_DOCUMENT_POST
TCodes
FB41 Post Tax Payable
FB05 Post with Clearing
FB01 Post Document
Edited by: Neenu Jose on Nov 18, 2008 1:15 PM
Edited by: Neenu Jose on Nov 18, 2008 1:16 PM
Edited by: Neenu Jose on Nov 18, 2008 1:17 PM
Edited by: Neenu Jose on Nov 18, 2008 1:18 PM -
BAPI for TOCE : FF68 - Posting Incoming Payments from Customers
Hi,
Can anybody provide me if there is any BAPI for the transaction FF68 : Posting Incoming Payments from Customers?
Cheers,
Yash KHi,
OBZT just controls the display of the various tax codes in the drop down list if MIRO/ FB60 etc.
You need to maintain the atx coe correctly in FBZP. Go to FBZP and in this tax code and check whether the tax rates etc. have been defined correctly for it.
Regards,
SDNer -
BAPI for Open production orders
Hi All,
Any BAPI for open production orders?.... Using BAPI i want to upload open production orders informatiomations.... Please help
Thanks & Regards
SanthoshHi,
Please check the following BAPI,
Goto BAPI tcode, select hierarchical tab
Production orders,ProductionOrder ,ProdOrdConfirmation , RCVPRORDCF and check the BAPIs -
Hi!
Can anyone let me know where to find the bapi for open po and how to use it in my report program.
Thanks in advance.
Note: Mr Anji Reddy vangala has answered me for which iam very much thankful to him, but i need to know about the concerned bapi.
Regards,
Parwez.Hi,
Refer the sample code below which creats PO using BAPI_PO_CREATE1.
Hope this helps your querry.
*& Report YDM_PO_CREATE *
REPORT ydm_po_create.
*-- Input File Declaration
TYPES: BEGIN OF ty_input_file,
column1 TYPE char50,
column2 TYPE char50,
column3 TYPE char50,
column4 TYPE char50,
column5 TYPE char50,
column6 TYPE char50,
column7 TYPE char50,
column8 TYPE char50,
column9 TYPE char50,
column10 TYPE char50,
column11 TYPE char50,
column12 TYPE char50,
column13 TYPE char50,
column14 TYPE char50,
column15 TYPE char50,
column16 TYPE char50,
column17 TYPE char50,
column18 TYPE char50,
END OF ty_input_file.
DATA: i_input_file TYPE STANDARD TABLE OF ty_input_file,
wa_input_file TYPE ty_input_file.
CONSTANTS: c_path TYPE char20 VALUE 'C:\',
c_mask TYPE char9 VALUE ',*.*,*.*.',
c_mode TYPE char1 VALUE 'O',
c_filetype TYPE char10 VALUE 'ASC',
c_x TYPE char01 VALUE 'X'.
PARAMETERS : p_fname LIKE rlgrap-filename.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fname.
*-- Browse Presentation Server
PERFORM f4_presentation_file.
START-OF-SELECTION..
*-- Read presentation server file
PERFORM f1003_upload_file.
IF NOT i_input_file[] IS INITIAL.
PERFORM split_data.
ENDIF.
*& Form f4_presentation_file
*& F4 Help for presentation server
FORM f4_presentation_file .
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
def_path = c_path
mask = c_mask
mode = c_mode
title = text-001
IMPORTING
filename = p_fname
EXCEPTIONS
inv_winsys = 1
no_batch = 2
selection_cancel = 3
selection_error = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " f4_presentation_file
*& Form f1003_upload_file
*& Upload File
FORM f1003_upload_file .
DATA: lcl_filename TYPE string.
lcl_filename = p_fname.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = lcl_filename
filetype = c_filetype
has_field_separator = c_x
TABLES
data_tab = i_input_file
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
EXIT.
ENDIF.
ENDFORM. " f1003_upload_file
*& Form split_data
Collect data for creating Purchase Order
FORM split_data .
DATA: i_poitem TYPE STANDARD TABLE OF bapimepoitem,
i_poitemx TYPE STANDARD TABLE OF bapimepoitemx,
i_poitem_sch TYPE STANDARD TABLE OF bapimeposchedule,
i_poitem_schx TYPE STANDARD TABLE OF bapimeposchedulx,
i_acct_*** TYPE STANDARD TABLE OF bapimepoaccount,
i_acct_assx TYPE STANDARD TABLE OF bapimepoaccountx,
i_services TYPE STANDARD TABLE OF bapiesllc ,
i_srvacc TYPE STANDARD TABLE OF bapiesklc,
i_return TYPE STANDARD TABLE OF bapiret2,
wa_header TYPE bapimepoheader,
wa_headerx TYPE bapimepoheaderx,
wa_poitem TYPE bapimepoitem,
wa_poitemx TYPE bapimepoitemx,
wa_poitem_sch TYPE bapimeposchedule,
wa_poitem_schx TYPE bapimeposchedulx,
wa_acct_*** TYPE bapimepoaccount,
wa_acct_assx TYPE bapimepoaccountx,
wa_services TYPE bapiesllc,
wa_srvacc TYPE bapiesklc,
wa_return TYPE bapiret2,
ws_po TYPE bapimepoheader-po_number.
break gbpra8.
wa_services-pckg_no = 10.
wa_services-line_no = 1.
wa_services-outl_no = '0'.
wa_services-outl_ind = c_x.
wa_services-subpckg_no = 20.
APPEND wa_services TO i_services.
wa_srvacc-pckg_no = 10.
wa_srvacc-line_no = 1.
wa_srvacc-serno_line = 01.
wa_srvacc-serial_no = 01.
wa_srvacc-percentage = 100.
APPEND wa_srvacc TO i_srvacc.
LOOP AT i_input_file INTO wa_input_file.
IF wa_input_file-column2 EQ 'HD'.
wa_header-doc_type = wa_input_file-column3.
wa_header-creat_date = sy-datum.
wa_header-created_by = sy-uname.
wa_header-vendor = wa_input_file-column4.
PERFORM conversion_output USING wa_header-vendor
CHANGING wa_header-vendor.
wa_header-comp_code = 'DE03'.
wa_header-purch_org = 'DE03'.
wa_header-pur_group = 'DE1'.
wa_header-vper_start = wa_input_file-column9.
wa_header-vper_end = wa_input_file-column10.
wa_headerx-comp_code = c_x.
wa_headerx-doc_type = c_x.
wa_headerx-creat_date = c_x.
wa_headerx-created_by = c_x.
wa_headerx-vendor = c_x.
wa_headerx-purch_org = c_x.
wa_headerx-pur_group = c_x.
wa_headerx-vper_start = c_x.
wa_headerx-vper_end = c_x.
ENDIF.
IF wa_input_file-column2 EQ 'IT'.
wa_poitem-po_item = wa_input_file-column3.
wa_poitem-short_text = wa_input_file-column6.
wa_poitem-plant = wa_input_file-column8.
wa_poitem-quantity = '1'.
wa_poitem-tax_code = 'V0'.
wa_poitem-item_cat = 'D'.
wa_poitem-acctasscat = 'K'.
wa_poitem-matl_group = wa_input_file-column7.
wa_poitem-pckg_no = '10'.
APPEND wa_poitem TO i_poitem .
wa_poitemx-po_item = wa_input_file-column3.
wa_poitemx-po_itemx = c_x.
wa_poitemx-short_text = c_x.
wa_poitemx-plant = c_x.
wa_poitemx-quantity = c_x.
wa_poitemx-tax_code = c_x.
wa_poitemx-item_cat = c_x.
wa_poitemx-acctasscat = c_x.
wa_poitemx-matl_group = c_x.
wa_poitemx-pckg_no = c_x.
APPEND wa_poitemx TO i_poitemx.
wa_poitem_sch-po_item = wa_input_file-column3.
wa_poitem_sch-delivery_date = sy-datum.
APPEND wa_poitem_sch TO i_poitem_sch.
wa_poitem_schx-po_item = wa_input_file-column3.
wa_poitem_schx-po_itemx = c_x.
wa_poitem_schx-delivery_date = c_x.
APPEND wa_poitem_schx TO i_poitem_schx.
wa_acct_***-po_item = 10.
wa_acct_***-serial_no = 01.
wa_acct_***-gl_account = '0006360100'.
wa_acct_***-co_area = '1000'.
wa_acct_***-costcenter = 'KC010000'.
APPEND wa_acct_*** TO i_acct_***.
wa_acct_***-po_item = 10.
wa_acct_***-serial_no = 02.
wa_acct_***-gl_account = '0006360100'.
wa_acct_***-co_area = '1000'.
wa_acct_***-costcenter = 'KC010000'.
APPEND wa_acct_*** TO i_acct_***.
wa_acct_assx-po_item = 10.
wa_acct_assx-serial_no = 01.
wa_acct_assx-po_itemx = c_x.
wa_acct_assx-serial_nox = c_x.
wa_acct_assx-gl_account = c_x.
wa_acct_assx-co_area = c_x.
wa_acct_assx-costcenter = c_x.
APPEND wa_acct_assx TO i_acct_assx.
wa_acct_assx-po_item = 10.
wa_acct_assx-serial_no = 02.
wa_acct_assx-po_itemx = c_x.
wa_acct_assx-serial_nox = c_x.
wa_acct_assx-gl_account = c_x.
wa_acct_assx-co_area = c_x.
wa_acct_assx-costcenter = c_x.
APPEND wa_acct_assx TO i_acct_assx.
wa_services-pckg_no = 20.
wa_services-line_no = 2.
wa_services-service = wa_input_file-column9.
wa_services-quantity = '100'.
wa_services-gr_price = '100'.
wa_services-userf1_txt = wa_input_file-column13.
APPEND wa_services TO i_services.
wa_srvacc-pckg_no = 20.
wa_srvacc-line_no = 1.
wa_srvacc-serno_line = 02.
wa_srvacc-serial_no = 02.
wa_srvacc-percentage = 100.
APPEND wa_srvacc TO i_srvacc.
ENDIF.
ENDLOOP.
CALL FUNCTION 'BAPI_PO_CREATE1'
EXPORTING
poheader = wa_header
poheaderx = wa_headerx
POADDRVENDOR =
TESTRUN =
MEMORY_UNCOMPLETE =
MEMORY_COMPLETE =
POEXPIMPHEADER =
POEXPIMPHEADERX =
VERSIONS =
NO_MESSAGING =
NO_MESSAGE_REQ =
NO_AUTHORITY =
NO_PRICE_FROM_PO =
IMPORTING
exppurchaseorder = ws_po
EXPHEADER =
EXPPOEXPIMPHEADER =
TABLES
return = i_return
poitem = i_poitem
poitemx = i_poitemx
POADDRDELIVERY =
poschedule = i_poitem_sch
poschedulex = i_poitem_schx
poaccount = i_acct_***
POACCOUNTPROFITSEGMENT =
poaccountx = i_acct_assx
POCONDHEADER =
POCONDHEADERX =
POCOND =
POCONDX =
POLIMITS =
POCONTRACTLIMITS =
poservices = i_services
posrvaccessvalues = i_srvacc
POSERVICESTEXT =
EXTENSIONIN =
EXTENSIONOUT =
POEXPIMPITEM =
POEXPIMPITEMX =
POTEXTHEADER =
POTEXTITEM =
ALLVERSIONS =
POPARTNER =
break gbpra8.
LOOP AT i_return INTO wa_return.
ENDLOOP.
ENDFORM. " split_data
*& Form conversion_output
Conversion exit input
FORM conversion_output USING p_ip
CHANGING p_op.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = p_ip
IMPORTING
output = p_op.
ENDFORM. " conversion_output
<b>Reward points if this helps.
Manish</b>
Maybe you are looking for
-
My photos are missing/hidden after i updated to ios 6
i have an ipod touch that had a cracked screen for several months so i didn't use it until i fixed it. after about 4 months i charged it and cut it back on to find that it was disabled and i had to wait 731 minutes before i could put in my passcode.
-
Lead Creation Error thro ABAP Code
Hi CRM ABAP Experts, I have written a code for lead creation by referring SDN Code. when i execute code , lead is created and transaction get saved in to system. but atlast one error comes. plz help me. when i pass testrun = 'X' then i am not getti
-
Transferring Styles in Excel to another PC.
I understand that when you set set up Styles for a specific cube in an Excel spreadsheet that the style information is saved in the registry of the local machine. We have a situation where we want to give the Excel spreadsheet to several users and ha
-
Help/Tutorial on Using Xpress with Java
Hi forum: Can anyone point me to a tutorial or article on how to use Java method from Xpress (in NetBeans). I have created a java class in the 'Custom Java' folder for the IDM prodject in Netbeans - I am not terribly sure what next steps to take.
-
Adobe Flash 10 64 bits has been released by Adobe
This Post Has Been Deleted Due To Huge Embarrassment. Last edited by milasch (2010-02-17 17:44:56)