How to get purchase order number from delivery number?
hi all,
how to get purchase order number and item if i have only delivery.
and in same way how to get po number and item if i know only batch number.
kindly give me some solution i need this urgently.
thanks in advance.
Check the logic below:
* Selecting the Sales Documents from VBFA for corresponding Invoice
SELECT vbelv
posnv
FROM vbfa
INTO TABLE gt_itab3
WHERE vbeln EQ gt_itab5-vbeln
AND posnn EQ gt_itab5-posnr
AND vbtyp_n EQ 'J'.
IF sy-subrc EQ zero.
SORT gt_itab3 BY vbelv posnv.
ENDIF.
ENDIF.
IF NOT gt_itab3 IS INITIAL.
* Selecting the Purchase Orders from VBFA for corresponding Sales Documents
SELECT vbeln
posnn
FROM vbfa
INTO TABLE gt_itab4
FOR ALL ENTRIES IN gt_itab3
WHERE vbelv EQ gt_itab3-vbelv
AND posnv EQ gt_itab3-posnv
AND vbtyp_n EQ 'V'.
IF sy-subrc EQ 0.
SORT gt_itab4 BY vbeln posnn.
ENDIF.
ENDIF.
Batch number will be there in delivery item.
Regards
Kannaiah
Similar Messages
-
How to get the order type from notification number
Hi,
i have the notification number,
fromthis number how can i get the Maintenance Order type.
what is the table name to get the order type.
Please tell me.Hi,
First you read table QMEL with notification number and get AUFNR. Then go to AUFK and get AUART (order type).
Some thing like,
SELECT SINGLE aufnr INTO lv_aufnr FROM qmel WHERE qmnum EQ <your notification>.
IF sy-subrc EQ 0 AND NOT lv_aufnr IS INITIAL.
SELECT SINGLE auart INTO lv_auart FROM aufk WHERE aufnr EQ lv_aufnr.
ENDIF.
Hope this helps..
Sri -
Which table I can get sales order no from delivery numbar.
Hi,
I want sales order no from delivery no. right now I am using table VBFA where I am passing VBELN and POSNN and geting sales order no. but performance of select query is very poor bcouse I am not passing first two key fields in the select query.
Is there any other tablefrom where we can get sales order no. from delivery no. so that performance of report can be improved.
Thanks,hi,
sales doc header ( table VBAK ) copy to Delivery header table( LIKP)
sales doc item table ( VBAP) copy to Delivery item table( LIPS)
you can see this in copy control VTLA ,
now u want slaes doc no. from dilv doc. no.
so go to t-code se11.....
fill table LIKP u will get VBELN field for deliv doc no, & TERNR field for sales doc. no.
so if u want to call sales doc no from dilv doc no.. u can use table LIKP in ur report.
i hope it will help u. -
HOW to retrieve PURCHASE ORDER DATA from archieve file and print a report
Dear all
1) I have retrieve purchase order data from archived files.
2) print purchase order data and created pdf file.
VIJ.............
Moderator message - Please ask a specific question - post locked
Edited by: Rob Burbank on Apr 28, 2009 12:00 PMDear all
1) I have retrieve purchase order data from archived files.
2) print purchase order data and created pdf file.
VIJ.............
Moderator message - Please ask a specific question - post locked
Edited by: Rob Burbank on Apr 28, 2009 12:00 PM -
How to capture Purchase order text from MM02
Hi Friends ,
i have a requirement like i have to capture the purchase order text from MM02
from one program.
Pls give helpful code .
Thanks & Regards
Jagadeeshwar.Bachuhi
check this code
Hi,
declare the paramters like:
To fetch Long Text lines for READ_TEXT function module
DATA:BEGIN OF dt_lines OCCURS 0.
INCLUDE STRUCTURE tline. " Long Text
DATA:END OF dt_lines.
Variable declarations for Read_TEXT function module
DATA : dl_name TYPE thead-tdname, " Object Name
dl_lan TYPE thead-tdspras. " Language
Constants
CONSTANTS:
Object ID for Long Text of Sales Item Text
c_best TYPE thead-tdid value 'Z026', ID
c_object TYPE thead-tdobject . " Object
Object will be VBBK, and the Object name will be the concatenation of Sales order and Item No(for Item texts) and only Sales order for Header texts.
Language will be default sy-Langu.
In the loop of Sales orders call this fun module and use by passing all the above 4 paramters ID,OBJECT,NAME and LANG.
You double click on that text
GOTO -> header you will know the all above paramters.
READ_TEXT
READ_TEXT provides a text for the application program in the specified work areas.
The function module reads the desired text from the text file, the text memory, or the archive. You must fully specify the text using OBJECT, NAME, ID, and LANGUAGE. An internal work area can hold only one text; therefore, generic specifications are not allowed with these options.
After successful reading, the system places header information and text lines into the work areas specified with HEADER and LINES.
If a reference text is used, SAPscript automatically processes the reference chain and provides the text lines found in the text at the end of the chain. If an error occurs, the system leaves the function module and triggers the exception REFERENCE_CHECK.
Function call:
CALL FUNCTION 'READ_TEXT'
EXPORTING CLIENT = SY-MANDT
OBJECT = ?...
NAME = ?...
ID = ?...
LANGUAGE = ?...
ARCHIVE_HANDLE = 0
IMPORTING HEADER =
TABLES LINES = ?...
EXCEPTIONS ID =
LANGUAGE =
NAME =
NOT_FOUND =
OBJECT =
REFERENCE_CHECK =
WRONG_ACCESS_TO_ARCHIVE =
Export parameters:
CLIENT
Specify the client under which the text is stored. If you omit this parameter, the system uses the current client as default.
Reference field: SY-MANDT
Default value: SY-MANDT
OBJECT
Enter the name of the text object to which the text is allocated. Table TTXOB contains the valid objects.
Reference field: THEAD-TDOBJECT
NAME
Enter the name of the text module. The name may be up to 70 characters long. Its internal structure depends on the text object used.
Reference field: THEAD-TDNAME
ID
Enter the text ID of the text module. Table TTXID contains the valid text IDs, depending on the text object.
Reference field: THEAD-TDID
LANGUAGE
Enter the language key of the text module. The system accepts only languages that are defined in table T002.
Reference field: THEAD-TDSPRAS
ARCHIVE_HANDLE
If you want to read the text from the archive, you must enter a handle here. The system uses it to access the archive. You can create the handle using the function module ACHIVE_OPEN_FOR_READ.
The value '0' indicates that you do not want to read the text from the archive.
Reference field: SY-TABIX
Default value: 0
Import parameters:
HEADER
If the system finds the desired text, it returns the text header in this parameter.
Structure: THEAD
Table parameters:
LINES
The table contains all text lines that belong to the text read.
Structure: TLINE
Exceptions:
ID
The text ID specified in the parameter ID does not exist in table TTXID. It must be defined there together with the object of the text module.
LANGUAGE
The parameter LANGUAGE contains a language key that does not exist in table T002.
NAME
The parameter NAME contains the name of a text module that does not correspond to the SAPscript conventions.
Possible errors:
The field contains only blanks.
The field contains the invalid characters * or ,.
OBJECT
The parameter OBJECT contains the name of a text object that does not exist in table TTXOB.
NOT_FOUND
The system did not find the specified text module.
REFERENCE_CHECK
The text module to be read has no text lines of its own but refers to the lines of another text module. This reference chain can include several levels. For the current text, the chain is interrupted, that is, one of the text modules referred to in the chain no longer exists.
WRONG_ACCESS_ TO_ARCHIVE
The exception WRONG_ACCESS_TO_ARCHIVE is triggered if an archive is accessed using an incorrect or non-existing archive handle or an incorrect mode (that is, read if the archive is open for writing or vice versa).
regards
siva -
How to get master sales order number from delivery number
Hi All,
I need logic for getting master sales order number from available Delivery number.
Note: There can be many SO's in diffrent levels.
Finally i need to pick up master sales order no.
Thanks in advance.
Thanks,
Deep.Hi,
I have a outbound delivery[VL03N] 'X' in my system .
Then for getting sales order no i am writing below code:
SELECT single vbelv vbeln
from vbfa
INTO (vbelv, vbeln)
where vbeln EQ p_vbeln AND
vbtyp_n EQ 'J'.
Then vbelv i need to pick up master sales order no.
SELECT vbelv vbeln
from vbfa
INTO TABLE i_so
where vbeln EQ l_vbelv AND
vbtyp_n EQ 'C'.
If i write code as above it is giving four sales orders which one of them is master sales order no!
Thanks,
Deep. -
How to trace sales order number from delivery number, when batch is split
Hi All,
I have created a Sales Order and a Outbound Delivery against the sales order.
While creating the Outbound delivery, I have split the qty in two batches.
Now when I go in table LIPS, and search on the basis of the Delivery number, I get two rows, one for each batch. But here the sales order LIPS-VGBEL, and Sales order item no (LIPS-VGPOS) is updated only for the 1st batch line item, but is not updated for the second batch line item.
Please help me so that on the basis of the delivery number, i will be able to find record from tables for sales order for both the line items (i.e. for each batch).
Immediate help would be appreciated.
Thanks in Advance.
AnkushHi,
I have created delivery against sales order.
While picking (during delivery PGI), I selected two batches to suffice the delivery qty. Please refer the example quoted below.
Sales order (SO1) - Material (Mat1) - qty (15 ea)
Delivery against sales order (Del1) - batch split: batch1 - 10 ea
batch2 - 5 ea
In table LIPS: when I enter delivery number as "Del1" and execute, I get 2 records:
del no. Item No. Material Qty Batch no Sales Order no Sales Order Item no
1. DEL1 10 Mat1 10 ea batch1 SO1 10
2. DEL1 20 Mat1 5 ea batch2 ______ ____
Thus in the 2nd record, the Sales order no.(LIPS-VGBEL) and sales order item no. (LIPS-VGPOS) does not get updated.
I have to develop a report to display the Sales Order number and sales order line item number for each batch of the Delivery for the same item number. Please guide me to know how I can get the same.
Hope this clarifies the issue faced.
Regards,
Ankush -
How to get Purchase Order Number in a workflow
Hi all,
I am a new guy in workflow.
I created one simple workflow - If purchase order is changed, then an email should be triggered.
It is working fine.
I want to add in the subject as well as in email text, the purchase order no which is changed.
I tried to find this thing in existing threads.But m not able to find it.
Please do the needful.
Regards,
SunnyHi Sunny,
You can pass the data to External User also..!!
Sending Mail to Outlook : U need the Following things done for this:-
1> Use the Mail Step in the WF and Choose the Receipient as the E-Mail Address and Give the E-Mail Address there.
2> Check the Configurations that need to be done in Transaction SCOT. SMTP Server Settings are done to get the Desired Results
To get Workitems in Outlook..!!.https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/workflow%252bscenario
Problem in transferring the workitems into OUTLOOK
/people/saujanya.gn/blog/2006/12/19/how-to-get-work-items-your-outlook-inbox
Workflow Items in Outlook
In the Mail Step Type - check the Binding of the WF Container with the Task Container.
You have the ICON for Variable "Insert Expression" near the Subject line. Double Click that and you can find there your WF Container for the BO Used..Click on that and select the attribute that corresponds to the PO-Number. Copy paste the same in the Mesg Body also from there..
Let me know if you still have any issues.
Regards,
Kanika -
How to export purchase order dtd from SRM 5.5
In earlier versions of SRM one could export an XML DTD based on the corresponding IDoc. However, in 5.5 there is no purchase order IDoc.
I need to send a vendor the DTD for the XML purchase order we are going to send to them electronically.
Where can I find and download the XML DTD for purchase orders in SRM 5.5?Stuart,
we were doing this to transmit XML orders to a Market Place but we had to use our PI server.
If you have no PI server then I am not sure the option exists.
If you have a PI server, I suggest you ask the PI person as I know nothing about PI. The config for XML output in SRM is in SPRO > SRM Server > Cross Application Basic Settings > Set Output actions and Output Format
Regards
Allen -
Get Sales Order price from delivery
Hi Folks, I need your help.
I have a smart form to print a ticket that shows the total amount to be paid. Iu2019m using the FM GN_INVOICE_CREATE to simulate the prices and sum the items (Table xvbrp), passing the material and quantity.
The problem here is when some conditions of discounts are included manually as price conditions in the sales order this function has no considerer those and I get the wrong amount or the amount without those conditions.
After this issue a decided to change the FM to RV_INVOICE_CREATE (Table xvbrp), which is the FM used by the transaction VF01, this function works perfect but a Post good issue is required to obtain the prices.
I need a FM to get these prices from the delivery, taking in consideration sales order conditions automatic and manual for the delivery item and delivery quantity. The purpose of this is to print a ticket with the amount to be paid by the customer, before the invoice is created.
Thank in advance.
Alexis RamirezI solved the issue using the FM RV_INVOICE_CREATE.
CALL FUNCTION 'RV_INVOICE_CREATE'
EXPORTING
invoice_type = rv60a-fkart
invoice_date = sy-datum
pricing_date = rv60a-prsdt
delivery_date = rv60a-fbuda
select_date = rv60a-seldat
i_analyze_mode = 'X'
vbsk_i = vbsk
id_no_enqueue = 'X'
IMPORTING
vbsk_e = vbsk
od_bad_data = lv_bad_data
det_rebate = rebate_determined
TABLES
xkomfk = w_xkomfk
xthead = w_xthead
xvbfs = w_xvbfs
xvbss = w_xvbss
xvbrk = w_xvbrk
xvbrp = w_xvbrp
xvbpa = w_xvbpa
xkomv = w_xkomv.
I get the price from the table xvbrp.
Thanks,
Alexis -
How to get Shopping Cart Name from PO number in EBP ?
Hi,
If I have the PO number how I can get the shopping cart name related to this PO? I need technical fields and table relations.
Regards,
AchirangshuI'm not sure if this will work. I posted an answer to a similar question a while ago, but it didn't work well in the posters system. So maybe we can try this in steps. See if you get results from this:
REPORT ztest MESSAGE-ID 00 LINE-SIZE 80.
TABLES srrelroles.
PARAMETERS: po_no(10) DEFAULT '3000001977'.
DATA: xobjkey LIKE srrelroles-objkey,
roleid(22).
CONCATENATE po_no 'X' INTO xobjkey.
* use PO to obtain the role id
SELECT * FROM srrelroles
UP TO 1 ROWS
WHERE objtype EQ 'BUS2012'
AND roletype EQ 'BBP_TARGET'
AND ( objkey >= po_no
AND objkey <= xobjkey ).
roleid = srrelroles-roleid.
EXIT.
ENDSELECT.
You'll have to use a PO that you know exist in your system.
If you get no results, try removing the WHERE on objtype and/or roletype and see what values are returned for these fields.
Rob -
Partner not copied from Purchase order to inbound delivery
Hello,
When I create an inbound delivery (VL31N) from a purchase order (ME23N), the partner FM is not copied (whereas partner FO is copied).
Does someone know how to solve this issue? (customizing or user exit..).
thanksHi,
Is there any specific Copy Control Routine or User Exit that copy Partners from a Purchase Order Header to Delivery Header?
Please provide me the Routine Name/Number or User Exit Name.
Thanks,
RV -
How to trace purchase order number with respect to Purchase requestion numb
Hi friends,
Can u please help me how to Trace purchase order number with respect to purchase Requetuion number. Is there any standard report available in R/3Hi Vamsi,
Thats what!!!
Goto SE16 - EBAN - Give PR number in the iput screen.
In the output screen you will have to do field selection from Menu - Settings - formatlist - choose fields.
There you choose Purchase Order.
So the output will display for you POs for the PR that you entered.
Regards,
Vishal -
Function module to get order data from delivery
hi ,
is there any function module to which i can pass the delivery number and get the order number (s) and other data .
basically i want the order currency.
pls help.
<removed by moderator>
Edited by: Mike Pokraka on Aug 21, 2008 9:44 AMHi Surendra,
If your requirement is just to retreive the Order number for a given delivery then you can go with following:
Just go to LIPS table, there you can get the Order Number and ITEM from VGBEL and VGPOS fields for given Delivery Number VBELN.
You can also do the same by using VBFA table.
Also have a look to the following thread:
Re: Getting sales order number against Delivery Number
Hope this will help.
Regards,
Nitin. -
How to Display Purchase Order Number IN G.R.P.O
Hi Guys,
i am unable to find solution regarding Getting Purchase order number and displaying in Goods Receipt P.O. Report automatically when we copy from purchase Order ie Copy From button .My problem is we are Expecting Purchase Order Number in Goods Receipt P.O automatically when they copy From Purchase. Order.Can any suggest me reagarding with Good solution asap.
Regards
ANANDHi Anand,
When Your Goods Receipt P O Form is Active Click on form Settings in Menubar( 5ty Icon Form Right) Then one window will be opened then click on table format folder and then check the check box against base ref and base key under Visible column
If you are not adding any comments on GRPO then by default it will show as based ob purchase order XXX.
Hope it helps you
Regards
Vishnu
Maybe you are looking for
-
Need to find All Custom Reports which are based on SAP standard reports
Hi Specialists, I would like to find out all the customized reports which are a copy of SAP standard reports in the client's system. For Eg. RPCP11G0 is the SAP standard report which has been customized & it's code has been re-written into a Custom r
-
Limitation of the number of values in an LOV
Greetings, I have a tabular form with few of the columns as LOVs. One of the LOVs returns close to 1000 records and the form is giving me a "PL/SQL Numeric Value error". If I do a rownum < 450 in the LOV query the form works. But I need all the value
-
Delivery block not updated in sales order after released VKM3
Hi all, I am facing below error after released credit block throuh VKM3 also i am unable to delivery becasue it is not updated still block exist in sales order level. i made all nacessary settings for that and also i tried through VKM1 but this tcod
-
User Specif Felilds in Routing operation details screen
Hi Techies, Here I want some information regarding User Specific feilds: Here we can have 4 - Text boxes, 2- Value Boxes 2- Quantity Boxes 2-Indicators. Can any one explain the relevance of these feilds and how can they control the flow.. Thanks in a
-
Guys, Is there a way to manipulate a GROUP . lets say I has HashMap hMap which has 3 name value pair. The Key is a ID and value Y/N put(hMap , arg1 : 1 , arg2 : "Y") put(hMap , arg1 : 2, arg2 : "N") put(hMap , arg1 : 3 , arg2 : "Y") I have a GROUP GR