Free Goods line item in Billing Doc.
Hello SAP GURUS,
I am working on ECC.6. I am processing the sales order and delivery for FREE GOODS every thing is fine but I not able to see the relavent free good item in the billing document.Can some one help me How to get the same.
Thanks & Regards.
AKHI
Hi Akhi,
Please go to VOV7 transaction then select the free item itemcategory then go in to the details of the item category here you check Billing relevance field
If the field is block item will not come in the invice
If you put A- Delivery-related billing document , item will come in the billing document.
I hope it will help you,
Regards,
Murali.
Similar Messages
-
Sales Orders line item quantity getting Zero after free good line item
Hi experts,
i am creating sales order using BAPI BAPI_SALESORDER_CREATEFROMDAT2 sales order having some free goods material and line item after free goods line item having quantity zero.
for example A B are materials, A having free goods a1. when SO having 3 line items 10 for A ,line item 20 for a1 and line item 30 for B . But line item 30 having quantity zero.
find code below and advice .
lwa_ord_head_in-doc_type = 'ZSO'.
lwa_ord_head_in-sales_org = '1000'.
lwa_ord_head_in-distr_chan = '10'.
lwa_ord_head_in-division = '10'.
lwa_ord_head_in-req_date_h = lwa_rof_s-date_del.
*Order Header Update
lwa_ord_head_inx-doc_type = 'X'.
lwa_ord_head_inx-sales_org = 'X'.
lwa_ord_head_inx-distr_chan = 'X'.
lwa_ord_head_inx-division = 'X'.
lwa_ord_head_inx-req_date_h = 'X'.
lwa_ord_partners-partn_role = 'AG'.
lwa_ord_partners-partn_numb = lwa_rof_s-lease.
APPEND lwa_ord_partners TO lt_ord_partners.
IF lwa_rof_s-del_addr IS INITIAL.
lwa_ord_partners-partn_role = 'WE'.
lwa_ord_partners-partn_numb = lwa_rof_s-lease.
APPEND lwa_ord_partners TO lt_ord_partners.
ELSE.
lwa_ord_partners-partn_role = 'WE'.
lwa_ord_partners-partn_numb = lwa_rof_s-lease.
APPEND lwa_ord_partners TO lt_ord_partners.
ENDIF.
lt_rof_it_t = lwa_rof_s-zsd_rof_it_t.
LOOP AT lt_rof_it_t INTO lwa_rof_it_s.
lwa_ord_items_in-material = lwa_rof_it_s-matnr.
lwa_ord_items_in-plant = lwa_rof_s-plant.
lwa_ord_items_in-target_qty = lwa_rof_it_s-qty.
lwa_ord_items_in-comp_quant = lwa_rof_it_s-qty. "added on 12/29
lwa_ord_items_in-target_qu = 'EA'.
lwa_ord_items_in-t_unit_iso = 'EA'.
APPEND lwa_ord_items_in TO lt_ord_items_in.
lwa_ord_items_inx-material = 'X'.
lwa_ord_items_inx-plant = 'X'.
lwa_ord_items_inx-target_qty = 'X'.
lwa_ord_items_inx-comp_quant = 'X'.
lwa_ord_items_inx-target_qu = 'X'.
lwa_ord_items_inx-t_unit_iso = 'X'.
lwa_ord_items_inx-updateflag = 'I'. "'U'
APPEND lwa_ord_items_inx TO lt_ord_items_inx.
** Schedule Line Information
lwa_schedule_lines-itm_number = '000010'.
lwa_schedule_lines-sched_line = '0003'.
lwa_schedule_lines-sched_line = 'X'.
lwa_schedule_lines-req_date = lwa_rof_s-date_del.
lwa_schedule_lines-date_type = '1'.
lwa_schedule_lines-req_qty = lwa_rof_it_s-qty.
APPEND lwa_schedule_lines TO lt_schedule_lines.
lwa_schedule_lines_x-itm_number = '000010'.
lwa_schedule_lines_x-sched_line = '0003'.
lwa_schedule_lines_x-updateflag = 'I'.
lwa_schedule_lines_x-sched_line = 'X'.
lwa_schedule_lines_x-req_date = 'X'.
lwa_schedule_lines_x-date_type = 'X'.
lwa_schedule_lines_x-req_qty = 'X'.
APPEND lwa_schedule_lines_x TO lt_schedule_lines_x.
ENDLOOP.
CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
EXPORTING
SALESDOCUMENTIN =
order_header_in = lwa_ord_head_in
order_header_inx = lwa_ord_head_inx
SENDER =
BINARY_RELATIONSHIPTYPE =
INT_NUMBER_ASSIGNMENT =
BEHAVE_WHEN_ERROR =
LOGIC_SWITCH =
TESTRUN =
CONVERT = ' '
IMPORTING
salesdocument = lwa_saledocu
TABLES
return = lt_return
order_items_in = lt_ord_items_in
order_items_inx = lt_ord_items_inx
order_partners = lt_ord_partners
order_schedules_in = lt_schedule_lines
order_schedules_inx = lt_schedule_lines_x
ORDER_CONDITIONS_IN =
ORDER_CONDITIONS_INX =
ORDER_CFGS_REF =
ORDER_CFGS_INST =
ORDER_CFGS_PART_OF =
ORDER_CFGS_VALUE =
ORDER_CFGS_BLOB =
ORDER_CFGS_VK =
ORDER_CFGS_REFINST =
ORDER_CCARD =
ORDER_TEXT =
ORDER_KEYS =
EXTENSIONIN =
PARTNERADDRESSES =
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' .Hi experts,
I am still waiting for your response......
Thanks in advance
Deepanker -
Use FM SD_SALESDOCUMENT_CREATE for creating free goods line items
Dear Experts,
I have created a program for uploading Sales Order details using FM "SD_SALESDOCUMENT_CREATE".
The program successfully creates Sales Orders.
Now the problem is with the materials which is a free goods item.
i.e. if I enter a material say 'XYZ' which has a 20% free goods then if I enter quantity as 10 then it has to create 2 line items where in 1st line item will have 8 as qty. with value and 2nd line item will have 2 as qty with no value.
It successfully happens when I create Sales Order using tcode VA01.
*& Form CREATE_SALES_ORDER
FORM create_sales_order.
head_flg = 'T'.
LOOP AT t_socreate02 INTO w_socreate02.
CLEAR : vbeln, spart, bstnk, bstdk,
w_itemin, w_iteminx, w_partnr.
MOVE : w_socreate02-vbeln TO vbeln,
w_socreate02-spart TO spart,
w_socreate02-bstnk TO bstnk,
w_socreate02-bstdk TO bstdk.
AT NEW vbeln.
CLEAR : w_sdhead, w_sdheadx.
**Transferring Header Details
MOVE : 'ZODF' TO w_sdhead-doc_type, "Default
'L001' TO w_sdhead-sales_org, "Default
'01' TO w_sdhead-distr_chan, "Default
spart TO w_sdhead-division,
bstdk TO w_sdhead-purch_date,
sy-datum TO w_sdhead-req_date_h,
bstnk TO w_sdhead-purch_no_c.
MOVE : 'I' TO w_sdheadx-updateflag,
'X' TO w_sdheadx-doc_type,
'X' TO w_sdheadx-sales_org,
'X' TO w_sdheadx-distr_chan,
'X' TO w_sdheadx-division,
'X' TO w_sdheadx-purch_date,
'X' TO w_sdheadx-req_date_h,
'X' TO w_sdheadx-purch_no_c.
ENDAT.
**Transferring Item Details
MOVE : w_socreate02-posnr TO w_itemin-itm_number,
w_socreate02-matnr TO w_itemin-material,
w_socreate02-zmeng TO w_itemin-target_qty.
APPEND w_itemin TO t_itemin.
MOVE : w_socreate02-posnr TO w_iteminx-itm_number,
'I' TO w_iteminx-updateflag,
'X' TO w_iteminx-material,
'X' TO w_iteminx-target_qty.
APPEND w_iteminx TO t_iteminx.
**Transferring Partner Function Details
CLEAR : w_partnr.
MOVE : 'AG' TO w_partnr-partn_role, "Sold-to-Party
w_socreate02-sold_party TO w_partnr-partn_numb.
APPEND w_partnr TO t_partnr.
CLEAR : w_partnr.
MOVE : 'WE' TO w_partnr-partn_role, "Ship-to-Party
w_socreate02-ship_party TO w_partnr-partn_numb.
APPEND w_partnr TO t_partnr.
**Transferring Schedule Line Details
*Schedule Line 1
CLEAR : w_schedulesin, w_schedulesinx.
MOVE : w_socreate02-posnr TO w_schedulesin-itm_number,
'0001' TO w_schedulesin-sched_line,
w_socreate02-edatu01 TO w_schedulesin-req_date,
w_socreate02-edatu01 TO w_schedulesin-dlv_date,
w_socreate02-wmeng01 TO w_schedulesin-req_qty.
APPEND w_schedulesin TO t_schedulesin.
MOVE : w_socreate02-posnr TO w_schedulesinx-itm_number,
'0001' TO w_schedulesinx-sched_line,
'I' TO w_schedulesinx-updateflag,
'X' TO w_schedulesinx-req_date,
'X' TO w_schedulesinx-dlv_date,
'X' TO w_schedulesinx-req_qty.
APPEND w_schedulesinx TO t_schedulesinx.
*Schedule Line 2
IF NOT w_socreate02-wmeng02 IS INITIAL.
CLEAR : w_schedulesin, w_schedulesinx.
MOVE : w_socreate02-posnr TO w_schedulesin-itm_number,
'0002' TO w_schedulesin-sched_line,
w_socreate02-edatu02 TO w_schedulesin-req_date,
w_socreate02-edatu02 TO w_schedulesin-dlv_date,
w_socreate02-wmeng02 TO w_schedulesin-req_qty.
APPEND w_schedulesin TO t_schedulesin.
MOVE : w_socreate02-posnr TO w_schedulesinx-itm_number,
'0002' TO w_schedulesinx-sched_line,
'I' TO w_schedulesinx-updateflag,
'X' TO w_schedulesinx-req_date,
'X' TO w_schedulesinx-dlv_date,
'X' TO w_schedulesinx-req_qty.
APPEND w_schedulesinx TO t_schedulesinx.
ENDIF.
*Schedule Line 3
IF NOT w_socreate02-wmeng03 IS INITIAL.
CLEAR : w_schedulesin, w_schedulesinx.
MOVE : w_socreate02-posnr TO w_schedulesin-itm_number,
'0003' TO w_schedulesin-sched_line,
w_socreate02-edatu03 TO w_schedulesin-req_date,
w_socreate02-edatu03 TO w_schedulesin-dlv_date,
w_socreate02-wmeng03 TO w_schedulesin-req_qty.
APPEND w_schedulesin TO t_schedulesin.
MOVE : w_socreate02-posnr TO w_schedulesinx-itm_number,
'0003' TO w_schedulesinx-sched_line,
'I' TO w_schedulesinx-updateflag,
'X' TO w_schedulesinx-req_date,
'X' TO w_schedulesinx-dlv_date,
'X' TO w_schedulesinx-req_qty.
APPEND w_schedulesinx TO t_schedulesinx.
ENDIF.
*Schedule Line 4
IF NOT w_socreate02-wmeng04 IS INITIAL.
CLEAR : w_schedulesin, w_schedulesinx.
MOVE : w_socreate02-posnr TO w_schedulesin-itm_number,
'0004' TO w_schedulesin-sched_line,
w_socreate02-edatu04 TO w_schedulesin-req_date,
w_socreate02-edatu04 TO w_schedulesin-dlv_date,
w_socreate02-wmeng04 TO w_schedulesin-req_qty.
APPEND w_schedulesin TO t_schedulesin.
MOVE : w_socreate02-posnr TO w_schedulesinx-itm_number,
'0004' TO w_schedulesinx-sched_line,
'I' TO w_schedulesinx-updateflag,
'X' TO w_schedulesinx-req_date,
'X' TO w_schedulesinx-dlv_date,
'X' TO w_schedulesinx-req_qty.
APPEND w_schedulesinx TO t_schedulesinx.
ENDIF.
*Schedule Line 5
IF NOT w_socreate02-wmeng05 IS INITIAL.
CLEAR : w_schedulesin, w_schedulesinx.
MOVE : w_socreate02-posnr TO w_schedulesin-itm_number,
'0005' TO w_schedulesin-sched_line,
w_socreate02-edatu05 TO w_schedulesin-req_date,
w_socreate02-edatu05 TO w_schedulesin-dlv_date,
w_socreate02-wmeng05 TO w_schedulesin-req_qty.
APPEND w_schedulesin TO t_schedulesin.
MOVE : w_socreate02-posnr TO w_schedulesinx-itm_number,
'0005' TO w_schedulesinx-sched_line,
'I' TO w_schedulesinx-updateflag,
'X' TO w_schedulesinx-req_date,
'X' TO w_schedulesinx-dlv_date,
'X' TO w_schedulesinx-req_qty.
APPEND w_schedulesinx TO t_schedulesinx.
ENDIF.
AT END OF vbeln.
PERFORM bapi_salesorder.
CLEAR : t_itemin[], t_iteminx[], t_partnr[],
t_schedulesin[], t_schedulesinx[],
sdno, head_flg.
ENDAT.
ENDLOOP.
ENDFORM. " CREATE_SALES_ORDER
*& Form BAPI_SALESORDER
FORM bapi_salesorder.
CALL FUNCTION 'DIALOG_SET_NO_DIALOG'.
CALL FUNCTION 'SD_SALESDOCUMENT_CREATE'
EXPORTING
sales_header_in = w_sdhead
sales_header_inx = w_sdheadx
testrun = p_test
status_buffer_refresh = 'X'
IMPORTING
salesdocument_ex = sdno
TABLES
return = t_return
sales_items_in = t_itemin
sales_items_inx = t_iteminx
sales_partners = t_partnr
sales_schedules_in = t_schedulesin
sales_schedules_inx = t_schedulesinx.
IF p_test <> 'X'.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
ENDIF.
IF head_flg = 'T' AND p_test = 'X'.
WRITE :/40 '** E X E C U T E D - I N - T E S T - M O D E **' COLOR 2.
ELSEIF head_flg = 'T' AND p_test = ' '.
WRITE :/40 '** E X E C U T E D - I N - U P D A T E - M O D E **' COLOR 2.
ENDIF.
IF head_flg = 'T'.
SKIP 1.
ULINE /2(139).
WRITE :/2 sy-vline,
3 'Dummy SalesOrder No.' COLOR 1,
23 sy-vline,
24 'Generated SalesOrder No.' COLOR 1,
48 sy-vline,
49 'Return Message' COLOR 1,
140 sy-vline.
ULINE /2(139).
ENDIF.
IF sdno IS INITIAL.
DELETE t_return WHERE type <> 'E'.
IF NOT t_return[] IS INITIAL.
LOOP AT t_return INTO w_return WHERE type = 'E'.
WRITE :/2 sy-vline,
5 w_socreate02-vbeln,
23 sy-vline,
28 sdno,
48 sy-vline,
49 w_return-message COLOR 6 INVERSE,
140 sy-vline.
ENDLOOP.
ELSE.
WRITE :/2 sy-vline,
5 w_socreate02-vbeln,
23 sy-vline,
28 sdno,
48 sy-vline,
49 'Sales Order can be processed SUCCESSFULLY' COLOR 7 INVERSE,
140 sy-vline.
ENDIF.
ELSE.
WRITE :/2 sy-vline,
5 w_socreate02-vbeln,
23 sy-vline,
28 sdno,
48 sy-vline,
49 'Sales Order created SUCCESSFULLY !!' COLOR 5 INVERSE,
140 sy-vline.
ENDIF.
ULINE /2(139).
ENDFORM. " BAPI_SALESORDERNo reply so closed the thread.
-
Line Item Text ( Accounting Doc ) From Billing
Hi Experts,
As i know in Standard process, the Line item text FI Doc ( Accounting Document ) from billing doesn't have any value ( please correct me if i am wrong ).
But in my case there is value in line item text ( billing doc no )
i already check and not found any substistution or userexit, i try to search in customizing but dont have any clue where this text from. please advice where do i have to look.
Thanks,
RickoHello Burak,
Thanks for reply, as i told in the message
right now, there is value in my line item text
it should be blank, but i couldnt find any customizing or anything that cause my line item text filled with billing document number. do you have any idea ?
Thanks,
RIcko
Edited by: Chapii on Mar 19, 2010 5:24 AM -
Relation between Billing line Item and Accounting doc entries
Hi all
when r line items in Accounting doc gets generated for a billing doc.
for ex. if there exists a Billing Doc with 2 lines
is there any relation to the item in the Billing Doc
to the Accounting doc line items.
thanksHi,
In some situation it is possible that there is a link but in the most situation you use summarization to minalize the number of line items created by invoice (like one line for VAT, general discounts). The total ammount from the customer is the same as on the billing document.
When you want to have details by line you can found them in CO-PA.
Paul -
How to realize the scenario of Inclusive Free Goods without Item Generation
I include the condition type NRAB in my pricing procedure, but it shows me that this condition ignored(requirement 059 not fulfilled).
why?Hi,
Prerequisites
In the free goods master record in the Free goods category field, select free goods category 3 (inclusive free goods without item generation).
Follow the foll. procedure:
In free goods master data maintenance, this new free goods type is dealt with in the same way as the inclusive free goods procedure described above.
In order processing, you can not create order sub-items.
For pricing in the main item, you need to create a discount. The standard system provides pricing procedure RVAA01 and condition type NRAB.
Condition type NRAV is set up as follows:
It does not determine a discount from a condition record. It uses condition basis formula 029 in the pricing procedure to determine a discount from the free goods factor.
The condition receives the new pricing requirement 059 in the pricing procedure. This requirement checks whether free goods have already been determined.
The condition type receives condition category f. This condition category ensures that the condition is redetermined every time the quantity is changed, since this can also mean a change to the free goods quantity.
regards,
Siddharth. -
Is it possible to have more than one Tax code per line item in Billing docu
Is it possible to have more than one Tax code per line item in Billing document ?
Hi,
I have a different perspective there.
If an item is applicable for two different taxes which are represented by two different tax condition types and these tax conditions are configured in the tax procedure, FTXP and so on....then these two condition records can have two different tax codes.
We actually have this scenario in EU now, where EU talks about service tax in 2010 apart from the normal VAT. So now we have MWST and ZWST(Say)
Now there are some materials which come with a service associated with it. So a service charge is also levied when the material is sold. So the material price will become applicable for VAT and the service charge becomes applicable for service tax. In this case, the tax classification of the customer will have two entries in sales orders updated in the fields VBAK-TAXK1 and VBAK-TAXK2 based on the sequence number of these condition types.
Now based on different tax classification of the customer, we have 2 different tax codes representing different %of tax.
Hope it helps -
Can we change pricing date for line item in billing
Hi Expert,
Can we change pricing date , while raising inoice for particular line iteamHi,
We can not change the pricing date for perticular line item at billing document level, the only option is we can enter the required date at the time of invoice creation in VF01 screen.
If your requirement is copying the same pricing date that is entered at sales order, then do the following.
Go to T Code:VTFL and choose your DElivery Type and Billing Type, then choose your item category and then change the pricing type as 'D' .
Regards,
Pasapula. -
How to read product characteristics of a line item in Billing document?
Hi Friends,
I need to read the product characteristics of a line item in Billing document. Can you please help me with which tables or function modules I should use?
Thanks in advance.
Regards
Jaker.Hi,
Use the following BAPI's:
BAPI_OBJCL_GETDETAIL
or use the fun module:
CLAF_CLASSIFICATION_OF_OBJECTS.
Regards
ANJI -
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 increase line item in billing document
Hi
I know that maximum line item in billing is 999, but my requirement is to increase the line item number may be up to 9999. Is there any way
Kindly replay.
Thanks in advance
VinodHello,
I don't think there is a standard settings for this, you need to think of an enhancement, check with your ABAP expert.
Prase -
Multiple line item in billing but only one line item in accounting document
Hi Everyone,
I am having one scenario in which sales order has more than one line item. Only one billing document is create for all line items in Sales Order but billing document contains as many items as sales order has. In accounting document of billing i find only one customer line which has total amount of all line items in billing as debited. My requirement is Accounting document also should have as many line of customer-debit as in billing items i.e sales order. For example :
(1) Sales order has 2 line items.
(2) Billing document is only ONE and has 2 line items
(3) currently accounting document has only ONE line of Customet - Debit ( Total amount of both items)
My requirement is
Accounting document should have 2 line item of customer - Debit
Customer - Debit (amount of first line item)
Customer - Debit (amount of Second line item)
Sales - Credit
How can it be done ?
Regards,
ManishHi,
This is the SAP expected behaviour
As far as the values correspond to same account key and same GL account as per account determination, then ti will be posted as a single line item in FI document.
If you want the customer specific items to be posted in two GL accounts , then you have to do the account determination that way.
For example, you should have a condition table in FICO as follows.
Sales org/ Account key / Customer
For this condition table, the entries shoudl be as follows.
5110/ERS/Customer A GL ACCOUNT IS 5000100
5110/ERS/Customer B GL ACCOUNT IS 5000200
In this case, there will be 2 entries for the invoice instead of just one line entry. -
Inclusive Free Goods without Item Generation
Can anbody explain 'Inclusive Free Goods without Item Generation' with an example.
Thanks in advance
Sunithi,
Prerequisites
In the free goods master record in the Free goods category field, select free goods category 3 (inclusive free goods without item generation).
Features
In free goods master data maintenance, this new free goods type is dealt with in the same way as the inclusive free goods procedure described above.
In order processing, you can not create order sub-items.
For pricing in the main item, you need to create a discount. The standard system provides pricing procedure RVAA01 and condition type NRAB.
Condition type NRAB is set up as follows:
It does not determine a discount from a condition record. It uses condition basis formula 029 in the pricing procedure to determine a discount from the free goods factor.
The condition receives the new pricing requirement 059 in the pricing procedure. This requirement checks whether free goods have already been determined.
The condition type receives condition category f. This condition category ensures that the condition is redetermined every time the quantity is changed, since this can also mean a change to the free goods quantity.
regards
sadhu kishore -
Total line items in billing document
Dear Fnds,
I want to Find total line items in Billing document VBRk-posnr
Thanks in advance
Regards
raj.Hi,
You can get the line items details in internal table then write the following command:
DESCRIBE TABLE itab LINES lv_lines.
In Lv_lines you will get the count for that Sales Order Number (VBELN).
Hope this may be useful..
Regards,
Prashant -
Free Goods sub item split in two line items
Sir,
I give free good along with sale item ,but i want free goods quantity split in two lines ,so how I do that?
Please help .Hi,
Free goods has the following limitations:
- Free goods can only be supported on a 1:1 ratio. This means that an order item can lead to a free goods item. Agreements in the following form are not supported: u2018With material 1, material 2 and material 3 are free of chargeu2018 or u2018If material 1 and material 2 are ordered at the same time, then material 3 is free of chargeu2018.
- Free goods are not supported in combinations with material structures (for example, product selection, BOM, variants with BOM explosion).
- Free goods are only supported for sales orders with document category C (for example, not quotations).
- Free goods are not supported for deliveries without reference to a sales order.
- Free goods cannot be used in make-to-order production, third-party order processing and scheduling agreements.
- If you defined a free goods for variants in a generic article (only SAP Retail), you can only process the variants in the purchase order and goods receipt individually (as single articles). In other words, you cannot process them using the generic article matrix.
Not all Sales Order can be used for free goods determination. You have to check the SD document category if it does not work. Only category 'C' are supported. Check transaction VOV8.
Assume that you want to configure an inclusive FREE goods routine. Customers must order a minumum quantity of 5 before any free goods can be assign. For every quantity of 3, the customer will be given 1 free goods.
WC07 - Maintain Number Range Intervals
e.g.
No From number To number
01 0000010000 0000099999
IMG -> Sales and Distribution -> Basic Functions -> Free Goods ->
Maintain Access Sequences
New Entries
Acsq
NA00
Save
Maintain Condition Types
New Entries
Ctyp Name AcSq
FREE Free Goods NA00
Save
Maintain Pricing Procedures
Procedures
New Entries
Procedure Description
FREE Free Goods
Select Procedure FREE then click Control data
Step Cntr Ctyp
10 10 FREE
V/N6 - Activate Free Goods Determination
Assign Order Type OR with Document Procedure A with Procedure FREE
VBN1 - Create free goods determination
e.g. FREE inclusive
Material Min qty From are free good Calc Rule Free Goods
5 3 1 1 1
In this example, if you create a Sales Order for a quantity of 10, SAP will prompt you 7 as the customer order qty and 3 will be free. Customer only pay for the 7 quantity
Hopefully this will help to resolve the answer.
Thanks & regards,
Pankaj Mahajan
Edited by: PM on Apr 13, 2010 10:28 AM
Maybe you are looking for
-
Queries Report For Last Purchased Price
Dear All, Can someone helps me to get queries report for last purchased price vs new purchase price that recently being enter on purchased order. Trigger by purchased order document posting and we can choose % variance Report by order : No. Document
-
Problem in CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
While working in PDF attachment I am using Function 'GET_JOB_RUNTIME_INFO' as bellow CALL FUNCTION 'GET_JOB_RUNTIME_INFO' IMPORTING eventid = gd_eventid eventparm = gd_eventparm external_program_a
-
Modify BOM Components in Document_Lines
Hey guys, I have a client with a request to modify the BOM lines components, specifically in the prices in the components or the quantities. Is there a way to do this without modifying the BOM itself before adding it to the document?
-
How do I automate White Balance in CS4?
Ok, I use the Dave Cross method in CS4 to find my color balance... I use a 50% grey layer, blend set to "difference" then use the threshold and levels layers etc... I want to automate this color balance setting to fit a large batch because it takes
-
Has anybody encountered a discrepency in margins when printing a booklet from Adobe Acrobat 9? Our postscript printer, for some odd reason, added a wider margin on one side making the marigin narrow on the other. The Indesign CS4 document has even ma