DELIVERY QUERY
Hi Experts,
I have attached screen shots of activities I have done. I want a query that when an Item is picked and its not a number when the quantity changes it will fill the UDF with the Name without making a subtraction.
But with the value one when the quantity changes it does the deduction perfectly.
From OITW the UDF created automatically fills the DLN1.OpeningReading.
and the DLN1.ClosingReading value is when the Quantity value changes and it subtract from the openingreading value.
But where the opening value is a name but not a number I want the closing to be the name but not a subtraction.
help to edit my query to help arrive at this solution.
Urgent help is needed.
Regards
Justice
Hi Justice,
Please check below Query after small amendment.
SELECT CASE WHEN $[DLN1.U_OpeningReading.Number] NOT LIKE '%[A-Z]%' THEN $[DLN1.U_OpeningReading.NUMBER] - $[$38.11.NUMBER] ELSE $[DLN1.U_OpeningReading.Number] END
Hope this help
Regards::::
Atul Chakraborty
Similar Messages
-
*Hello Friends,*
*1) I create a purchase order against a vendor*
*2) Create an inbound delivery against the purchase order.*
*Checks required*
*1) Currently users can move ahead without creating an inbound delivery.(I need to build a control here)*
*2) Currently, inspite of presence of inbound delivery, users can directly do GR against PO.(another control required here) .*
*Is there any config for above two requirements(for eg Vendor material combination config to make inbound delivery mandatory)*
*or do I need to check MIGO BADI/exit?*
*Looking forward to response.*
*Thanks and Regards*
*Iyer Kartik*freon21 wrote:
*Hello Friends,*
>
> *1) I create a purchase order against a vendor*
> *2) Create an inbound delivery against the purchase order.*
>
>
> *Checks required*
> *1) Currently users can move ahead without creating an inbound delivery.(I need to build a control here)*
> *2) Currently, inspite of presence of inbound delivery, users can directly do GR against PO.(another control required here) .*
>
>
> *Is there any config for above two requirements(for eg Vendor material combination config to make inbound delivery mandatory)*
>
> *or do I need to check MIGO BADI/exit?*
>
>
> *Looking forward to response.*
>
> *Thanks and Regards*
> *Iyer Kartik*
Hi freon,
Have you ticked Acknowl Reqd indicator in the confirmation tab?
Thanks
Shiva -
Delivery Query not giving data
Folks,
I am working on a query to show Pick Release Data using a query. I am using the following one but not getting the desired results.
SELECT --decode(gv_extract_type, 'FULL', 'CONVERSION', 'INTERFACE') src,
oos.name,--type,
wnd.delivery_id,
ood.organization_id,
--shipping_charges,
wnd.ultimate_dropoff_location_id,
wnd.problem_contact_reference,
wc.freight_code,
wnd.ship_method_code,
wnd.service_level,
hp.party_number,
hp.party_name,
hl.address_line_1,
hl.address_line_2,
hl.address_line_3,
hl.town_or_city,
hl.country,
hl.postal_code,
hl.region_1,
hl.telephone_number_1,
wdd.delivery_detail_id,
msib.segment1,
msib.description,
wdd.requested_quantity
FROM wsh_new_deliveries wnd,
wsh_delivery_details wdd,
wsh_delivery_assignments wda,
hr_locations hl,
hr_locations hl1,
hr_locations hl2,
wsh_carriers wc,
org_organization_definitions ood,
hz_parties hp,
mtl_system_items_b msib,
oe_order_headers_all ooha,
oe_order_sources oos
WHERE wda.delivery_detail_id = wdd.delivery_detail_id
AND wnd.delivery_id = wda.delivery_id
AND ood.organization_id = wdd.organization_id
AND wc.carrier_id = wnd.carrier_id
AND wnd.party_id = hp.party_id
AND wnd.source_header_id = ooha.header_id
AND ooha.order_source_id = oos.order_source_id(+)
AND wdd.source_header_id = ooha.header_id
AND msib.organization_id = ood.organization_id
AND ood.organization_code = '3PL'
AND msib.inventory_item_id = wdd.inventory_item_id
AND hl.location_id = wdd.ship_from_location_id
AND hl1.location_id = wdd.ship_to_location_id
AND hl2.location_id = wdd.deliver_to_location_id;
Could xomeone help me as to where I am going wrong?
ThanksHi,
Check with this Query , first of all you have to test with one order number one by one then only you will get Values
SELECT oos.name,--type,
wnd.delivery_id,
ood.organization_id,
--shipping_charges,
wnd.ultimate_dropoff_location_id,
wnd.problem_contact_reference,
wc.freight_code,
wnd.ship_method_code,
wnd.service_level,
hp.party_number,
hp.party_name,
hl.address_line_1,
hl.address_line_2,
hl.address_line_3,
hl.town_or_city,
hl.country,
hl.postal_code,
hl.region_1,
hl.telephone_number_1,
wdd.delivery_detail_id,
msib.segment1,
msib.description,
wdd.requested_quantity
FROM wsh_new_deliveries wnd,
wsh_delivery_details wdd,
wsh_delivery_assignments wda,
hr_locations hl,
hr_locations hl1,
hr_locations hl2,
wsh_carriers wc,
org_organization_definitions ood,
hz_parties hp,
mtl_system_items_b msib,
oe_order_headers_all ooha,
oe_order_sources oos
WHERE wda.delivery_detail_id = wdd.delivery_detail_id
AND wnd.delivery_id = wda.delivery_id
AND ood.organization_id = wdd.organization_id
AND wc.carrier_id = wnd.carrier_id
--AND wnd.party_id = hp.party_id
AND wnd.party_id = hp.party_id
--AND wnd.source_header_id = ooha.header_id
AND ooha.order_source_id = oos.order_source_id
AND wdd.source_header_id = ooha.header_id
AND msib.organization_id = ood.organization_id
AND ood.organization_code = 'ABC'
AND msib.inventory_item_id = wdd.inventory_item_id
AND hl.location_id = wdd.ship_from_location_id
AND ood.organization_id = ooha.ship_from_org_id
AND hl1.location_id = wdd.ship_from_location_id
AND hl2.location_id = wdd.ship_from_location_id
AND ooha.ship_from_org_id = hl.inventory_organization_id
AND ooha.ship_from_org_id = hl1.inventory_organization_id
AND ooha.ship_from_org_id = hl2.inventory_organization_id
AND order_number = 1234 -
BI Publisher report bursting problem
I am not able to make my report burst to separate files for ftp delivery. I am running BI Publisher version 10.1.3.4.1 (stand-alone). My data query looks like this:
select a.agency_id, b.borr_name
from agency_tbl a, borr_tbl b
where a.rpt_date >= 20100101 and a.rpt_date <= 20100110
and a.borr_id = b.borr_id
and a.agency_id in (80013,80019)
order by a.agency_id, b.borr_name
My bursting/delivery query looks like this:
select agency_id "KEY",
'mytemplate' as TEMPLATE,
'RTF' TEMPLATE_FORMAT,
'en-US' LOCALE,
'PDF' OUTPUT_FORMAT,
'FTP' DEL_CHANNEL,
'myserver' PARAMETER1,
'myid' PARAMETER2,
'mypwd' PARAMETER3,
'/home1/web-docs-443/files/pdffiles' PARAMETER4,
convert(varchar,agency_id) || '.pdf' PARAMETER5
from agency_tbl
where agency_id in (80013,80019)
and rpt_date >= 20100101 and rpt_date <= 20100110
(I have to put "KEY" in quotes because my database is sybase, and KEY is a reserved word.)
I have verified that both queries return data (6 records each, no null agency_id keys).
The goal is to create a file for each agency that lists their associated borrowers.
I can view the report without problems. But when I schedule the report and enable bursting, I get the "Job was failed" email notification, and the report history shows this:
Job Execution Information
History ID 218
Status Failed
Start Processing Time 3/21/11 10:27 AM
End Processing Time 3/21/11 10:27 AM
Time Elapsed 1.68 sec
System Message oracle.apps.xdo.servlet.scheduler.ProcessingException: java.lang.NullPointerException
at oracle.apps.xdo.servlet.scheduler.XDOJob.runBurstingReport(XDOJob.java:2116)
at oracle.apps.xdo.servlet.scheduler.XDOJob.execute(XDOJob.java:358)
at org.quartz.core.JobRunShell.run(JobRunShell.java:195)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
Caused by: java.lang.NullPointerException
at com.sun.java.util.collections.Hashtable.containsKey(Hashtable.java:300)
at oracle.apps.xdo.batch.bursting.DeliveryXMLParser.processRow(Unknown Source)
at oracle.apps.xdo.batch.bursting.DeliveryXMLParser.endDeliveryInfoElement(Unknown Source)
at oracle.apps.xdo.batch.bursting.DeliveryXMLParser.endElement(Unknown Source)
at oracle.xml.parser.v2.XMLContentHandler.endElement(XMLContentHandler.java:210)
at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1318)
at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:336)
at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:303)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:263)
at oracle.apps.xdo.batch.bursting.DeliveryXMLParser.getDeliveryChannels(Unknown Source)
at oracle.apps.xdo.batch.BurstingProcessorEngine.createEnterpriseReportRequest(Unknown Source)
at oracle.apps.xdo.batch.BurstingProcessorEngine.setDeliveryControlFile(Unknown Source)
at oracle.apps.xdo.servlet.scheduler.XDOJob.runBurstingReport(XDOJob.java:1916)
... 3 more
Bursting Definitions
Bursting Node /ROWSET/ROW/agency_id
Delivery Node /ROWSET/ROW/agency_id
Any help will be greatly appreciated. This has me stumped . . . I am out of ideas.What caused our bursting problem:
We had to put the word "KEY" in quotes (in our bursting query), because KEY is a reserved word in sybase. But putting it in quotes caused a problem - the results of the bursting query did not contain a "KEY" tag.
. . . And the solution:
We added the connection property "GET_COLUMN_LABEL_FOR_NAME=true" to our sybase datasource definition. Many thanks to Tim Dexter, and to Paul from the sybase forums (http://newsgroupstats.info/article/forums.sybase.com/sybase.public.jconnect/2308/Column-aliases-not-working.html) c. 2007.
And thanks again to Jorge for the helpful suggestion.
Steve Z. -
Hi, all,
today I have received a simple [first look] task.
Daily upload on FTP a suppliers report with items sold.
Within the sold items, there are concession and own-bought, the report is necessary only for the concession suppliers. The concession flag is suppliers attribute, so concession supplier can be defined on the suppliers system.
Sales and Suppliers are different systems (data sources) and different databases MSSQL and Oracle.
Problem:
1. The using of the ":item" bind variable in the suppliers request creates additional group <G_ITEMS>, i.e. each item will have <G_SUPPLIER> group and than each <G_SUPPLIER> the <G_SALES> group. Seems that this not acceptable.
<DTEMPLATE>
<LIST_G_ITEMS>
<G_ITEMS>
<CITEMS>100000008</CITEMS>
<LIST_G_SUPPLIER>
<G_SUPPLIER>
<CSUPPLIER>Supplier1</CSUPPLIER>
<CSUPPLIERD>SupplierNAME</CSUPPLIERD>
<LIST_G_SALES>
<G_SALES>
<SITEMS>100000008</SITEMS>
<SUNITS>8</SUNITS>
2. How to write the delivery query if items and suppliers are from different data sources?
3. Database links are not preferred.
Any suggestions?
Forgotten: Using the BIP EE Standalone 10.3.4.1 with march 31 2010 update included.
Edited by: Eldar.A on 13.07.2010 6:35Hi,
thanks for your time and support:
what I'm doing wrong?
1. Data sources specified;
2. DT
*<dataQuery> -part:*
<sqlStatement name="Q_ITEMS" dataSourceRef="MSSQL">
<![CDATA[
select distinct items from table1
]]>
</sqlStatement>
<sqlStatement name="Q_SUPPLIER" dataSourceRef="ORCL">
<![CDATA[
select s.ITEM item2
, s.supplier ip
, s.sup_name sup_name
from item_sups s
where s.item = :items
]]>
</sqlStatement>
<sqlStatement name="Q_SALES" dataSourceRef="MSSQL">
<![CDATA[
select item,
tran_date,
units,
retail
from tran_data if1
where if1.item = :item2
]]>
</sqlStatement>
*<dataStructure> - part*
1st type - which returns really strange structured data, each item group has sub-group with supplier, and supliers sub-group with sales.
<dataStructure>
<group name="G_ITEMS" datatype="varchar2" source="Q_ITEMS">
<element name="CITEMS" dataType="varchar2" value="items"/>
<group name="G_SUPPLIER" datatype="varchar2" source="Q_SUPPLIER">
<element name="ITEM" dataType="varchar2" value="item2"/>
<element name="ITEM_Supplier" dataType="varchar2" value="IP"/>
<element name="sup_name" dataType="varchar2" value="sup_name"/>
<element name="CITEMS_G" dataType="varchar2" value="G_ITEMS.items"/>
<group name="G_SALES" datatype="varchar2" source="Q_SALES">
<element name="S_ITEM" dataType="varchar2" value="item"/>
<element name="S_DATE" dataType="varchar2" value="TRAN_DATE"/>
<element name="S_UNITS" dataType="varchar2" value="units"/>
<element name="S_RETAIL" dataType="varchar2" value="total_retail"/>
</group></group></group>
2nd type - which returns only single suppliers information (the supplier information of the last item from items group), taking into account that 4 presented item has 4 different suppliers.
<dataStructure>
<group name="G_ITEMS" datatype="varchar2" source="Q_ITEMS">
<element name="CITEMS" dataType="varchar2" value="items"/>
</group>
<group name="G_SUPPLIER" datatype="varchar2" source="Q_SUPPLIER">
<element name="ITEM" dataType="varchar2" value="item2"/>
<element name="ITEM_Supplier" dataType="varchar2" value="IP"/>
<element name="sup_name" dataType="varchar2" value="sup_name"/>
<element name="CITEMS_G" dataType="varchar2" value="G_ITEMS.items"/>
</group>
<group name="G_SALES" datatype="varchar2" source="Q_SALES">
<element name="S_ITEM" dataType="varchar2" value="item"/>
<element name="S_DATE" dataType="varchar2" value="TRAN_DATE"/>
<element name="S_UNITS" dataType="varchar2" value="units"/>
<element name="S_RETAIL" dataType="varchar2" value="total_retail"/>
</group>
*2nd <dataStructure> type output*
<DTEMPLATE>
<LIST_G_ITEMS>
<G_ITEMS>
<CITEMS>2000006000064</CITEMS>
</G_ITEMS>
<G_ITEMS>
<CITEMS>100008085</CITEMS>
</G_ITEMS>
<G_ITEMS>
<CITEMS>100008018</CITEMS>
</G_ITEMS>
<G_ITEMS>
<CITEMS>100009011</CITEMS>
</G_ITEMS>
</LIST_G_ITEMS>
<LIST_G_SUPPLIER>
<G_SUPPLIER>
<ITEM>100009011</ITEM>
<ITEM_SUPPLIER>107</ITEM_SUPPLIER>
<SUP_NAME>Supplier1</SUP_NAME>
<CITEMS_G>100009011</CITEMS_G>
</G_SUPPLIER>
</LIST_G_SUPPLIER>
<LIST_G_SALES>
<G_SALES>
<S_ITEM>100009011</S_ITEM>
<S_DATE>2010-07-08T00:00:00.000+04:00</S_DATE>
<S_UNITS>5</S_UNITS>
<S_RETAIL>678.5</S_RETAIL>
</G_SALES>
<G_SALES>
<S_ITEM>100009011</S_ITEM>
<S_DATE>2010-07-08T00:00:00.000+04:00</S_DATE>
<S_UNITS>5</S_UNITS>
<S_RETAIL>556.1475</S_RETAIL>
</G_SALES>
<G_SALES>
<S_ITEM> ...
Thanks in advance!
Eldar A. -
PDFs are not generated from Burst
Hi all
I am getting this error when i schedule my report to run:
Document generation failed
[INSTANCE_ID=V110APLFFC006.1305547398367] [OUTPUT_ID=1035][ReportProcessor]Error rendering documentoracle.xdo.servlet.scheduler.ProcessingException: [ReportProcessor]Error rendering document
at oracle.xdo.enterpriseScheduler.bursting.BurstingReportProcessor.renderReport(BurstingReportProcessor.java:455)
at oracle.xdo.enterpriseScheduler.bursting.BurstingReportProcessor.onMessage(BurstingReportProcessor.java:127)
at oracle.xdo.enterpriseScheduler.util.Checkpoi
This is my bursting delivery query below (which took me a loooong time to figure out!). I am bursting to the file system on the OBIEE server. Funnily enough when i change the output format to RTF, then the bursting works perfectly, but if i change it to PDF, i get this error. I have looked and looked for a reason as to why this happens but i have no idea. I can see in the job history that the data is split correctly and i can see that it generates the documents (they are shown when i click on Republish). Please if anyone has any idea, please reply - i desperately want to get this working, and i have no idea why it doesnt work.
I have checked the logs and it seems that everything generates correctly, and when i open the .out files produced in AdobeReader everything opens successfully and the document has the correct information. It is also not related to permissions on the folder specified in the bursting query -> if i use the runReport webservice for the same report and specify C:\Temp as the output path ( and pdf as the attributeFormat), the file is written out correctly. It seems that the problem is with writing out more than one pdf file, but why???????? Not sure if it has anything to do with the scheduler at all ( i run the report by using the RunNow option in the scheduler)?
Thanks very much for any and all help!
SELECT nvl("NAME",0) KEY,
'OIC' TEMPLATE,
'en-us' LOCALE,
'PDF' OUTPUT_FORMAT,
'FILE' DEL_CHANNEL,
'C:\Temp\' PARAMETER1,
"NAME" PARAMETER2
from
(select "EXT"."NAME" as "NAME",
"RES"."AT12" as "AT12"
from "JM"."EXT" "EXT",
"CN"."RES" "RES"
where "RES"."AT12" = "EXT"."ID" )HI,
Kidnly check whether Cost Center is maintained in the Work Center which is attached in the Maint. Plan
Regards,
Chandru. -
Windows Event Subscription - Fails To Activate Subscription
When I try to create a subscription on a GUI server I receive this error:
"The client could not start a valid listener to receive subscription events based on the specified input settings."
When I use WECUTIL on Server Core, I get the following error:
"The subscription is saved successfully, but it can't be activated at this time. Use retry-subscription command to retry the subscription. If subscription is running, you can also use get-subscriptionruntimestatus command to get extended error status.
Error = 0x3ae8. The subscription fails to activate."
I have 1 WinRM GPO configured for the domain:
Windows Components/Windows Remote Management (WinRM)/WinRM Services
This is the config file I am using to create the subscription:
<?xml version="1.0" encoding="UTF-8"?>
<Subscription xmlns="http://schemas.microsoft.com/2006/03/windows/events/subscription">
<SubscriptionId>applocker exe and dll</SubscriptionId>
<SubscriptionType>SourceInitiated</SubscriptionType>
<Description></Description>
<Enabled>true</Enabled>
<Uri>http://schemas.microsoft.com/wbem/wsman/1/windows/EventLog</Uri>
<ConfigurationMode>Custom</ConfigurationMode>
<Delivery Mode="Push">
<Batching>
<MaxLatencyTime>30000</MaxLatencyTime>
</Batching>
<PushSettings>
<Heartbeat Interval="3600000"/>
</PushSettings>
</Delivery>
<Query>
<![CDATA[<QueryList><Query Id="0"><Select Path="Microsoft-Windows-AppLocker/EXE and DLL">*</Select></Query></QueryList>]]>
</Query>
<ReadExistingEvents>false</ReadExistingEvents>
<TransportName>HTTP</TransportName>
<ContentFormat>RenderedText</ContentFormat>
<Locale Language="en-US"/>
<LogFile>Microsoft-Windows-AppLocker/EXE and DLL</LogFile>
<PublisherName></PublisherName>
<AllowedSourceNonDomainComputers></AllowedSourceNonDomainComputers>
<AllowedSourceDomainComputers>O:NSG:BAD:P(A;;GA;;;DC)S:</AllowedSourceDomainComputers>
</Subscription>
I also have a GPO set to identify the subscription manager:
Windows Components/Event Forwarding
Configure Target Subscription Manager set to enabled with the following entry:
server=<server FQDN>:5985
Output of C:\WINDOWS\system32>winrm get winrm/config/service
Service
RootSDDL = O:NSG:BAD:P(A;;GA;;;BA)(A;;GR;;;IU)S:P(AU;FA;GA;;;WD)(AU;SA;GXGW;
;;WD)
MaxConcurrentOperations = 4294967295
MaxConcurrentOperationsPerUser = 1500
EnumerationTimeoutms = 240000
MaxConnections = 300
MaxPacketRetrievalTimeSeconds = 120
AllowUnencrypted = false
Auth
Basic = false
Kerberos = true
Negotiate = true
Certificate = false
CredSSP = false
CbtHardeningLevel = Relaxed
DefaultPorts
HTTP = 5985
HTTPS = 5986
IPv4Filter = "*" [Source="GPO"]
IPv6Filter = "*" [Source="GPO"]
EnableCompatibilityHttpListener = false
EnableCompatibilityHttpsListener = false
CertificateThumbprint
AllowRemoteAccess = true [Source="GPO"]
And output of C:\WINDOWS\system32>winrm e winrm/config/listener
Listener [Source="GPO"]
Address = *
Transport = HTTP
Port = 5985
Hostname
Enabled = true
URLPrefix = wsman
CertificateThumbprint
ListeningOn = null
Any ideas why this isn't working? I thought this was a pretty simple service to set up?Hi Michael Haken,
Based on your description, please refer to the following thread and check if can help you.
Event
Log forwarding (source initiated) GPO configuration qstns
Regarding to error 0x3ae8, this error may be caused by the WinRM Firewall exception rule being disabled.
If anything I misunderstand or any update, please don’t hesitate to let me know.
Hope this helps.
Best regards,
Justin Gu -
Joining Sales Orders and Delivery Notes in Query
Hi Experts
Please could someone provide me with the correct SQL syntax for joining tables ORDR, RDR1, ODLN and DLN1 in a query?
I need to show a list of the (rows of all open sales orders) and (closed sales order (which have a delivery note) between certain dates).
Thanks
JonHi Gordon
Thanks for your help. Could you help me a little further? I am writing the query to show me a mixture of (Open Order rows which contain item code 'C&P') and (closed orders between 2 dates which also contain C&P) - both need to have the customer having property 54 set as 'Y'
Working with what you sent me it almost works but for some reason I cannt fathom it won't show the open orders only the closed. I think it may have some do with my last JOIN
This is what I have:
SELECT T0.DocNum 'Delivery No', T0.DocDate 'Delivery Date', T3.Quantity 'Delivery Quantity', T1.DocNum 'S/O No', T1.DocDate 'SO Date', T1.DocStatus, T3.ItemCode, T3.Dscription, T2.Quantity 'SO Quantity', T2.Quantity-T3.Quantity 'Balance Quantity', T2.LineTotal'C&P Price After Discount', T2.DiscPrcnt, T2.Project, T4.QryGroup54'Carriage Deal', t2.freetxt, t1.comments
FROM DBO.DLN1 T3
INNER JOIN DBO.ODLN T0 ON T3.DOCENTRY = T0.DOCENTRY LEFT JOIN DBO.RDR1 T2 ON T3.BaseENTRY = T2.DOCENTRY AND T2.ItemCode = T3.ItemCode LEFT JOIN DBO.ORDR T1 ON T2.DOCENTRY = T1.DOCENTRY INNER JOIN OCRD T4 ON T0.CardCode = T4.CardCode
WHERE (T2.ItemCode LIKE 'C&P%%' AND T1.DocStatus='O' and t4.qrygroup54='Y') or (T2.[ItemCode] LIKE 'C&P%%' AND T1.[DocStatus] = 'C' and T4.QryGroup54='Y' and (T0.DocDate Between '[%0]' and '[%1]'))
Thanks
Jon -
Issue with Select Query in the Delivery userexit USEREXIT_SAVE_DOCUMENT
Hi All,
I am facing a strang issue with delivery userexit
1) I have a delivery user exit MV50AFZ1 - USEREXIT_SAVE_DOCUMENT.
2) In this user exit. I have written a select query as shown below
*Get the already delivered data
SELECT vbeln
vgbel
vgpos
erdat
erzet
lfimg
FROM lips
INTO TABLE t_lips
FOR ALL ENTRIES IN t_xlips_reference
WHERE vgbel EQ t_xlips_reference-vgbel
AND vgpos EQ t_xlips_reference-vgpos.
IF sy-subrc EQ 0.
ENDIF.
3) The use of the above select query is to find out if there is any delivery that has already been created for the reference slaes order for which the current delivery is being created.
4) The issue here is that for the FIRST DELIVERY, this select query should fail becuase there is no delivery created earlier and LIPS table would not have data. But, I am seeing some data getting populated in the internal table. The data that I am seeing in the internal table is the data of XLIPS which is nothing but the one that is about to get saved in the database after finishing this userexit.
5) STRANGE Point is that this is working fine in case if I create delivery using the transaction VL01N. But, if I create delivery using VL10A program I am facing this issue.
<< Removed >>
Thanks,
Babu Kilari
Edited by: Rob Burbank on Jun 16, 2010 4:22 PMThen why don't you add
AND vbeln NE likp-vbeln -
ABAP query to find delivery number of a sales document
Hi Gurus,
Can anyone help me how can i create an ABAP query to fetch the delivery number of a sales order. What are the tables to be joined.
Through tables I got the solution. From VBAP table I fetched the sales order numbers. I copied the sales order numbers and opened VBFA table. In the preceding documents field I had pasted those sales orders numbers. Then I've selected subsequent document category 'J' to get the deliveries.
But now how to write an ABAP query for this.
regards
rama krishnaHi,
Try to use join query like:
Select vbfa~VBTYP_N INTO CORRESPONDING FIELDS OF TABLE itab from VBFA inner join VBAP
where vbapvbeln = VBFAVBELN.
Regards
Mudit -
Fieldes planned delivery date and actual good recipt date for SAP QUERY
Hi Gurus
I am changing sap query. I need to find two fieldes : planned delivery date and actual goods recipt date
I dont know MM tables, do you know wrhere are?
in table EKPO i don't find the fieldes.
Thanks in advanceThank a lot!
Regards -
SELECT QUERY: LINKING DELIVERY TO SALES-ORDER
Hello All,
I'm working on an output on delivery .Tr. Cd. vl03n.
I'm required fetch ship-to-party and sold-to-party address from
the sales order corresponding to which delivery is generated.
In project system i cannot directly relate sale-order to delivery
number. But there is a way to find link between sales-order and delivery number.
The link is as follows.
LIPS-PSPNR(PROJECT. DEFINATION) MATCHES FIRST FEW CHARACTERS OF VBAP-PS_PSP_PNR (WBSELEMENT).
The query i have written is as follows:
select single vbap~vbeln into s_vbeln from vbap where
vbap~ps_psp_pnr = ( select distinct pspnr from lips where vbeln = wa_hd_gen-deliv_numb ).
s_vbeln : to fetch sales order number.
wa_hd_gen-deliv_numb : holds delivery number value.
The above query is not working because the number of characters of the two fields are not matching.
I cannot use 'LIKE' CLAUSE.
Please help in creating SQL query.
Thanks.
Edited by: Ushma Jain on Aug 8, 2008 9:12 AM
Edited by: Ushma Jain on Aug 8, 2008 12:08 PMHi Ushma,
In LIPS table there is a field VGBEL which contains sales document number of corresponding delivery document number.
You can directly get sales document number from LIPS table i.e field VGBEL.
Thanks,
Naveen Kumar. -
Query on TO cancellation in delivery
Hello Experts ,
I have one query on SD-WM part during the delivery.
Scenario is:
Delivery Done > Picking & TO Done > PGI Done
Now the goods are ready to dispatch , if I found that some mistake is done in Delivery doc and I want to reverse the same in this case how the reverse flow goes?
1. The PGI was reversed using VL09 , and we were able to cancel the delivery (Without Canceling the TO)
In this case what is the position of the stock ?
2. Is it possible to reverse/Cancel the confirmed TO in this scenario using LT15?
We tried cancelling the TO using LT15 but we had an error u2018 To already cancelled/ confirmedu2019
Query: I want new delivery to be done and how can I handle the items that I have already picked and PGI done for the previous delivery.
Thanks & regards,
Onkar BHi,
Scenario is:
Delivery Done > Picking & TO Done > PGI Done
If you want to create new delivery, then you shd follow the belwo given procedure.
1) Cancel Goods Issue, which to reverse the GOODS movement(VL09)
2) Cancel TO
2) Delete the delivery (VL02N)
3) Create new delivery.
If you want u can use the same delivery.
1) Cancel Goods Issue, which to reverse the GOODS movement(VL09)
2) Cancel TO
2) Create TO(LT03)
3) Create new delivery.
REgards,
Student -
SQL query: select billaddress if no delivery address exist.
hi sql expert,
The Query shall filter all invoices by date, articles and show the delivery address. Problem: Not every customer has deposited a delivery address. In this case the billing address is to be taken.
How can this be done ?
This query
SELECT T0.[CardName], T3.[ZipCode],T3.[Street], T1.[ItemCode], T1.[Dscription], T1.[ShipDate], T1.[Price], (T1.[Price] * T1.[Quantity]) as "Gesamtpreis in €", T1.[FreeTxt],substring(T1.Freetxt,0,5) as "Grundpreis in €",substring(T1.Freetxt,9,6) as "TS-Wert in %", T1.[Quantity] FROM OINV T0 INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OCRD T2 ON T0.CardCode = T2.CardCode INNER JOIN CRD1 T3 ON T2.CardCode = T3.CardCode WHERE CONVERT(nvarchar(8), T1.ShipDate, 112) BETWEEN '[%FromDate]' AND '[%ToDate]'
and T1.Itemcode = [%0] GROUP BY T0.[DocNum], T0.[CardName], T3.[ZipCode],T3.[Street], T1.[ItemCode], T1.[Dscription], T1.[ShipDate], T1.[Price], T1.[FreeTxt], T1.[Quantity]
UNION ALL
SELECT T0.[CardName], T3.[ZipCode],T3.[Street], T1.[ItemCode], T1.[Dscription], T1.[ShipDate], -T1.[Price], -(T1.[Price] * T1.[Quantity]) as "Gesamtpreis in €", T1.[FreeTxt], ('-' + substring(T1.Freetxt,0,5)) as "Grundpreis in €",substring(T1.Freetxt,9,6) as "TS-Wert in %", -T1.[Quantity] FROM ORIN T0 INNER JOIN RIN1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OCRD T2 ON T0.CardCode = T2.CardCode INNER JOIN CRD1 T3 ON T2.CardCode = T3.CardCode WHERE CONVERT(nvarchar(8), T1.ShipDate, 112) BETWEEN '[%FromDate]' AND '[%ToDate]' and T1.Itemcode = [%0]
GROUP BY T0.[DocNum], T0.[CardName], T3.[ZipCode],T3.[Street], T1.[ItemCode], T1.[Dscription], T1.[ShipDate], T1.[Price], T1.[FreeTxt], T1.[Quantity]
Thanks a lot!hi,
I think I got it now :-)
First: Show me priority all delivery addresses . Otherwise billing addresses:
SELECT T1.[CardCode], T2.[Street] FROM OCRD T1 INNER JOIN CRD1 T2 ON T1.CardCode = T2.CardCode WHERE NOT EXISTS
SELECT *
FROM CRD1 as T2
WHERE T2.[AdresType] = 's' and t1.CardCode = t2.Cardcode
union
SELECT T1.[CardCode], T2.[Street] FROM OCRD T1 INNER JOIN CRD1 T2 ON T1.CardCode = T2.CardCode
where T2.[AdresType] = 's'
secondly:
Filter all invoices by date, articles and show priority the delivery address else billingaddress and subtract the credits:
SELECT T0.[Cardcode], T0.[CardName], T3.[ZipCode],T3.[Street], T1.[ItemCode], T1.[Dscription], T1.[ShipDate], T1.[Price], (T1.[Price] * T1.[Quantity]) as "Gesamtpreis in €", T1.[FreeTxt],substring(T1.Freetxt,0,5) as "Grundpreis in €",substring(T1.Freetxt,9,6) as "TS-Wert in %", T1.[Quantity]
FROM OINV T0 INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OCRD T2 ON T0.CardCode = T2.CardCode INNER JOIN CRD1 T3 ON T2.CardCode = T3.CardCode
WHERE CONVERT(nvarchar(8), T1.ShipDate, 112) BETWEEN '[%FromDate]' AND '[%ToDate]'
and T1.Itemcode = [%0] and not exists (
SELECT *
FROM CRD1 as T3
WHERE T3.[AdresType] = 's' and t2.CardCode = t3.Cardcode
GROUP BY T0.[Cardcode], T0.[DocNum],T0.[CardCode], T0.[CardName], T3.[ZipCode],T3.[Street], T1.[ItemCode], T1.[Dscription], T1.[ShipDate], T1.[Price], T1.[FreeTxt], T1.[Quantity]
union
SELECT T0.[Cardcode], T0.[CardName], T3.[ZipCode],T3.[Street], T1.[ItemCode], T1.[Dscription], T1.[ShipDate], T1.[Price], (T1.[Price] * T1.[Quantity]) as "Gesamtpreis in €", T1.[FreeTxt],substring(T1.Freetxt,0,5) as "Grundpreis in €",substring(T1.Freetxt,9,6) as "TS-Wert in %", T1.[Quantity]
FROM OINV T0 INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OCRD T2 ON T0.CardCode = T2.CardCode INNER JOIN CRD1 T3 ON T2.CardCode = T3.CardCode
Where T3.[AdresType] = 's' and T1.Itemcode = [%0] and CONVERT(nvarchar(8), T1.ShipDate, 112) BETWEEN '[%FromDate]' AND '[%ToDate]'
-- ab hier werden die Gutschriften abgezogen
union
SELECT T0.[Cardcode], T0.[CardName], T3.[ZipCode],T3.[Street], T1.[ItemCode], T1.[Dscription], T1.[ShipDate], -T1.[Price], -(T1.[Price] * T1.[Quantity]) as "Gesamtpreis in €", T1.[FreeTxt], ('-' + substring(T1.Freetxt,0,5)) as "Grundpreis in €",substring(T1.Freetxt,9,6) as "TS-Wert in %", -T1.[Quantity] FROM ORIN T0 INNER JOIN RIN1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OCRD T2 ON T0.CardCode = T2.CardCode INNER JOIN CRD1 T3 ON T2.CardCode = T3.CardCode WHERE CONVERT(nvarchar(8), T1.ShipDate, 112) BETWEEN '[%FromDate]' AND '[%ToDate]' and T1.Itemcode = [%0]
and not exists (
SELECT *
FROM CRD1 as T3
WHERE T3.[AdresType] = 's' and t2.CardCode = t3.Cardcode
GROUP BY T0.[Cardcode], T0.[DocNum], T0.[CardName], T3.[ZipCode],T3.[Street], T1.[ItemCode], T1.[Dscription], T1.[ShipDate], T1.[Price], T1.[FreeTxt], T1.[Quantity]
union
SELECT T0.[Cardcode], T0.[CardName], T3.[ZipCode],T3.[Street], T1.[ItemCode], T1.[Dscription], T1.[ShipDate], T1.[Price], (T1.[Price] * T1.[Quantity]) as "Gesamtpreis in €", T1.[FreeTxt],substring(T1.Freetxt,0,5) as "Grundpreis in €",substring(T1.Freetxt,9,6) as "TS-Wert in %", T1.[Quantity]
FROM OINV T0 INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OCRD T2 ON T0.CardCode = T2.CardCode INNER JOIN CRD1 T3 ON T2.CardCode = T3.CardCode
Where T3.[AdresType] = 's' and T1.Itemcode = [%0] and CONVERT(nvarchar(8), T1.ShipDate, 112) BETWEEN '[%FromDate]' AND '[%ToDate]' -
Hi
We have SD_C04 cube and created a Query (Delivery Performance). The cube extracted the data from FLAT FILES (2lis_12_vcitm and 2lis_12_vcscl). While running the query i have noticed the following issues:
1. If multiple line items for a delivery document exist, the sales document and item comes up "#" for the additional line items.
2. The part numbers can be different within the same delivery with multiple line items, and the delivery quantity will appear blank for the additional line items.
3. If multiple line items in a delivery with the same part number, but different goods issue data - the query only reports a quantity for 1 line item, yet calculates a date for both line items.
4. The Delivery quantity column does not seem to be calculating correctly. For example, the CVS file show three lines for the same part but different goods issues date for line 1 & 2. Lines 1 & 2 were schedule on 5/28, but the delivery quantity is only represented with the information from 1 line item. Line 3 delivery appears in the query on a second line with a blank quantity.
Analysis: I have checked the Transfer Rules (one-to-one) and update rules. can i know where i have missed
Thanks for your adviceRaj,
One solution is to insert the query onto four sheets - sheet 1 looking at Q1, sheet 2 looking at Q2 etc. etc.
You make the selections on Quarter in the Free Characteristic part rather than at query run time - that way you can make different selections on the different sheet.
Ensure the Return to Global Refresh is off on all queries.
Save your workbook.
Regards
Gill
Maybe you are looking for
-
I was migrating from a 3gs to the 4s. Having never upgraded the IOS before, I thought that I should do that before handed the phone down to my daughter to replace her broken 3g. Big mistake. Even using Google sync for my contacts, following instructi
-
Hey Everyone, Can someone please help me with this issue faced. I have a 11G r1 FMW setup in which i am trying to create a new self registration request. Requests gets submitted properly and i am even able to approve this from the task lists of xelsy
-
Any idea what I should do as I would like to update my iPhone but do not want to lose all my content on my iPhone. Using iPhone 4. Thank you. Appreciated much for any advice given.
-
IPad suddenly won't sync any media
I haven't changed anything but today I am unable to get my iPad to sync any media. I tried checking and unchecking various boxes in the Music, TV Shows, and Movies tabs, but every time it syncs, it just skips through all the steps until the last one
-
CPU usage heavily ....what u do ?
hi,suppose an application is takeing CPU heavily and so system gets slower then .......... question 1: what are possible problems ? here i guess some problems> 1. Not good coding ....... garbage collection has not been taken care of. // Correct ? 2.