FM to get sales order details with billing document .
hi ,
is there any standard FM or BAPI to get the sales order details with input as billing document ?
i have the billing document number now i need to get the sales order number and its details ..
is that possible ..
i very well know how to get it by using query, i need standard FM.
Points will be awarded for sure , if it helps .
Thanks and regards
JK
Here is the list of BAPIs
BAPI_QUOTATION_GETDETAILBOS
BAPI_INQUIRY_GETDETAILBOS
BAPI_SALESORDER_GETDETAILBOS
SALES ORDER->
BAPISDORDER_GETDETAILEDLIST Sales Order: List of All Order Data
BAPI_ORDER_CHANGE_STATUS_GET Change status for order
BAPI_SALESDOCU_CREATEFROMDATA Creating a Sales Document
BAPI_SALESORDER_CHANGE Sales Order: Change Sales Order
BAPI_SALESORDER_CREATEFROMDAT1 Sales Order: Create Sales Order
BAPI_SALESORDER_CREATEFROMDAT2 Sales Order: Create Sales Order
BAPI_SALESORDER_CREATEFROMDATA Create sales order, no more maintenance
BAPI_SALESORDER_GETLIST Sales order: List of all orders for customer
BAPI_SALESORDER_GETSTATUS Sales order: Display status
BAPI_SALESORDER_SIMULATE Sales Order: Simulate Sales Order
Similar Messages
-
How to get sales order data with GL tables
I want to get sales order details from my GL query. I need to get item number, quantity and customer PO from there. Here is my query from GL.
SELECT PH.po_header_id,
I.GL_DATE,
R.je_header_id JE_HEADER_ID,
R.je_line_num JE_LINE_NUM,
aeh.org_id ORG_ID ,
I.invoice_num TRX_NUMBER_C ,
ael.description COMMENTS ,
ael.ACCOUNTED_CR ACCOUNTED_CR,
ael.ACCOUNTED_DR ACCOUNTED_DR,
ael.code_combination_id CODE_COMBINATION_ID,
ael.currency_code CURRENCY_CODE,
ael.entered_cr ENTERED_CR,
ael.entered_dr ENTERED_DR,
PH.segment1 PO_ORDER_NUMBER,
GL.segment1 company,
GL.segment2,
GL.segment3,
GL.segment4,
GL.segment5 account
,ael.description
,PD.quantity_ordered, PD.amount_billed, D.quantity_invoiced, D.unit_price
FROM gl_import_references R, --ok
gl_je_categories jc,
ap_ae_lines_all AEL, --ok
ap_ae_headers_all AEH, --ok
ap_invoice_distributions_all D,
ap_invoices_all I,
ap_accounting_events_all AE,
po_releases_all PR,
po_headers_all PH,
po_distributions_all PD,
po_vendor_sites_all VS,
gl_code_combinations GL
WHERE 1=1
AND jc.je_category_name = aeh.ae_category
AND PR.po_release_id(+) = PD.po_release_id
AND PH.po_header_id(+) = PD.po_header_id
AND PD.po_distribution_id(+) = D.po_distribution_id
AND ael.third_party_sub_id = VS.vendor_site_id
AND AE.accounting_event_id = AEH.accounting_event_id
AND I.invoice_id = AE.source_id
AND AE.source_table = 'AP_INVOICES'
AND AEH.ae_header_id = AEL.ae_header_id
AND DECODE(ael.source_table,'AP_INVOICE_DISTRIBUTIONS', AEL.source_id,NULL) = D.invoice_distribution_id(+)
AND AEL.gl_sl_link_id = R.gl_sl_link_id
and ael.code_combination_id = GL.code_combination_idThen your query is completely wrong.
Your query is looking at Purchase Order tables.
If you want sales order data, you should be looking at OE tables (such as OE_ORDER_HEADERS_ALL, OE_ORDER_LINES_ALL etc.)
Sandeep Gandhi -
UK VAT - MWST Condition Rate in Sales Order different to Billing Document
We are testing the UK VAT Rate Change.
Condition MWST has a rate of 15% until today and 17.5% from tomorrow.
When I create a sales order with a requested delivery date of tomorrow and a pricing date of today the MWST Condition is shown as 17.5% at both header and lin eitem.
If I create a delivery, post goods issue and create a billing document today, the billing document correctly shows the MWST Condition rate as 15%%.
But the Sales document still displays the MWST Condition rate as 17.5% .
?? How can I get the sales document to display the actual condition rate ??
I cannot find a solution to this anywhere and would be grateful for any help.
Regards,Hi Michael,
If the pricing date for the Sales Order and the Billing Document are the same, the VAT should be also be the same.
But the pricing date for both document does not always have to be the same.
If the real goods issue date is different from the planned goods issue date and you use it as a reference for the pricing date, then both dates will be different & that's OK. The same would happen if a discount is changed after the Sales Order is introduced but before billing & a new price determination takes place during billing.
IMHO the Billing Document is the critical document and needs to have the right VAT rate.
The Sales Order should have the data calculated based on the best information available at creation time, but does not need to be corrected after Billing.
Best Regards,
Franck -
Copy header text of mult sales orders in a billing document
Hello Gurus,
My requirement is to pass the header text from Sales order to a Billing document.
However, if I create a billing document with reference to just one sales order, it is getting copied correctly in header text of a billing document.
In case of multiple sales orders for one billing document VF01, it copies header text elements of only first sales order, and not the other ones.
Kindly tell me how to copy the header texts of all the Sales Orders in a billing document.
Thanks....Use the user exit "RV60AFZC" to populate the header text.
Regards
Vinod -
Sales order, Delivery and Billing document creation
Hello Experts,
I am working on credit management and am in need of creating sales order, delivery and billing document.
Can some one send me the screen shots or any doc which outlines order,delivery and billing document creation.
Will award points definitely.
Also what are the t.codes for these creation?
Regards,
SriramOrder Create:
Transaction VA01
Give the order type , If standard order use OR or ZOR, which ever is maintained
Then give the sold to and press enter
In the Items screen Give the material and quantity and press enter. This should be enough to create an order, if u need u can give order reasons...etc. Then save the Order. Note down the order number.
Go to VL01N-
and give the above order for which u are doing delivery, In the pick quantity enter the amount in the order and press enter. and make sure the delievry date should be the same in the Sales Order Schedule line- REquested delivery date. Save the document.Note down the document number
Go to VL02N - Open the above delivery document and click on PGI - done
Now go to VF01 and this should bring up the delivery document number., If it doesnt , give the delivery document number and hit enter. then save the document. Billing is done.
Regards
Sai -
BAPI to get sales order details
Hi guys
I have copied a print program for outbound delivery (vl03n) and now i wanna use the same to get the details for an inbound delivery (vl33n). Obviously I need to change the logic, so i have taken the delivery num lips-vbeln and got the ref doc lips-vgebl and got the PO ekkn-vbeln anf now I have the sales orfer vbap-vbeln. The Question is i need the sales order detail like the vendor address name ship to party etc, is there a good bapi that gets the sales order details? I have tried the foll but they dont help
BAPISDORDER_GETDETAILEDLIST
BAPI_SALESORDER_GETDETAILBOS
BAPI_ALM_ORDER_GET_DETAIL
Does any one know of a better method to get the sales order detail? Maybe if some one could tell how to do it without a bAPI?
Rgds
Sameercheck BAPI_SALESORDER_CREATEFROMDAT2
MOVE 'TA' TO L_HEADER-DOC_TYPE.
MOVE 'ABC' TO L_HEADER-SALES_ORG.
MOVE '10' TO L_HEADER-DISTR_CHAN.
Sold-to AG partner mandatory fields
MOVE 'AG' TO L_PARTNER-PARTN_ROLE.
MOVE '101175' TO L_PARTNER-PARTN_NUMB.
APPEND L_PARTNER.
Ship-to WE partner mandatory fields
MOVE 'WE' TO L_PARTNER-PARTN_ROLE.
MOVE '101175' TO L_PARTNER-PARTN_NUMB.
APPEND L_PARTNER.
MOVE 'DEXABC' TO L_ITEM-MATERIAL.
APPEND L_ITEM.
partner roles 'RE' and 'RG' (bill-to-party) -
Open sales order report with billing date.
Hi,
I want to know if there's an available report for open sales order with billing date field.
Thank you.Hi,
If your case is "Order-related" Billing,you can use the T.Code "VF04" for this purpose.
One more way is to go for a custom report.
Make a copy of code of the T.Code "VA05n"(Program Name is "SD_SALES_ORDERS_VIEW").
Change the code as per your requirement to display the field "Billing Date" in the report.
Check with your ABAPer if you wish to go for a custom report.
Regards,
Krishna. -
Bapi or Fm to get sales order details
Hi,
can any one tell me a bapi or fm to get the sales order header and partner data?
plz help.
Himanshucheck BAPI_SALESORDER_CREATEFROMDAT2
MOVE 'TA' TO L_HEADER-DOC_TYPE.
MOVE 'ABC' TO L_HEADER-SALES_ORG.
MOVE '10' TO L_HEADER-DISTR_CHAN.
Sold-to AG partner mandatory fields
MOVE 'AG' TO L_PARTNER-PARTN_ROLE.
MOVE '101175' TO L_PARTNER-PARTN_NUMB.
APPEND L_PARTNER.
Ship-to WE partner mandatory fields
MOVE 'WE' TO L_PARTNER-PARTN_ROLE.
MOVE '101175' TO L_PARTNER-PARTN_NUMB.
APPEND L_PARTNER.
MOVE 'DEXABC' TO L_ITEM-MATERIAL.
APPEND L_ITEM.
partner roles 'RE' and 'RG' (bill-to-party) -
Profit center is not picking from sales order to the billing document
Hi
I am creating billing document but it is not picking profit centre from the sales order.
Could you please help me in this.
thanks in advamce.Hi,
Ensure that the profit center is assigned to your Sales order.
Also maintain the following settings in copy control.
Goto the T.Code "VTFA".
Select your valid combination.Details.
Double click on "Item".Select your Item category.
Details.
Maintain "Copy requirements" as "002".
Data VBRK/VBRP as "002".
Regards,
Krishna. -
FM to create Sales Order from reference billing document
Hi,
I need to create a sales order from a reference billing document. Please tell me if there is any function module/BAPI to do that.
Thanks in advance for the help
Regards,
VarunHi
<b>SD_SALES_DOCUMENT_COPY</b> copy Sales Doc into new one with the required Sales Doc Type (VBAK-AUART) for further creating.
<b>SD_SALES_DOCUMENT_SAVE</b> create Sales Doc from the copied document
create subsequent document
REPORT Z.
data: w_auart like vbak-auart, "current SalesDoc type
w_auara like tvak-auara, "Subsequent SalesDoc type
w_vbak like vbak.
parameter p_vbeln like vbak-vbeln.
at selection-screen on p_vbeln.
SELECT SINGLE auart FROM vbak into w_auart
WHERE vbeln = p_vbeln.
if sy-subrc <> 0.
message e398(00) with 'Sales Doc' p_vbeln 'not found'.
endif.
start-of-selection.
SELECT SINGLE auara FROM tvak into w_auara
WHERE auart = w_auart.
if sy-subrc <> 0 or w_auara is initial.
message e398(00) with 'Subsequent type not defined for' w_auart.
else.
1. copy
CALL FUNCTION 'SD_SALES_DOCUMENT_COPY'
EXPORTING
i_auarn = w_auara
i_vbeln = p_vbeln.
2. paste
CALL FUNCTION 'SD_SALES_DOCUMENT_SAVE'
IMPORTING
evbak = w_vbak.
3. commit
COMMIT WORK.
4. report
write: / 'Sales Doc', w_vbak-vbeln, 'created.'.
endif.
regards
vinod -
Find the sales order number with delivery document
hi:
i want to quickly look for the delivery document related the sales order ,now i find it via se16 in talble vbfa.
please help me provied with means.
best regards.hello, friend.
you can go to your delivery document and click on the 'document flow' icon. you will see the sales order number there.
regards. -
Populate sales order number in billing document's reference field
Hi,
I have a requirement to populate the sales order number in the billing document's reference field. Hence, I have tried to find a user exits but sadly, all the user exits which I found does not break into my break-point.
Thus, may i know whether any other people has similar requirements? In addition, how do you solve this issue?
Thanks!Solve this issue. Apprantly, I break to the wrong user id which resulted in difficulty in finding the user exits.
-
Sales Order Status with Billing Plan
Dear SAP SD Gurus,
I have an order with 2 billing plans and both of them have been invoiced.
The status of my order still considered "being processed" eventhough both invoiced have been created and posted to FI.
I'm using item category "TAO".
Any clue will be greatly appreciated.
Thanks,
SooDear All,
I have fixed the problem. The schedule line for TAO should be non-delivery relevant.
I have changed to not-relevant for delivery and it is working now.
Thanks a lot for all the clues.
Regards,
Soo -
Tax date in sales orders and invoices (Billing)
Hello Experts,
I have an issue related to Tax date in sales orders and Billing documents.
In our environment we calculate taxes at the time of sales order creation and billing document (invoice) creation.
Currently we modified 'ZXFYTU03' exit to pass tax date which is system date. Our business processes are such that, there is a gap of 3-5 days between sales order creation and billing creation. So for some orders we see tax discrepancies between order and billing.
Through forums I understand that we can use 'service rendered date' at sales order item level. Solution would be passing date in 'service rendered date', we can pass date in 'service rendered date' field in sales order.
The problem is to copy same date in billing document 'service rendered date'
Does anyone have any idea how we can copy the sales order service rendered date to invoice service rendered date?
Through forum i understand that we can use copy controls, data transfer routines etc...Appreciate if someone can guide me on how i can use these...
Thanks in advance
PradeepTried 2 options...
1. Modify program RV60AFZC (FORM USEREXIT_FILL_VBRK_VBRP) to pass VBRP-FBUDA = VBKD-FBUDA. But in later part of the process, in SAPLV60A-LV60AA21 (perform fakturadaten_lieferbezogen), VBRP-FBUDA is overwritten by LIKP-WADAT_IST which is goods movement date. So this is not solving my problem.
2. Modify program ZXVVFU08, to get service rendered date from VBKD-FBUDA based on CVBRK-XBLNR (Sales order) and populate CVBRP-FBUDA. But unfortunately this user exit is being called after user exit 'ZXFYTU03' where tax related data including tax date which is being passed. Somehow tax date in this user exit 'ZXFYTU03' is document creation date which is system date.
With 2nd option, service rendered date from sales order is copied to invoice doc, but the tax is calculated based on document creation date since the tax user exit 'ZXFYTU03' is being called first...
Per this, coustom routine did not work...
Refer: Service Rendered Date (VBRP-FBUDA) for SD Invoice -
Dear Experts,
I have created a quotation in CRM system. I want that to be downloaded into ECC, so that, I can create a sales order there with reference to that quotation. What are the parameters that I need to set in CRM system so that my quotation gets replicated without any error?
Please help me in this regard. An early and in detail step by step guidance is highly appreciated.
Thanks,
SMTPIt may be best to recreate the folder and the smart playlists from scratch.
tt2
Maybe you are looking for
-
HI, SO I BOUGHT MOUNTAIN LION ON MY MACBOOK PRO TRYING TO UPGRADE FROM SNOW LEOPARD, AND WHILE TRYING TO REINSTALL THE OS SETUP AS IT SHOWED IT COULDNT BE VERIFIED, I CROSSED OUT MOUNTAIN LION FROM MY PURCHASES, ITS NOW GONE, DO I HAVE TO BUY IT AGAI
-
Has anyone seen changing map ids corrupting an HTML project?
I am working in RoboHelp8, and generating .chm help files to be attached to my company's software application. I built a map id file from numbers the programmer gave me. His calls have been able to use my generated files, but the "HH_HELP_CONTEXT cal
-
Some problems about jtree, undo
I wrote a programme about do somethings to this jtree, like add a node, remove a subtree, but I wanna add a function of undo, but I don't know how. Like I operated this jtree, but I wanna undo, how? give some advice, thanks
-
Question do change in all language necesary while changing any form EN
hi i want to know whether if we are changing any form in any language do the changes are necesaary to do for all languages line EN or chinges or japenese if the form exists in that language if we do nt do what id implication or complication for that
-
IPad 2 YouTube videos are green and choppy?
I can see the video but it keeps flashing green and chopping out. Anybody know how to fix this? I would really appreciate it.