Document on BAPI
Hi,
Can anyone please provide me a good document on BAPI ?
Thanks in advance.
Regards
Indrajit
Message was edited by: Indrajit Chakraborti
hi,
chk these links.
http://help.sap.com/saphelp_46c/helpdata/en/9b/417f07ee2211d1ad14080009b0fb56/frameset.htm
http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
Checkout !!
http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
http://techrepublic.com.com/5100-6329-1051160.html#
http://www.sap-img.com/bapi.htm
http://www.sap-img.com/abap/bapi-conventions.htm
http://www.sappoint.com/abap/bapiintro.pdf
and pls give ur email id.
i will send some soft copies.
rgrds
anver
if hlped mark points
Similar Messages
-
Dear Experts,
My scenario is:
We have batch split scenario, where the parent line item of billing document has 0 quantity and its subsequent item (item with batch number) holds actual quantity data.
When we create billing document using VF01 against delivery document, system creates billing document along with excise invoice document (J1IIN Document). And in excise document contain same number of line items that of billing document. Please see the below attachment:
Biiling document screen shot:
While creating billing document, the J1IIN Document created automatically. Below is the screen-shot for the same.
Now the issue is:
When we create billing document using BAPI: BAPI_BILLINGDOC_CREATEMULTIPLE system creating only billing document and not creating excise invoice document.
When we create excise document manually using J1IIN the zero quantity line items are excluded in excise invoice document.
Please see the below screen-shot for the same; The z quantity line items are missing.
We want excise document to be created while creating billing document using BAPI BAPI_BILLINGDOC_CREATEMULTIPLE. Or is there any other BAPI for the same purpose.
Customization is also maintained for creating excise invoice document automatically.
Regards,
Rajesh Sadula.HI
Pricing will be carried basing on the pricing
procedure.
Case1: Prices will be carried out automatically if
necessary condition records are maintained for the
condition type.
For this you can go to Sales Order-> Item Conditions
In the screen you can click on command button Analysis,
which gives you the list of condition types associated
to the pricing procedure. By clicking on the condition
type you can know the action that has taken place.
Case2: Manually forcing prices for Items.
To do this, you have to populate ORDER_CONDITIONS_IN &
ORDER_CONDITIONS_INX. Also note to identify the item
numbers, you manually pass the item number for each item
in the sales order, use the same item number for
populating conditions.
Parameters required:
ORDER_CONDITIONS_IN:
ITM_NUMBER, COND_TYPE, COND_VALUE, CURRENCY
ORDER_CONDITIONS_INX:
ITM_NUMBER, COND_TYPE, UPDATEFLAG, COND_VALUE,CURRENCY.
Hope the above info helps you. Do revert back if you
need more info.
Kind Regards
Eswar -
Issue in posting a accounting document using BAPI BAPI_ACC_DOCUMENT_POST
Hi All,
I 'm able to post a document using BAPI ' BAPI_ACC_DOCUMENT_POST ' but the problem i face is the header text is not getting updated for the document that is getting posted. Even though i'm populating the header text in the parameters i'm passing to the BAPI.
Any pointers to this would be highly appreciated.
Regards,
ChaitanyaHi,
put a break in subroutine FORM fill_acchd
and execute the bapi.
Here you have:
CLEAR gs_acchd.
MOVE-CORRESPONDING gs_aw TO gs_acchd.
gs_acchd-usnam = gs_bapi_acchd-username.
gs_acchd-awsys = gs_bapi_acchd-obj_sys.
gs_acchd-bktxt = gs_bapi_acchd-header_txt."---->¡¡¡CHECK THIS!!!
gs_acchd-glvor = gs_bapi_acchd-bus_act.
gs_acchd-tcode = sy-tcode.
gs_acchd-acc_principle = gs_bapi_acchd-acc_principle.
Check if there is something wrong there.
Best regards -
How to update Assignment field in Accounting Document through BAPI ?
I need to change Assignment field in already posted accounting document through bapi or some other automatic method. Please tell me exactly which bapi I should use and how can I pass the changed assignment field?
Hey,
I couldnt find any BAPIs which update an accounting document. I think the safest way is to record FB02 and use BDC/Call Transaction.
-Kiran
*Please reward useful answers -
Creating a sales document using BAPI in web dynpro by uploading a file
Hi ALL,
Can some one help me how to create a sales document using BAPI by uploading a file as input...Can someone provide me a sample program....
Thanks n Regards,
Praveenn.
Edited by: praveenn on Aug 23, 2011 12:42 PMHi Sri,
Thx for the response...
Here is the code that i followed for creating a BAPI_SALESORDER_CREATE1 by uploading a text file as input.
Just create a Attribute in the VIEW CONTEXT of type String.
method ONACTIONCREATE_SO .
types : Begin of ty_data,
sales_org type vkorg,
doc_type type AUART,
DISTR_CHAN type VTWEG,
DIVISION type spart,
material type matnr,
partn_role type PARVW,
PARTN_NUMB type kunnr,
end of ty_data.
DATA :it_table TYPE TABLE OF ty_data,
i_data TYPE TABLE OF string,
l_string TYPE string,
wa_table TYPE ty_Data,
l_xstring TYPE xstring,
fields TYPE string_table,
lv_field TYPE string.
DATA: wa_order_header_in TYPE BAPISDHD1,
it_order_items_in TYPE TABLE OF BAPISDITM,
wa_order_items_in TYPE BAPISDITM,
it_order_partners TYPE TABLE OF BAPIPARNR,
wa_order_partners TYPE BAPIPARNR,
it_return TYPE TABLE OF BAPIRET2,
wa_return TYPE BAPIRET2.
DATA : sales_doc type bapivbeln-vbeln.
DATA:
node_zfinal_node TYPE REF TO if_wd_context_node,
elem_zfinal_node TYPE REF TO if_wd_context_element,
stru_zfinal_node TYPE if_main_view=>element_zfinal_node .
get single attribute
wd_context->get_attribute(
EXPORTING
name = 'DATASOURCE'
IMPORTING
value = l_xstring ).
CALL FUNCTION 'HR_KR_XSTRING_TO_STRING'
EXPORTING
in_xstring = l_xstring
IMPORTING
out_string = l_string.
SPLIT l_string AT cl_abap_char_utilities=>newline INTO TABLE i_data.
LOOP AT i_data INTO l_string.
SPLIT l_string AT cl_abap_char_utilities=>horizontal_tab INTO TABLE fields.
READ TABLE fields INTO lv_field INDEX 1.
wa_table-sales_org = lv_field.
READ TABLE fields INTO lv_field INDEX 2.
wa_table-doc_type = lv_field.
READ TABLE fields INTO lv_field INDEX 3.
wa_table-DISTR_CHAN = lv_field.
READ TABLE fields INTO lv_field INDEX 4.
wa_table-DIVISION = lv_field.
READ TABLE fields INTO lv_field INDEX 5.
wa_table-material = lv_field.
READ TABLE fields INTO lv_field INDEX 6.
wa_table-partn_role = lv_field.
READ TABLE fields INTO lv_field INDEX 7.
wa_table-partn_numb = lv_field.
APPEND wa_table TO it_table.
ENDLOOP.
loop at it_table into wa_table.
clear : wa_order_header_in.
wa_order_header_in-sales_org = wa_table-sales_org.
wa_order_header_in-doc_type = wa_table-doc_type.
wa_order_header_in-distr_chan = wa_table-distr_chan.
wa_order_header_in-division = wa_table-division.
clear : wa_order_items_in.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = wa_table-material
IMPORTING
OUTPUT = wa_order_items_in-material.
*wa_order_items_in-req_qty = wa_table-req_qty.
append wa_order_items_in to it_order_items_in.
clear : wa_order_partners.
wa_order_partners-partn_role = wa_table-partn_role.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = wa_table-partn_numb
IMPORTING
OUTPUT = wa_order_partners-partn_numb
*wa_order_partners-partn_numb = wa_table-partn_numb.
append wa_order_partners to it_order_partners.
endloop.
CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
EXPORTING
SALESDOCUMENTIN =
order_header_in = wa_order_header_in
ORDER_HEADER_INX =
SENDER =
BINARY_RELATIONSHIPTYPE =
INT_NUMBER_ASSIGNMENT =
BEHAVE_WHEN_ERROR =
LOGIC_SWITCH =
TESTRUN =
CONVERT = ' '
IMPORTING
SALESDOCUMENT = sales_doc
tables
RETURN = it_return
ORDER_ITEMS_IN = it_order_items_in
ORDER_ITEMS_INX =
order_partners = it_order_partners.
ORDER_SCHEDULES_IN =
get message manager
DATA: l_current_controller TYPE REF TO if_wd_controller,
l_message_manager TYPE REF TO if_wd_message_manager.
l_current_controller ?= wd_this->wd_get_api( ).
DATA: v_message_text TYPE string.
When Sales Order is created commit the data
IF NOT sales_doc IS INITIAL.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING wait = 'X'.
CONCATENATE 'Sales Document' sales_doc 'has been created.' INTO v_message_text SEPARATED BY space.
Report Success message
CALL METHOD l_message_manager->report_success
EXPORTING
message_text = v_message_text.
ELSE.
v_message_text = 'Error Creating Sales Order'.
Report Error message
CALL METHOD l_message_manager->report_error_message
EXPORTING
message_text = v_message_text.
ENDIF.
endmethod.
Edited by: praveenn on Aug 30, 2011 2:41 PM -
Create reversal document with BAPI: BAPI_ACC_DOCUMENT_POST.
Hi Guys,
I am Create reversal document with BAPI: BAPI_ACC_DOCUMENT_POST.First I am post financial document with BAPI BAPI_ACC_DOCUMENT_POST and Same Document. i am Reversal with same BAPI 'BAPI_ACC_DOCUMENT_POST'.
New reversal docment is created. but posting key are not changingin reversal docment.whatever posting key created in posting same posting key are created while reversal also.Please help mecheck
Mapping of POSTING KEY in BAPI_ACC_DOCUMENT_POST -
How to create shipment cost document through BAPI?
Hi SAP Guru,
My requirement is to create shipment cost document through BAPI.
Is there any standard BAPI to create Shipment cost documents? If any buddy no please help me out.I am in client place i have find out the solution..
Thanks & Regards,
Pankaj SinhaHi Pankaj,
See the following link for more help.
IDOC/BAPI for changing Shipment cost number/document
Regards -
Unable to transfer post the document using BAPI "BAPI_GOODSMVT_CREATE"
Hi Experts,
I am unable to post the document using BAPI "BAPI_GOODSMVT_CREATE", getting error "_Sales order stock --- does not exist_"
details are stated below:
GM_CODE : 04, it is working fine for the scenario with same saleorder number and line item, but when i give same sale order number and different line item, then i am getting the above error.
Example : Posting from Saleorder A with line item 100 to saleorder A with lineitem 100 its working fine, but when we are posting
from Saleorder A with lineitem 100 to saleorder A with line item 200 it is not working.
Also When I trying to do with the transaction MB1B manually, it is working fine. kindly suggest me.
Needed Urgently....
Appreciate for you early response.
Regards,
Sathya.
Edited by: Sathyanarayana Raghavendra on May 6, 2010 1:00 PMHi,
Hi Did you call Function BAPI_TRANSACTION_COMMIT' after calling the BAPI. ?
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = c_x.
Regards,
Jovito. -
Problem while posting FI document through BAPI - Multiple Exchange Rates
I am able to post FI document with multiple exchange rates for the same currency using FB01. But, when I try to post the same document details using BAPI_ACC_DOCUMENT_POST , it throws an error F5 701 - Inconsistent Rate for Currency XXX .
How can we avoid this error while posting through BAPI ?
Thanks & Regards,
NidhiHi Nidhi,
Value range
The field CURR_TYPE (currency type) describes the role played by a
currency in the SAP System.
The currency type can take on the following values, for example:
o 00 Transaction currency
o 10 Company code currency
o 20 Controlling area currency
o 30 Group currency
o 40 Hard currency
o 50 Index-based currency
o 60 Global company currency
If an entry is not made in the field CURR_TYPE, the default value "00"
is retained.
If only one data record is transferred in transaction currency for each
line item, the field CURR_TYPE does not need to be filled out. If
several data records are transferred for each line item, the currency
type must be entered for each record.
If the parameter CurrencyAmount is filled with the currency fields,
a complete document check including characteristics and value
components of profitability analysis (CO-PA). Otherwise, the account
assignment objects are checked.
Check the BAPI documentation SE37.
Regards,
Boobalan Suburaj -
F-22, Need to upload the document using BAPI
we have requirement to use BAPI for uploading document to f-22,
For the BAPI when we input data all the data are correctly posted except posting keys,
Our requirement is to use the customized posting for crediting customer and standard posting key for debiting GL account,
We have input the required posting key in BAPI but still its not picking the posting key, its taking the standard posting key,
Document type used is DC and DB,
so is there any relation between document type and posting key, any idea from where BAPI is picking Posting key?Hello,
it was originally not intended to use the BAPI to post
payment documnents. For simplicity the posting keys are not
at the BAPI's interface, instead they are defaulted with
the standard posting keys depending on account type and debit/credit
indicator.
Please see note 487722 which explains how to pass addditional data
to the BAPI in parameter EXTENSION1. You can implement the
Business Transaction Event (BTE) RWBAPI01 to populate the posting
key (t_accit-bschl) from EXTENSION1 parameter.
I hope this helps!
BR,
Raquel -
Hi,
Could you please let me know BAPI for document's contents deletion in DMS
Thanks
Moderator message: please (re)search yourself before asking.
Edited by: Thomas Zloch on Jul 12, 2010 2:55 PMHi,
I thought you want to delete the document.... OK..
If you want to delete the originals, please check the below link(answers given by me)
[Re: Search for a function module for deleting document originals (DMS)] -
How to create matreial document for ten line items (10 documents) by BAPI
Hi
how to create matreial document for ten line items (10 documents) by BAPI_goodsmvt_create
i created but it gives error as "no ites were transferre
and i need code also.
thanks in advancePrabhu Peram wrote:>
> >
Gareth @ Atos Origin UK wrote:
> > Prabhu,
> >
> > You have been on SDN a long time and have a decent amount of points - why do you feel the need to simply cut and paste standard SAP documentation? _-----> I least bother abt the Points, and i never ask somebody to give points to me , if u have any doubt on it , u can check all my postings ? All it does is fill up the SDN servers with replicated data which the original poster could quite easily access themselves via SE37----> Sorry I have seen ur Posting/Reply,dont assume that i do copy & paste for sake of Points.Njoy SAP.>
> > Gareth.
>
>
>
> regards
> Prabhu
Prabhu.
I didn't question you about points at all - I was making the point that you have been on SDN a long time and have a lot of points. Therefore you should know better than to simply cut and paste standard SAP help. If you don't copy and paste for sake of points, what do you do it for? It serves no purpose other than to fill up the servers here on SDN. The original poster appears to have access to a SAP system and SE37 and wants to know how to call a BAPI - they can easily go to SE37 and read the documentation themselves. Posting it here just adds noise and makes searching harder, as well as taking up more and more space on SDN servers.
Gareth. -
Posting the Document using BAPI
Hi All,
We have posted document manually using 'FB01' tranasaction.But we are unable to post document through 'BAPI_ACC_DOCUMENT_POST'.we are getting errors like ''FI/CO interface: Line item entered several times''.can anybody send me the sample code for posting document.
Thank You,
Anupama.Hi,
In the tables passed to the BAPI : accountgl, accountreceivable, accounttax and so on - you need to use a unique item number (position number, field itemno_acc) for each item.
There is a standard SAP report with instruction how to use that BAPI: porgram ACC_BAPI_TEST_DOCUMENT .
good luck -
Accounting: Document Posting BAPI's
Guru's,
I'm using the following BAPI to post Vendor and Customer Document Posting.
BAPI_ACC_DOCUMENt_POST.
But the problem is, we are not able to pass the Posting Key in this BAPI.we tried many scenarios, but we are failed in all the ways.
Could you guys give me if there is any other BAPI which do the same operation as BAPI_ACC_DOCUMENT_POST.
Please advice me on this, i want to use only BAPI's to do this.
Thanks in advance.
Regards,
Adi.Hi,
see this:
Re: BAPI FUNCTION MODULE BAPI_ACC_DOCUMENT_POST : How to give posting keys
regards
Arjun -
Need Code For PO-GR through MiGO for multiple documents through BAPI
Hi All
Im using BAPI_GOODSMVT_CREATE to post goods for PO-GR.
When im posting multiple documents its giving error.
When im posting individually, it's working fine.
Please send me the code for PO-GR through BAPI.
Urgently required.
Regards,
SImha.Is this not working???
BAPI_GOODSMVT_CREATE to post Goods Movement
The following is an abap program making used of the BAPI function BAPI_GOODSMVT_CREATE to do Goods Receipts for Purchase Order after importing the data from an external system.
BAPI TO Upload Inventory Data
GMCODE Table T158G - 01 - MB01 - Goods Receipts for Purchase Order
02 - MB31 - Goods Receipts for Prod Order
03 - MB1A - Goods Issue
04 - MB1B - Transfer Posting
05 - MB1C - Enter Other Goods Receipt
06 - MB11
Domain: KZBEW - Movement Indicator
Goods movement w/o reference
B - Goods movement for purchase order
F - Goods movement for production order
L - Goods movement for delivery note
K - Goods movement for kanban requirement (WM - internal only)
O - Subsequent adjustment of "material-provided" consumption
W - Subsequent adjustment of proportion/product unit material
report zbapi_goodsmovement.
parameters: p-file like rlgrap-filename default
'c:\sapdata\TEST.txt'.
parameters: e-file like rlgrap-filename default
'c:\sapdata\gdsmvterror.txt'.
parameters: xpost like sy-datum default sy-datum.
data: begin of gmhead.
include structure bapi2017_gm_head_01.
data: end of gmhead.
data: begin of gmcode.
include structure bapi2017_gm_code.
data: end of gmcode.
data: begin of mthead.
include structure bapi2017_gm_head_ret.
data: end of mthead.
data: begin of itab occurs 100.
include structure bapi2017_gm_item_create.
data: end of itab.
data: begin of errmsg occurs 10.
include structure bapiret2.
data: end of errmsg.
data: wmenge like iseg-menge,
errflag.
data: begin of pcitab occurs 100,
ext_doc(10), "External Document Number
mvt_type(3), "Movement Type
doc_date(8), "Document Date
post_date(8), "Posting Date
plant(4), "Plant
material(18), "Material Number
qty(13), "Quantity
recv_loc(4), "Receiving Location
issue_loc(4), "Issuing Location
pur_doc(10), "Purchase Document No
po_item(3), "Purchase Document Item No
del_no(10), "Delivery Purchase Order Number
del_item(3), "Delivery Item
prod_doc(10), "Production Document No
scrap_reason(10), "Scrap Reason
upd_sta(1), "Update Status
end of pcitab.
call function 'WS_UPLOAD'
exporting
filename = p-file
filetype = 'DAT'
IMPORTING
FILELENGTH =
tables
data_tab = pcitab
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
OTHERS = 6
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.
gmhead-pstng_date = sy-datum.
gmhead-doc_date = sy-datum.
gmhead-pr_uname = sy-uname.
gmcode-gm_code = '01'. "01 - MB01 - Goods Receipts for Purchase Order
loop at pcitab.
itab-move_type = pcitab-mvt_type.
itab-mvt_ind = 'B'.
itab-plant = pcitab-plant.
itab-material = pcitab-material.
itab-entry_qnt = pcitab-qty.
itab-move_stloc = pcitab-recv_loc.
itab-stge_loc = pcitab-issue_loc.
itab-po_number = pcitab-pur_doc.
itab-po_item = pcitab-po_item.
concatenate pcitab-del_no pcitab-del_item into itab-item_text.
itab-move_reas = pcitab-scrap_reason.
append itab.
endloop.
loop at itab.
write:/ itab-material, itab-plant, itab-stge_loc,
itab-move_type, itab-entry_qnt, itab-entry_uom,
itab-entry_uom_iso, itab-po_number, itab-po_item,
pcitab-ext_doc.
endloop.
call function 'BAPI_GOODSMVT_CREATE'
exporting
goodsmvt_header = gmhead
goodsmvt_code = gmcode
TESTRUN = ' '
IMPORTING
goodsmvt_headret = mthead
MATERIALDOCUMENT =
MATDOCUMENTYEAR =
tables
goodsmvt_item = itab
GOODSMVT_SERIALNUMBER =
return = errmsg
clear errflag.
loop at errmsg.
if errmsg-type eq 'E'.
write:/'Error in function', errmsg-message.
errflag = 'X'.
else.
write:/ errmsg-message.
endif.
endloop.
if errflag is initial.
commit work and wait.
if sy-subrc ne 0.
write:/ 'Error in updating'.
exit.
else.
write:/ mthead-mat_doc, mthead-doc_year.
perform upd_sta.
endif.
endif.
FORM UPD_STA *
form upd_sta.
loop at pcitab.
pcitab-upd_sta = 'X'.
modify pcitab.
endloop.
call function 'WS_DOWNLOAD'
exporting
filename = p-file
filetype = 'DAT'
IMPORTING
FILELENGTH =
tables
data_tab = pcitab
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
OTHERS = 6
endform.
*--- End of Program
REgards,
Ravi
Maybe you are looking for
-
POWER PIVOT : VBA SCRIPT ON SLICER TO HIDE VALUES
Hi, Can someone help in vba coding to assign to slicer in power pivot report.I have a slicer with blank values coming. i have to hide those blank values. My Model is SSAS tabular model . Since the tabular model wont support outer join these blank va
-
hi all, pls help on my 6600 slide. just got this phone yesterday. but it's out of my expectation. there's a func tapping, but it seems not working at all when i tap on the screen twice or either behind the phone. i had follow on the manual to close t
-
How to make it using JSP??
Hi, Go to http://www.mycgiserver.com/~sterowanie/index.jsp Now write user: qq, password: qq Write something in the text field and push "Szukaj" (this means "search") As you see it connects to google and display results. The problem is that this was d
-
Studio Creator 2 Installation for Mac OSX 10.3.9
i'm new in java and i having problem in studio creator 2 in my iBook Mac OSX 10.3.9. Installation process goes smooth 100%, but an error messenge pop up after uninstall component done... anyone here has same experience to solve the problem? thanks in
-
Will update from Tiger affect Automatic Software Update?
Hi guys. It's my first question here. I purchased a MacBook approx 3 years ago from Apple Store which got Tiger(10.4.11) installed. I would like to update to Snow Leopard because I need to upgrade from Adobe CS3 to CS5. My question is if I buy the Sn