Sales Order along with Invoices
HI All,
In ALV Output I'm getting one Invoice(current) respect to sales order.But there is so many invoices.
Pls. help me how to get all invoice with respect to one sales order in ALV O/P.
Pls send Example code for this.
Thanks..
Singha
Hello Sigha,
I think u r reading the ur Invoice internal table.
Instead Loop th table.
Loop at it_sales.
loop at it_invoice where VBELN = it_sales-VBELN
and POSNN = it_sales-POSNN.
<b>Move data to ur Outtab.</b>
append outtab.
endloop.
endloop.
If useful reward the points.
Regrads,
Vasanth
Similar Messages
-
Sales order report with order attachments
Hi All
I am writing a program for a 2 part report that gives a list of sales orders with attachment flags and a list of invoices that do not have the output processed due to the presence of attachment flag.
Firstly i need help regarding few queries in the process of writing this program.
1. How can i distinguish between a sales order with attachement and one without an attachment.
2. What is the related field for attachment in sales header/sales item table(s) or any other sales related table which will contain information of the attachment in the sales order.
3. If I have an attachment in sales order, will it have an effect in the output being processed for the invoice for that order.
Thanks in Advance
--MikeHello Erik,
is there a sales order report with the complete line-item pricing
breakdown. For example, In VA05 I'm only able to get the Net
Price and Net Value as an output. I would also like to view the
breakdown of the conditions (e.g. disounts, tax, etc.)
Is there another report in SAP that will show this? Or a backend
table I can pull this information from to create a query?
The best way to handle your requirement is to create a Custom report using the standard table for Sales Order i.e. VBAK and you can pick up the Document Condition Number. You can pass this number to table KONV and pull up all the values for the active contion type which was responsible for Sales Order price calculation. Please reach out to a ABAPer to develop this sort of a custom report.
Just FYI, if you want to check out all the value for a specific condition type, then you can use the standard report i.e. V/LD.
Please update your post after carrying out this exercise.
Regards,
Sarthak -
Purchase Order Reprot with Invoice verification details
Hi Friends,
I need a SAP standard report, in which I can get the PO details for a perticular period of release date along with Invoice verification details, i.e. how much value has been passed and how much is pending.
Can you please suggest any SAP standard report for the Subject.
Kraheja.Hi
Check ME2n report with selection parameter as GUTSCHRIFT or ME80fn with purchase order history.
Thanks -
BAPI SALES ORDER & Copy with reference
Hello,
I'm creating sales order copied with reference to an invoice. My problem is that the data item is empty. When I create the sales order manually and use the option 'Create with reference' and choose an invoice, the sales order is created with all data item. I don't know how I can get to copy the data item from the invoice in the new sales order. The code that I'm using is the following:
DATA: order_header_in LIKE bapisdhd1,
order_partners LIKE bapiparnr OCCURS 0 WITH HEADER LINE,
order_text LIKE bapisdtext OCCURS 0 WITH HEADER LINE,
order_header_inx LIKE bapisdhd1x,
order_item_in LIKE bapisditm OCCURS 0 WITH HEADER LINE,
order_schedules_in LIKE bapischdl OCCURS 0 WITH HEADER LINE,
order_conditions_in LIKE bapicond OCCURS 0 WITH HEADER LINE,
extensionin LIKE bapiparex OCCURS 0 WITH HEADER LINE,
partneraddresses LIKE bapiaddr1 OCCURS 0 WITH HEADER LINE,
order_cfgs_ref like BAPICUCFG occurs 0 with header line.
DATA: salesdocument LIKE bapivbeln-vbeln.
DATA: return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
order_header_in-doc_type = 'ZA09'.
order_header_in-sales_org = '1700'.
order_header_in-distr_chan = '01'.
order_header_in-division = '01'.
order_header_in-BILL_DATE = '20060701'.
order_header_in-ref_doc = '0900000019'.
order_header_in-refdoc_cat = 'M'.
*order_header_in-REF_DOC_L_LONG = '0900000019'.
order_header_in-purch_no_c ='prueba'.
*order_header_in-ord_reason = '003'.
*order_header_in-pmnttrms = '0002'.
*order_header_in-sales_off = '2800'.
order_header_in-ref_doc_l = 'FACTURA ES'.
*order_header_in-fix_val_dy = '20060701'.
*order_header_in-currency = 'USD'.
*order_header_in-exchg_rate = '1.2'.
order_partners-partn_role = 'AG'.
order_partners-partn_numb = '0000000001'.
order_partners-langu = 'EN'.
order_partners-name = 'El corte aleman'.
order_partners-country = 'ES'.
APPEND order_partners.
order_partners-partn_role = 'RE'.
order_partners-partn_numb = 'ARR000'.
order_partners-addr_link = '0000030044'.
APPEND order_partners.
CALL FUNCTION 'ADDR_GET_COMPLETE_ALL_TYPES'
EXPORTING
addrnumber = order_partners-addr_link
PERSNUMBER =
address_object_type = '1'
IV_CURRENT_COMM_DATA = 'X'
IMPORTING
ADDR1_COMPLETE =
ADDR2_COMPLETE =
ADDR3_COMPLETE =
ADDR1_COMPLETE_BAPI = partneraddresses
ADDR2_COMPLETE_BAPI =
ADDR3_COMPLETE_BAPI =
EXCEPTIONS
PARAMETER_ERROR = 1
ADDRESS_NOT_EXIST = 2
PERSON_NOT_EXIST = 3
INTERNAL_ERROR = 4
OTHERS = 5
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
data: vl_texto(40) value 'NUEVOOOOO'.
partneraddresses-name = vl_texto. clear vl_texto.
partneraddresses-name_2 = vl_texto.
partneraddresses-name_3 = vl_texto.
partneraddresses-name_4 = vl_texto.
partneraddresses-langu = 'E'.
APPEND partneraddresses.
DATA: vl_cantidad LIKE bapisditm-target_qty.
vl_cantidad = 1.
order_item_in-itm_number = 10.
order_item_in-material = 'HONORARIOS'.
order_item_in-ref_doc = '0900000019'.
order_item_in-ref_doc_it = 10.
order_item_in-ref_doc_ca = 'M'.
APPEND order_item_in.
order_schedules_in-itm_number = 10.
order_schedules_in-req_qty = vl_cantidad.
APPEND order_schedules_in.
order_text-text_id = 'Z001'.
order_text-ITM_NUMBER = ''.
order_text-langu = 'EN'.
order_text-text_line = 'Hola, CARACOLAcola'.
APPEND order_text.
order_text-text_id = 'Z001'.
order_text-langu = 'EN'.
order_text-text_line = 'Adios caracol'.
APPEND order_text.
order_text-itm_number = '000010'.
order_text-text_id = '0001'.
order_text-langu = 'EN'.
order_text-text_line = 'Hola, POSICIÓN'.
APPEND order_text.
extensionin-structure = 'BAPE_VBAK'.
extensionin-valuepart1 = ' BCL 7'.
APPEND extensionin.
order_cfgs_ref-posex = '10'.
order_cfgs_ref-config_id = '10'.
order_cfgs_ref-root_id = '00000001'.
append order_cfgs_ref.
CALL FUNCTION 'ZBAPI_SALESORDER_CREATEFROMDT2'
EXPORTING
SALESDOCUMENTIN = salesdocument
order_header_in = order_header_in
ORDER_HEADER_INX = order_header_inx
SENDER =
BINARY_RELATIONSHIPTYPE =
INT_NUMBER_ASSIGNMENT =
BEHAVE_WHEN_ERROR =
LOGIC_SWITCH =
TESTRUN =
CONVERT = ' '
IMPORTING
salesdocument = salesdocument
TABLES
return = return
order_items_in = order_item_in
ORDER_ITEMS_INX =
order_partners = order_partners
order_schedules_in = order_schedules_in
ORDER_SCHEDULES_INX =
order_conditions_in = order_conditions_in
ORDER_CONDITIONS_INX =
ORDER_CFGS_REF = 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_text
ORDER_KEYS =
extensionin = extensionin
partneraddresses = partneraddresses
PERFORM report TABLES return.
*DATA: salesdocument LIKE bapivbeln-vbeln.
*DATA: return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
*refresh return.
*CALL FUNCTION 'BAPI_SALESDOCUMENT_COPY'
EXPORTING
salesdocument = '0400000191'
documenttype = 'ZA04'
TESTRUN = ' '
IMPORTING
SALESDOCUMENT_EX = salesdocument
TABLES
RETURN = return
*PERFORM report TABLES return.
*write: / salesdocument.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT =
IMPORTING
RETURN =
*& Form report
text
-->P_MENSAJE text
FORM report TABLES p_mensaje STRUCTURE bapiret2.
DATA: vl_mensaje TYPE string.
LOOP AT return.
CLEAR vl_mensaje.
MESSAGE ID return-id
TYPE return-type
NUMBER return-number
INTO vl_mensaje
WITH return-message_v1
return-message_v2
return-message_v3
return-message_v4.
WRITE: / vl_mensaje.
ENDLOOP.
ENDFORM. " reportHi Manuel,
There are some function modules which is there to copy the order details. I am not sure about the function module name. But you can search in SE37. But bapi for creating the sales order does not have the functionality of copying the data from one document to another document.
You can try using this function module.
BAPI_SALESDOCUMENT_COPY
Data will be copied based on the copy control routines that is set between the two document types.
Thanks,
Arun -
Sales order value based invoicing
Hi ,
Present setting is that Invoicing is done based on the quantity, is it possible that I can do the invoicing based on sales order value.
2) How to control that Invoicing value and quantity should not exceed the sales order quantity and value.
RegardsHi
most of conditions used in sales pricing get copied directly from order to invoice, only freight and delivery charges are aded up while generation of invoice.
So functionally if you can estimate freight or delivery charge value in sales order ,you can always maintian routine to be triggered in pricing procedure while invoice generation to indicate whether invoice freight value is exceeding either the individual freight value for sales order or compare total sale order value with total invoice value.
You can set error message if value exceeds than allowed condition value and so the transaction will not be saved.
Alternatively Condition types AMIZ,AMIW can also be used to have a control through estimation.
Create appropriate pricing routines with the help of ABAP developer and apply to condition value. Use statistical condition types for control of conditions.and I think what you are trying to achieve can be done.
Regards
Mandar -
Any function module or bapi to get sales order number and invoice number?
hi all,
with delivery order number provided, do we have any function module or bapi to get sales order number
and invoice number?
thanks.Hi,
Check
BAPI_SALESORDER_CREATEFROMDAT1
BAPI_REMUREQSLISTA_CREATEMULT Agency Business: BAPI Create Invoice Lists from Vendor Billing Documents
BAPI_REMUREQSLISTB_CREATEMULT Agency Business: BAPI Create Invoice Lists from Payment Documents
BAPI_REMUREQSLISTC_CREATEMULT Agency Business: BAPI Create Invoice Lists from Posting Lists
BAPI_REMUREQSLIST_CHANGEMULT Agency Business: Change Invoice List Documents BAPI
BAPI_REMUREQSLIST_GETLIST Agency Business: BAPI Determine Detailed Data for Invoice List Documents
BAPI_REMUREQSLIST_RELEASE Agency Business: BAPI Release Invoice List Documents to FI
Edited by: Neenu Jose on Nov 26, 2008 8:53 AM -
Generating sales order and reserve invoice in a row
Hi all,
i'm using B1iSN PL14 with sap B1 8.8.
I need to build the following scenario :
I receive an xml file representing a sales order, i have to create :
- a sales order
- a reserve invoice based on the sales order
I've create two BIUs that currently work.
But now i'd like to chain the two BIUs and execute the the invoice creation only if a sales order has been created.
What is the best way to do tha kind of thing ?
thanks !I found it difficult in a similar situation & unfortunately didn't get much response from here.
My workaround solution was:
- I removed the filter for the B1i user; it's explained in the extensibility guide I think. Basically B1i ignores any events created by itself, but I removed that so B1i received all events including ones created by B1i itself.
- When creating my first document (for the example lets say it was a Sales Order), I entered a specific text in the remarks field - you could also use a UDF
- Then my BIU for the second document then had the following conditions
Document = Sales Order
User = B1i
Remarks = CreatedWithB1i (for example)
So using this, any time my first BIU completed succesfully, it triggered the second one... it's clearly a workaround solution, but it worked for me. -
How to hide componant row of BOM while creating sales order OR AR Invoice
Dear expert
my client wants to create Sales order with Sales BOM, but they do not want to see componant product while create sales order or AR invoice they want to see only parent items.
Please help me asapHi,
check below link
Avoid printing child items of Sales BOM in AR Invoice
Regards
Deepak Tyagi -
Table For Open Sales Order And Customer Invoices
Dear Gurus,
Are there any table to know open Sales orders and pending invoices for Customers?
Wishes,
AbhishekHi,
Go to T code VA05 and select open sales order radio button. Put other input parameters like date range or sold to . Execute you shal get list of all open sales order.
For pending invoices go to T code VL04 and you get list of all billing not yet created even though GI is done.
These are standard SAP functionality and can be used rather than looking in a table level.
Regards
Vivek -
Do we have standard report to show sale order stock with amount?
Do we have standard report to show sale order stock with amount?
I try to use MB5B and MBBS but they don't show value.
MB5B show only qty
MBBS no any report.
Please kindly help.
Thank you very much.Okay Thank you very much for your suggestion.
I think I have to create a new ZProgram. T_T -
Read Sales Order Price with Pricing Date (PRSDT)
Hello ABAP Gurus,
I have once requirements and is, I need to extract sales order prices with a given Pricing Date (PRSDT).
Could you please tell me if these is Function Module or BAPI that I can use?
Regards,
MuraliMaintain a condition record for Rs.10/- with a validity date (only as an example) as 1st March'14 to 15th March'14. Another condition record for Rs.15/- with validity date as 16th March'14 to 31st March'14.
Now create a sale order for 500 nos. with one line item and change the pricing date as 15th March'14. Similarly, create another line item for the same material with 500 nos. and here, change the pricing date as 16th March'14 at line item level. By doing so, system would fetch the pricing in billing accordingly.
I told as per my knowledge System will bring old price only for reserved stock if you want to apply new price for reserved stock just 411 e return the stock from reservation and now create sales order
i hope this right
Your understanding is incorrect. System will never validate pricing based on age of the stocked material but based on validity period what you maintain in condition record.
G. Lakshmipathi -
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
JKHere 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 -
Sales Order Report with Pricing Breakdown
HI, is there a sales order report with the complete line-item pricing breakdown. For example, In VA05 I'm only able to get the Net Price and Net Value as an output. I would also like to view the breakdown of the conditions (e.g. disounts, tax, etc.)
Is there another report in SAP that will show this? Or a backend table I can pull this information from to create a query?
Thanks, ErikHello Erik,
is there a sales order report with the complete line-item pricing
breakdown. For example, In VA05 I'm only able to get the Net
Price and Net Value as an output. I would also like to view the
breakdown of the conditions (e.g. disounts, tax, etc.)
Is there another report in SAP that will show this? Or a backend
table I can pull this information from to create a query?
The best way to handle your requirement is to create a Custom report using the standard table for Sales Order i.e. VBAK and you can pick up the Document Condition Number. You can pass this number to table KONV and pull up all the values for the active contion type which was responsible for Sales Order price calculation. Please reach out to a ABAPer to develop this sort of a custom report.
Just FYI, if you want to check out all the value for a specific condition type, then you can use the standard report i.e. V/LD.
Please update your post after carrying out this exercise.
Regards,
Sarthak -
What happens sales order linked with wip job is cancelled
HI,
what happens sales order linked with wip job is cancelled ?
actually if wip job is cancelled then sales order lines is on hold ?
i wanted to know what if sales order of that wip job item line is cancelled say example if that wip job already is in processing .
please help me
Thanks in Advance.If WIP job cancelled or Requisition/PO is cancelled, corresponding order line reservation will be cleared and will go to 'Supply Eligible' Status. Progressing this line will again follow the WIP/Requisition path based on item.
-
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
-
Restrict PO based on the maximum stock level qty in MMR
Hi We have maintained Maximum Stock level in MRP1 in Material Master. Is there any facility which can restrict the Purchaser, not to raise any PO more than maximum stock level qty which is maintained in Material Master ??? how to do ? Is there any us
-
Hi All, Getting following error while starting up the SAP. 4 ETW000 167 0.000980 4 ETW000 [dlux.c ,00000] *** ERROR => DlLoadLib: dlopen()= Unable to find library 'li
-
HT204291 Apple TV Connect and mirror problem
i need to connect and mirror my macbook pro , ipad , iphone to apple tv and i cant see the airplay icon on any of them .... all devices are updated and connected to the same wi-fi .... please help
-
How can i use the highlight row to select the row on a report
The row is highlighted as I move the mouse how can I select this row without having to make a column a text link. thanks in advance
-
HOW to use xml to transfer data from database?
Hi, Would you please give me some suggestion on how to use xml connect with a table in oracle/MS_access database? Thanks a lot Zhao