BAPI_BILLINGDOC_CREATEMULTIPLE
Hi,
I am facing a problem while creating a billing document for credimemo.Iam getting an errror "The document is blocked". I have also checked billing block of the document header , it contains blank only. Can anyone help me.
Thanks in advance.
Kiran.
Hi,
I am usingthe Fm to create billing id: BAPI_BILLINGDOC_CREATEMULTIPLE
i am facing a problem while creating a billing document for credimemo.Iam getting an errror "The document is blocked". I have also checked billing block of the document header , it contains blank only. Can anyone help me.
Regards
Kiran.
Similar Messages
-
Billing quantity issue in case of BAPI_BILLINGDOC_CREATEMULTIPLE
Hello Folks,
We have a ‘z’ transaction where we are using BAPI ‘BAPI_BILLINGDOC_CREATEMULTIPLE’ to create Billing Document. However the billing quantity updated in the billing document is ‘0.00’ in the case of document being created using the ‘z’ transaction whereas the correct quantity is updated from the transaction ‘VF01’.
If I change the configuration in VTFL, of billing quantity from ‘B Delivery quantity less invoiced quantity’ to ‘G Cumulative batch quantity minus invoiced quantity’ then the quantity updated from ‘z’ transaction appears correct while the quantity gets doubled in case of ‘VF01’ ie. quantity is updated in both the batches and invoiced item.
Here is the code snippet I have used in my ‘z’ transaction to create the billing document:
LOOP AT gt_item_inv_coll INTO gs_item_inv_coll.
REFRESH : gt_billing.
CLEAR : gv_line_item. gv_line_item = '0'.
LOOP AT gt_item INTO gs_item WHERE vbeln_del = gs_item_inv_coll-vbeln_del .
* IF GS_ITEM-STO_SO_IND = 'STO'.
gv_line_item = gv_line_item + 10.
gs_billing-ordbilltyp = 'ZSTO'.
gs_billing-ref_doc = gs_item-vbeln_del.
gs_billing-ref_item = gv_line_item. " GS_ITEM-EBELP.
gs_billing-doc_number = gs_item-ebeln.
gs_billing-itm_number = gs_item-ebelp.
gs_billing-ref_doc_ca = 'J'.
gs_billing-material = gs_item-matnr.
gs_billing-plant = gs_item-reswk.
APPEND gs_billing TO gt_billing .
CLEAR gs_billing.
ENDLOOP.
REFRESH : gt_bapiret_bill.
CALL FUNCTION 'BAPI_BILLINGDOC_CREATEMULTIPLE'
TABLES
billingdatain = gt_billing
return = gt_bapiret_bill
success = gt_success.
READ TABLE gt_bapiret_bill INTO gs_bapiret_bill WITH KEY type = 'E'.
IF sy-subrc <> 0.
READ TABLE gt_success INTO gs_success INDEX 1.
IF sy-subrc = 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
REFRESH : gt_billing.
LOOP AT gt_item INTO gs_item WHERE vbeln_del = gs_item_inv_coll-vbeln_del .
gs_item-vbeln_bil = gs_success-bill_doc.
MODIFY gt_item FROM gs_item.
* save data to ztable - zmm_weigh_bridge
PERFORM save_data.
READ TABLE gt_item INTO gs_item WITH KEY sel = 'X'.
IF sy-subrc = 0.
MESSAGE s168(ztr) WITH gs_success-bill_doc gs_item-vbeln_del.
ENDIF.
ENDLOOP.
CLEAR gs_item.
ENDIF.
ENDIF.
* ENDIF.
ENDLOOP.
I humbly request you to provide me with possible solution(s).
Thanks & Regards,
ArchieIn customizing of MM-PUR Assign Delivery Type and Checking Rule the document type of the STO is assigned to the delivery document type.
Check if you assigned NLCC or just NL.
NLCC is for cross company while NL is for transfers within one company code. -
BAPI_BILLINGDOC_CREATEMULTIPLE questions
Hi,
1)
Scenario: We have a report that reads a fixed length file, provied by a third party application, populates the BILLINGDATAIN, CONDITIONDATAIN, AND TEXTDATAIN, and calls the BAPI_BILLINGDOC_CREATEMULTIPLE.
Our test data can have multiple line items for a purchase order.
When we test with multiple line items, we get two billing documents. Ideally we want a billing document for a purchase order. But, if we have two consecutave calls to the BAPI_BILLIONGDOC_CREATEMULTIPLE: the first one creates two billing documents for two line items, and the second one creates one billing document for the two linetimes. Does anyone know, why this is happening?
2)We are not able to view the header and line item texts in the billing documents. Does anyone know how to fix this issue?
3)We pass an external Purchase Order number to the SAP, but we can't see the anything under the PO Data tab in the billing document. Does anyone has suggestion on this?
Your help will be greatly appreciated.
Thanks.
Karma W. GhaleHi... If you would post manually in the documents, do you get as well two documents?
In SD, when you create an invoice based on on multiple lines, the copy rules check if within an invoice all main fields are the same...
Example: it will be not possible to add 2 lines with different payment terms etc.. it will split into 2 invoices...
I think you need to check the copy rules... -
BAPI_BILLINGDOC_CREATEMULTIPLE u0096 Duplication of line item in billing docume
Hi All,
I am using BAPI <b>BAPI_BILLINGDOC_CREATEMULTIPLE</b> to create billing document. Creation of billing document is fine, but issue is I am passing individual line item along with <b>quantity</b> to be billed. But whats happening is if I got 3 item line in sales order with quantity 1-3-5, billing document getting created 3 quantity 1, 3 quantity 3 and 3 quantity 5. So I end up with 9 line item on billing document which is incorrect.
Please see the code below which I am using, can anyone tell me what I am doing wrong here. I basically need to create 3 billing line item with respective quantity I pass. Any hint is much appreciated. Thanks in advance.
Regards,
Tim
loop at GT_INIT_ITAB2 into GS_INIT_ITAB2.
select single * into gs_vbak
from vbak
where vbeln = GS_INIT_ITAB2-VBELN.
select single * into gs_vbap
from vbap
where vbeln = GS_INIT_ITAB2-VBELN AND
posnr = GS_INIT_ITAB2-posnr.
select single * into gs_mara
from mara
where matnr = gs_vbap-matnr.
refresh GT_BILLINGDATAIN.
GT_BILLINGDATAIN-SALESORG = gs_vbak-vkorg.
GT_BILLINGDATAIN-DISTR_CHAN = gs_vbak-vtweg.
GT_BILLINGDATAIN-DIVISION = gs_vbak-spart.
GT_BILLINGDATAIN-DOC_TYPE = GS_INIT_ITAB2-auart.
GT_BILLINGDATAIN-ORDBILLTYP = p_fkart.
GT_BILLINGDATAIN-SOLD_TO = GS_INIT_ITAB2-kunnr.
GT_BILLINGDATAIN-ITEM_CATEG = GS_INIT_ITAB2-pstyv.
GT_BILLINGDATAIN-REQ_QTY = GS_INIT_ITAB2-kwmeng.
GT_BILLINGDATAIN-SALES_UNIT = gs_vbap-vrkme.
GT_BILLINGDATAIN-CURRENCY = gs_vbak-waerk.
GT_BILLINGDATAIN-SHORT_TEXT = 'Test'.
GT_BILLINGDATAIN-BILL_DATE = gl_date.
write GS_INIT_ITAB2-afdat to GT_BILLINGDATAIN-BILL_DATE ddmmyy.
GT_BILLINGDATAIN-BILL_DATE = GS_INIT_ITAB2-afdat.
GT_BILLINGDATAIN-PRICE_DATE = SY-DATUM.
GT_BILLINGDATAIN-REF_DOC = GS_INIT_ITAB2-VBELN.
GT_BILLINGDATAIN-DOC_NUMBER = GS_INIT_ITAB2-VBELN.
GT_BILLINGDATAIN-ITM_NUMBER = GS_INIT_ITAB2-POSNR.
GT_BILLINGDATAIN-ORIGINDOC = GS_INIT_ITAB2-VBELN.
GT_BILLINGDATAIN-ITEM = GS_INIT_ITAB2-POSNR.
GT_BILLINGDATAIN-NO_MATMAST = co_x.
GT_BILLINGDATAIN-COUNTRY = 'AUS'.
GT_BILLINGDATAIN-MATERIAL = gl_matnr.
GT_BILLINGDATAIN-TAXCL_1MAT = '1'.
GT_BILLINGDATAIN-REF_DOC_CA = 'C'.
append GT_BILLINGDATAIN.
endloop.
Prepare for BAPI call
CALL FUNCTION 'BAPI_BILLINGDOC_CREATEMULTIPLE'
EXPORTING
CREATORDATAIN = GS_CREATORDATAIN
TESTRUN = co_x
POSTING = co_x
TABLES
BILLINGDATAIN = GT_BILLINGDATAIN
CONDITIONDATAIN = GT_CONDITIONDATAIN
CCARDDATAIN =
TEXTDATAIN =
ERRORS =
RETURN = GT_RETURN
SUCCESS = GT_SUCCESS
clear gl_return.
loop at GT_RETURN.
if GT_RETURN-type EQ 'E' OR
GT_RETURN-type EQ 'A'.
move: GT_RETURN to gl_return.
exit.
endif.
endloop.
if gl_return is initial.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = '1'
IMPORTING
RETURN = gt_return_commit.
endif.Hi,
Check this code...For creating billing document from sales order..
TABLES: vbak.
PARAMETERS: p_vbeln LIKE vbak-vbeln OBLIGATORY,
p_fkart LIKE vbrk-fkart.
DATA:
s_vbsk LIKE vbsk.
DATA:
xkomfk LIKE komfk OCCURS 0 WITH HEADER LINE,
xkomv LIKE komv OCCURS 0 WITH HEADER LINE,
xthead LIKE theadvb OCCURS 0 WITH HEADER LINE,
xvbfs LIKE vbfs OCCURS 0 WITH HEADER LINE,
xvbpa LIKE vbpavb OCCURS 0 WITH HEADER LINE,
xvbrk LIKE vbrkvb OCCURS 0 WITH HEADER LINE,
xvbrp LIKE vbrpvb OCCURS 0 WITH HEADER LINE,
xvbss LIKE vbss OCCURS 0 WITH HEADER LINE.
SELECT SINGLE * FROM vbak
WHERE vbeln = p_vbeln.
IF sy-subrc <> 0.
MESSAGE s208(00) WITH 'Invalid vbeln'.
LEAVE LIST-PROCESSING.
ENDIF.
CALL FUNCTION 'RV_INVOICE_REFRESH'
EXPORTING
with_posting = 'B'
TABLES
xkomfk = xkomfk
xkomv = xkomv
xthead = xthead
xvbfs = xvbfs
xvbpa = xvbpa
xvbrk = xvbrk
xvbrp = xvbrp
xvbss = xvbss.
DATA: BEGIN OF t_vbap OCCURS 0,
vbeln TYPE vbeln,
posnr TYPE posnr,
END OF t_vbap.
SELECT vbeln posnr INTO TABLE t_vbap
FROM vbap WHERE vbeln = p_vbeln.
LOOP AT t_vbap.
Fill the values.
xkomfk-mandt = sy-mandt.
xkomfk-vbeln = p_vbeln.
xkomfk-posnr = t_vbap-posnr.
xkomfk-vbtyp = vbak-vbtyp.
xkomfk-seldat = sy-datum.
xkomfk-fkart = p_fkart.
xkomfk-fkimg = '1.000'.
xkomfk-vrkme = 'EA'.
APPEND xkomfk.
ENDLOOP.
CALL FUNCTION 'RV_INVOICE_CREATE'
EXPORTING
vbsk_i = s_vbsk
with_posting = 'B'
IMPORTING
vbsk_e = s_vbsk
TABLES
xkomfk = xkomfk
xkomv = xkomv
xthead = xthead
xvbfs = xvbfs
xvbpa = xvbpa
xvbrk = xvbrk
xvbrp = xvbrp
xvbss = xvbss.
READ TABLE xvbfs WITH KEY msgty = 'S'.
WRITE:/ sy-subrc.
WRITE:/ xvbfs-msgv1,xvbfs-msgv2,xvbfs-msgv3.
Thanks,
Naren -
HOW TO USE BAPI BAPI_BILLINGDOC_CREATEMULTIPLE
HI ALL:
I want to create billing num. in t-code 'VF01'. It is just to input a delivery num.
then press zhe 'save' button.
How to use the bapi BAPI_BILLINGDOC_CREATEMULTIPLE, I mean which
variable should be given. Is there any examples.
THANKS FIRST.Hi,
Following is the documentation provided by SAP in the BAPI transaction:
Functionality
This method can be used to create billing documents.
As input parameters, you are expected to enter information on the items to be processed in the table BILLING_DATA_IN. This data is processed and produces a batch of billing documents. You also have the option of transferring information for entry in the input structure CREATOR_DATA_IN. If this information is already determined, this is transferred into each billing document header. You can also enter optional conditions for the individual items to be processed in the input table CONDITION_DATA_IN, as well as means of payment information in the table CCARD_DATA_IN.
This method can be used in the simulation run (TESTRUN = 'X') and also in the update run including the update (TESTRUN = ' '). Both execution variants deliver errors that may have occurred back to the output table RETURN. Information on successful processing is sent back in the output table SUCCESS. This output table delivers the document numbers of the billing documents created in particular.
Notes
Required entries :
BILLING_DATA_IN-SALESORG
BILLING_DATA_IN-DISTR_CHAN
BILLING_DATA_IN-DIVISION
BILLING_DATA_IN-DOC_TYPE
BILLING_DATA_IN-ORDBILLTYP
BILLING_DATA_IN-SOLD_TO
BILLING_DATA_IN-ITEM_CATEG
BILLING_DATA_IN-REQ_QTY
BILLING_DATA_IN-SALES_UNIT
BILLING_DATA_IN-CURRENCY
If a material is billed for which a material master needs to be
determined (BILLING_DATA_IN-NO_MATMAST = ' '), you must make the
following entries :
BILLING_DATA_IN-PLANT
BILLING_DATA_IN-MATERIAL
If, on the other hand, a material is billed for which no material
master is to be determined (BILLING_DATA_IN_NO_MATMAST = 'X'), you
must make the following entries :
BILLING_DATA_IN-COUNTRY
BILLING_DATA_IN-MATERIAL
BILLING_DATA_IN-TAXCL_1MAT
COMMIT control :
In the update run (TESTRUN = ' ') the update is carried out by COMMIT
WORK as part of the method available.
I guess using this, you will be able to populate the required things to create the billing documents.
Thanks
Vijay -
How to use BAPI_BILLINGDOC_CREATEMULTIPLE ?
Hi,
Does anyone have an example of how to use BAPI BAPI_BILLINGDOC_CREATEMULTIPLE?
I am trying to create a billing document with reference to a delivery (I am hoping that this BAPI will take into account the copy control config so I won't have to do all the work etc.
We are on 4.7 and the documentation on the BAPI is very sparse, and the notes relating to it do not help much either.
Thanks,
MartinHi,
Have you not tried running the billing due list as a call transaction with the delivery number as the SD document number ?
Transaction is VF04 (Program is SDBILLDL)
This will have everything included as creating a billing document via VF01.
Cheers
Colin -
Problem with BAPI_BILLINGDOC_CREATEMULTIPLE
Hi All,
I am using the Function Module BAPI_BILLINGDOC_CREATEMULTIPLE for creating Invoices for deliveries.
In the current scenario, I am using the Function Module inside the Routine for an output type that has been configured for Auto-invoicing of deliveries.
On execution of the function module though, I see that even though an invoice gets created successfully for the particular delivery, the Table parameter "SUCCESS" does not get filled in the BAPI.
What could be the reason for this?
Kindly help me out with this.
Thanks in advance.
Regards,
KeerthiHi Neeraj,
Below is the code snippet:
CALL FUNCTION 'BAPI_BILLINGDOC_CREATEMULTIPLE' IN BACKGROUND TASK
EXPORTING
CREATORDATAIN = CREATORDATAIN
TESTRUN = TESTRUN
TABLES
SUCCESS = SUCCESS
RETURN = RETURN
CCARDDATAIN = CCARDDATAIN
CONDITIONDATAIN = CONDITIONDATAIN
BILLINGDATAIN = ZKOMFK.
At the end of execution, SY-SUBRC is still '0' and even my Invoice gets created.
But the structure SUCCESS is INITIAL.
Please share your suggestions, if any.
Thanks & Regards,
Keerthi -
Regarding Bapi "'BAPI_BILLINGDOC_CREATEMULTIPLE'"
Hi,
When i execute this below code, Billing document is not created in the table t_success,instead in table t_returns i am getting the message "Delivery type LR cannot be invoiced with billing type F8".
code is
TABLES: vbak,vbap,likp, lips.
DATA: t_billing TYPE STANDARD TABLE OF bapivbrk WITH HEADER LINE.
DATA: t_conditions TYPE STANDARD TABLE OF bapikomv WITH HEADER LINE.
DATA: t_return TYPE STANDARD TABLE OF bapireturn1 WITH HEADER LINE.
DATA: t_ccard TYPE STANDARD TABLE OF bapiccard_vf WITH HEADER LINE.
DATA: t_errors TYPE STANDARD TABLE OF bapivbrkerrors WITH HEADER LINE.
DATA: t_success TYPE STANDARD TABLE OF bapivbrksuccess WITH HEADER LINE
PARAMETERS: p_vbeln TYPE vbeln.
select single * from likp
where vbeln = p_vbeln.
SELECT SINGLE * from lips where
vbeln = likp-vbeln.
t_billing-salesorg = likp-vkorg.
t_billing-ref_doc = likp-vbeln.
t_billing-ref_item = lips-posnr.
t_billing-doc_number = p_vbeln.
t_billing-itm_number = lips-posnr.
t_billing-ordbilltyp = 'F8'.
t_billing-price_date = sy-datum.
t_billing-ref_doc_ca = likp-vbtyp.
t_billing-material = lips-matnr.
t_billing-plant = lips-werks.
APPEND t_billing.
CALL FUNCTION 'BAPI_BILLINGDOC_CREATEMULTIPLE'
TABLES
billingdatain = t_billing
return = t_return
success = t_success
Regards,
Shasiraj.CHi,
DATA: it_atg_billing LIKE bapivbrk OCCURS 1 WITH HEADER LINE,
it_atg_return LIKE bapiret1 OCCURS 1 WITH HEADER LINE,
it_atg_success LIKE bapivbrksuccess OCCURS 1 WITH HEADER LINE,
git_likp type table of likp with header line.
LOOP AT git_likp.
it_atg_billing-ref_doc = git_likp-vbeln.
it_atg_billing-ref_doc_ca = 'J'.
APPEND it_atg_billing.
CALL FUNCTION 'BAPI_BILLINGDOC_CREATEMULTIPLE'
TABLES
billingdatain = it_atg_billing
return = it_atg_return
success = it_atg_success.
IF sy-subrc = 0.
CLEAR: it_atg_billing, it_atg_billing[].
ENDIF.
ENDLOOP.
The above code creates the invoice number for respective delivery number.
If this was helpful rewards points
Regards
Pratap.M -
Extend BAPI_BILLINGDOC_CREATEMULTIPLE?
I have a requirement to create an invoice from a non-SAP billing application.
Additionally, I have a need to extend the invoice with additional values. For example, I would like to add - perhaps - a flag signifying if this was an invoice on behalf of a different customer (sold-to and bill-to are different).
However, I do not see the extensionin table parameter on this bapi.
Am I out of luck (aside from requesting a customizing key from SAPi)?
RegardsYes, you can. Please search here on SDN for enhancement framework. But basically every program has the implicit enhancement points such as beginning of function module, end of function module and so on. You can attach your custom code to these points. Just go to SE37 and Edit -> Enhancement Operations -> Show Implicit Enhancement Options. You can also add additional parameters to FM interface. Again SE37 and Function Module -> Enhance Interface. Don't forget that everything new should be optional. So you can try to implement the following enhancements: 1. export new optional parameter to memory at the beginning of BAPI_BILLINGDOC_CREATEMULTIPLE. 2. at the beginning of FM import optional parameter from memory. Here you have access to tables like XVBRK. This table has whole VBRK structure plus some additional parts. Hence when you add new fields to VBRK then this structure will have all these fields as well. So you can map values from new optional parameter directly to VBRK.
Cheers -
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 -
Item Texts Is Not Being Created in BAPI_BILLINGDOC_CREATEMULTIPLE
Hi.
I am Using Bapi TO Create Invoice, Every thing is created successfully , but item text is not being created. Code is as below.
DATA: s_vbap TYPE vbap,
t_billing TYPE STANDARD TABLE OF bapivbrk WITH HEADER LINE,
t_datain TYPE STANDARD TABLE OF bapikomfktx WITH HEADER LINE,
t_return TYPE STANDARD TABLE OF bapireturn1 WITH HEADER LINE,
t_success TYPE STANDARD TABLE OF bapivbrksuccess WITH HEADER LINE.
SELECT SINGLE * FROM likp
WHERE vbeln = v_del_doc_no.
SELECT SINGLE * FROM lips WHERE
vbeln = v_del_doc_no.
t_billing-salesorg = likp-vkorg.
t_billing-ref_doc = likp-vbeln.
t_billing-ref_item = lips-posnr.
t_billing-doc_number = v_del_doc_no.
t_billing-itm_number = lips-posnr.
* SELECT SINGLE fkarv FROM tvak
* INTO t_billing-ordbilltyp
* WHERE auart EQ zsoa_so_header-auart.
SELECT SINGLE auart FROM vbak
INTO t_billing-ordbilltyp
WHERE vbeln EQ order_num.
t_billing-price_date = sy-datum.
t_billing-ref_doc_ca = likp-vbtyp.
t_billing-material = lips-matnr.
t_billing-plant = lips-werks.
APPEND t_billing.
BREAK-POINT.
CLEAR: t_datain.
t_datain-ref_doc = v_del_doc_no.
t_datain-ref_item = '000010'.
t_datain-applobject = 'VBBP'.
t_datain-text_id = '0001'.
t_datain-langu = sy-langu.
t_datain-format_col = '*'.
t_datain-text_line = 'FSG 2829'.
APPEND t_datain.
CALL FUNCTION 'BAPI_BILLINGDOC_CREATEMULTIPLE'
TABLES
billingdatain = t_billing
textdatain = t_datain
return = t_return
success = t_success.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
LOOP AT t_return.
itab_msg-type = t_return-type.
itab_msg-msg = t_return-message.
APPEND itab_msg.
CLEAR itab_msg.
ENDLOOP.
READ TABLE t_success INDEX 1.
p_i_bill_doc = t_success-bill_doc.
ENDIF.
ENDIF.
CLEAR: itab_so_items, itab_so_items[] , delivery_no , itab_return[].
So Text FSG 2829 is not being created in Item Text.....Hi Tahir,
You can check with the below thread
A question of BAPI_BILLINGDOC_CREATEMULTIPLE
Regards,
Pawan -
Error reporting in BAPI_BILLINGDOC_CREATEMULTIPLE
Hi there,
I've adapted parameters via customizing to take an orders as reference documents when creating invoices.
The thing is that when I create invoices using deliveries with VF01 I can figure out that I did it wrong cause I get an error message in the log of the process that specifies that the document type can't be invoice.
When I try to do the same via BAPI_BILLINGDOC_CREATEMULTIPLE the documents get processed, no invoice is created but at I can't get any error information at all that provides me the same result as with the transaction VF01. Is it possible to get the same message that I obtain when doing the process with the standard transaction.
Thanks in advance,Hello Suni,
I see that the issue is already marked as "solved" but is not explained in details.
The solution can be found in the hazy documentation of the BAPI:
"...and also in the update run including the update (TESTRUN = ' ')"
So, if you want the BAPI to generate a document number you have to leave field POSTING blank (of course TESTRUN should be blank as well).
BAPI for commit is not required here as this one is making commits based on the import parameters.
hope the explanation is complete now : ) -
Problem in BAPI_BILLINGDOC_CREATEMULTIPLE(Create Billing Doc)
Hi,
While using the function module BAPI_BILLINGDOC_CREATEMULTIPLE which is used to create an invoice on providing the sales order as the input , I am able to get only a temporary invoice number called
$00000001 but not able to get a final invoice number.
Can any one suggest any solution to this problem?
Thanks,
sunil sahooHello Suni,
I see that the issue is already marked as "solved" but is not explained in details.
The solution can be found in the hazy documentation of the BAPI:
"...and also in the update run including the update (TESTRUN = ' ')"
So, if you want the BAPI to generate a document number you have to leave field POSTING blank (of course TESTRUN should be blank as well).
BAPI for commit is not required here as this one is making commits based on the import parameters.
hope the explanation is complete now : ) -
BAPI_BILLINGDOC_CREATEMULTIPLE condition not created
Hi all,
I am trying to create billing document using BAPI_BILLINGDOC_CREATEMULTIPLE.
But the billing document created without pricing condition. Please check the code below:
it_billingdata_in-salesorg = '1000'.
it_billingdata_in-distr_chan = '10'.
it_billingdata_in-division = '00'.
it_billingdata_in-doc_type = 'L2'.
it_billingdata_in-sold_to = '0000002400'.
it_billingdata_in-plant = '1000'.
it_billingdata_in-price_date = '20070412'.
it_billingdata_in-ref_doc = '0007000075'.
it_billingdata_in-material = '100-100'.
it_billingdata_in-req_qty = '1'.
it_billingdata_in-ref_item = '000010'.
it_billingdata_in-doc_number = '0007000075'.
it_billingdata_in-itm_number = '000010'.
it_billingdata_in-currency = 'EUR'.
append it_billingdata_in.
it_conditiondatain-data_index = '1'.
it_conditiondatain-cond_type = 'PR00'.
it_conditiondatain-cond_value = '120'.
it_conditiondatain-COND_CURR = 'EUR'.
append it_conditiondatain.
call function 'BAPI_BILLINGDOC_CREATEMULTIPLE'
exporting
testrun = ''
tables
billingdatain = it_billingdata_in
conditiondatain = it_conditiondatain
errors = it_errors
return = it_billing_return
success = it_success.
Please Help. Thanks.HI
Just go through this link
it will definitely help you
<b>Re: BAPI_BILLINGDOC_CREATEMULTIPLE Billing Doc not created
BAPI_BILLINGDOC_CREATEMULTIPLE
BAPI_BILLINGDOC_CREATEMULTIPLE</b>
if it helps reward with points
Regards Rk -
BAPI_BILLINGDOC_CREATEMULTIPLE | Result unexpected while automation.
Hi Gurus,
I have created an automation of VF01/02 and create invoice for customer billing.
I have created the sales order with reference (VA02) and saved it.
Here is my code.
*& Form GET_SALESORD
* text
* --> p1 text
* <-- p2 text
FORM get_salesord .
DATA i_fy(004) TYPE c.
DATA run_date TYPE dats.
run_date = sy-datum.
CALL FUNCTION 'HR_JP_MONTH_BEGIN_END_DATE'
EXPORTING
iv_date = run_date
IMPORTING
ev_month_begin_date = v_sdate
ev_month_end_date = v_edate.
SELECT *
INTO TABLE it_vbak
FROM vbak
WHERE erdat GE v_sdate
AND erdat LE v_edate
AND vbtyp = 'C'.
SELECT *
INTO TABLE it_konv
FROM konv
FOR ALL ENTRIES IN it_vbak
WHERE knumv = it_vbak-knumv.
BREAK-POINT.
SELECT *
FROM vbap
INTO TABLE it_vbap
FOR ALL ENTRIES IN it_vbak
WHERE erdat GE it_vbak-erdat.
ENDFORM. " GET_SALESORD
*& Form CREATE_BILL
* text
* --> p1 text
* <-- p2 text
FORM create_bill .
LOOP AT it_vbak INTO wa_vbak.
wa_billingdatain-doc_number = wa_vbak-vbeln.
wa_billingdatain-created_by = wa_vbak-ernam.
wa_billingdatain-doc_type = wa_vbak-auart.
wa_billingdatain-ordbilltyp = wa_vbak-fkara.
wa_billingdatain-salesorg = wa_vbak-vkorg.
wa_billingdatain-distr_chan = wa_vbak-vtweg.
wa_billingdatain-division = wa_vbak-spart.
wa_billingdatain-sold_to = wa_vbak-kunnr.
wa_billingdatain-currency = wa_vbak-waerk.
wa_billingdatain-ref_doc = wa_vbak-vgbel.
wa_billingdatain-orderid = wa_vbak-aufnr.
wa_billingdatain-tax_depart_cty = wa_vbak-landtx.
wa_billingdatain-tax_dest_cty = wa_vbak-stceg_l.
wa_billingdatain-price_date = sy-datum.
LOOP AT it_vbap INTO wa_vbap
WHERE erdat = wa_vbak-erdat.
wa_billingdatain-itm_number = wa_vbap-posnr.
wa_billingdatain-origindoc = wa_vbap-vbelv.
wa_billingdatain-item = wa_vbap-posnv.
wa_billingdatain-item_categ = wa_vbap-pstyv.
wa_billingdatain-req_qty = wa_vbap-kwmeng.
wa_billingdatain-sales_unit = wa_vbap-vrkme.
wa_billingdatain-no_matmast = ' '.
wa_billingdatain-plant = wa_vbap-werks.
wa_billingdatain-material = wa_vbap-matnr.
wa_billingdatain-acctasgnmt = wa_vbap-ktgrm.
wa_billingdatain-ref_item = wa_vbap-vgpos.
wa_billingdatain-sales_unit = wa_vbap-vrkme.
wa_billingdatain-profit_ctr = wa_vbap-prctr.
wa_billingdatain-ref_doc_ca = wa_vbap-vgtyp.
wa_billingdatain-costcenter = wa_vbap-kostl.
wa_billingdatain-wbs_elem = wa_vbap-ps_psp_pnr.
ENDLOOP.
* LOOP AT it_konv INTO wa_konv
* WHERE knumv = wa_vbak-knumv.
* wa_conditiondatain-cond_type = wa_konv-kschl.
* wa_conditiondatain-cond_curr = wa_konv-kwaeh.
* wa_conditiondatain-cond_value = wa_konv-kbetr.
* wa_conditiondatain-cond_p_unt = wa_konv-kpein.
* wa_conditiondatain-cond_d_unt = wa_konv-kmein.
* ENDLOOP.
* wa_textdatain-ref_doc = wa_vbap-vgbel.
* wa_textdatain-ref_item = wa_vbap-vgpos.
* wa_textdatain-applobject = 'VBBK'.
* wa_textdatain-langu = 'EN'.
* wa_textdatain-text_id = 'ST'.
APPEND wa_billingdatain TO it_billingdatain.
* APPEND wa_conditiondatain TO it_conditiondatain.
* APPEND wa_textdatain TO it_textdatain.
CALL FUNCTION 'BAPI_BILLINGDOC_CREATEMULTIPLE'
EXPORTING
* CREATORDATAIN =
testrun = 'X'
* POSTING =
TABLES
billingdatain = it_billingdatain
* conditiondatain = it_conditiondatain
* CCARDDATAIN =
* textdatain = it_textdatain
errors = it_errors
return = it_return
success = it_success.
BREAK-POINT.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
* EXPORTING
* WAIT =
* IMPORTING
* RETURN =
ENDLOOP.
IF it_errors[] IS NOT INITIAL.
EXIT.
ENDIF.
ENDFORM. " CREATE_BILL
and it is giving me a result,
I
VF
044
The item is not relevant for billing
Please suggest.
RegardsHi Ankit,
please check, if WBS_ELEM isn't empty after line
wa_billingdatain-wbs_elem = wa_vbap-ps_psp_pnr.
Sometimes wbs element can be found in header (VBAK) and sometimes in item (VBAP) depending on customizing settings.
Regards,
Klaus
Maybe you are looking for
-
Sharepoint 2013 setup with multi tenancy
Hi, Anybody have a proper guidance on how to setup SP 2013 with multi tenancy ? And aslo it should be with hosting mode, because we are the big hoster. We need hosting SP 2013 with multi tenancy. Thanks in advance.
-
Any guitarists using Mainstage/Guitar Amp Pro in live situations??
I'm getting ready to purchase Logic Studio(as soon as my pc sells), and I was wondering if anyone is using Mainstage as a guitar rig for live situations. Is Guitar Amp Pro "tweakable" enough to get good results out of? I'd love to have GuitarRig3, bu
-
Photoshop CS3, Mac OS 10.5.2 After I create a custom soft proof I would like it show up in the "View" drop down. Where is the "default" location to save custom soft proofs so that they show up in the drop down menu? Thanks
-
Modify BADI for Freight Cost Extension
SAP offers BADI /SAPFCX/RELV_PARMS to update user parameters in determining customer freight document relevancy. I am informed to use this BADI to code so that USER_UserParm1 can be populated. It is provided in function module /SAPFCX/CFI_RELEVANCE_C
-
Query approval procedures issue
Hi all I'm creating a query for approval procedure in Sales orders. This query is working fine: SELECT DISTINCT 'TRUE' FROM ORDR T0 WHERE CAST ($[ORDR.DocTotal] AS decimal(19,6))>= $[ORDR.U_Credito] But the one above give the following error get an e