Automatic Delivery Date Calc with Formatted Search
Hi,
I'm trying to have the delivery date on purchase orders automatically calculated by using document date plus a value from the business partner master data (avragelate) which we are using as shipping time.
What I have as my query is the following:
Select $[$46.0.1]+t0.[avragelate] from ocrd t0 where $[$4.0.1]=t0.[cardcode]
This is however returning an internal error when it runs.
I have the formatted search set to run this query when the document date changes.
Any ideas?
Thanks,
Michael
Where are you linking this Formatted Search and how did you try to execute this?
I don't generally post code before testing as I value the solution I provide and its importance to you...
I had tested this and it worked just fine.
You should save this query and link this to the Delivery Date on the PO screen.
I see you are a new member to the SDK forums. If time permits please read through this link to know about the recognition program.. https://www.sdn.sap.com/irj/sdn/crphelp#section19
Please let me know
Suda
Similar Messages
-
Scheduling Agreement –delivery date in month format - MD04
Dear experts,
Scheduling Agreement, forecast delivery schedule.
When I enter a delivery date in month format, the system, during processing, automatically checks the factory calendar and proposes the first valid working day as the delivery date. ( Yes. I know it is a SAP standard )
My requirement is automatically checks by the system the last working day as the delivery date.
Could you tell me what are the settings i need to check to resolve this issue?
Thanks in advance
arturAs pointed out already above you need to use a periodic lot sizing procedure.
Use Lot sizing procedure P, Lot size indicator K and Scheduling =2
As per your requirement, you need to create a calendar using MD25 with Months (Workdays) as a calculation rule with 1 as the period in the box provided.
After a MRP run the delivery date would point to the last day of the month.
But the requirement is a bit surprising as say for a requirement on the 1st of the month you will have the delivery showing up on the last day of the same month. Under what circumstances do you have this requirement as a valid one in your business case? -
Hello.
How to convert a date field with format (dd,mm,yyyy) to format (mm,dd,yyyy)
I have text field which has a databind to a date field. When I click on it, we can select the date, it is added on the format (dd,mm,yyyy). When I want to insert this date field to a database It doesnu2019t allow me to do it because it will only accept date field on the format (mm,dd,yyyy)
I tried to store this format on a date variable and I get a message saying that is impossible to convert a string into a date.
Regards,
JoseHi Jose,
usually you format strings in c# like
string.Format("{0:yyyyMMdd}", insertyourstring);
in your case
string.Format("{0:MM/dd/yyyy}", insertyourstring);
[look here|http://idunno.org/archive/2004/14/01/122.aspx]
there are more details
if everything fails split the string with Mid()
or ask me
lg David -
Date column with format mask 'hh12:mi pm'
let's say the user input record as shown below :
trip At01 At02
1 9:30 AM 12:30 PM
At02 & At02 are date column with format mask 'hh12:mi pm'. When the user input 9:30 and tab to next item, the column will display as 09:30 AM. Then when user input 12:30 at AT02, it will display as 12:30 PM.
Anyway, if I enter 1:00 at AT02, it will display as 01:00 AM. Actually I want to display as 01:00 PM. I still can go back to the field to edit it manually but is there a way that I can do as mentioned ?
Please advise.
Thanks,
Shu WenYou are going to have to write your own validation logic to do this - You'll have to decide what point AM shoudl be defaulted and what point PM should be used. I don't think that there is a format mask that provides this functionality.
-
How can i get totals in columns with formated searches
How can i do this with SDK if it isn´t posible since formated searches
This is not possible with formated searches.
With SDK, depends on if it is Matrix or Grid, on if it is a system form/your own form. But basically, loop throw the form or datasource, and do the sumatory.
Regards,
Ibai Peñ -
Delivery - Sales Order executes formatted search
Hi
Found a very strange behaviour of B1:
When making a new Delivery, which contains a formatted search in the lines, based on an sales order the value of the delivery (position) gets newly calculated -> the formatted search gets executed!. This is imho very very strange because when referencing an order i want the value SIMPLY from there (All other fields get copied too).
the formatted search is based on a saved query:
SELECT $[$38.11.NUMBER]*$[$38.U_AnzMenge.NUMBER]
-Autorefresh Yes
-When altering Column
-Display Saved Values
Any suggestions?
TIAHi there,
Can try:
SELECT 'Price'=CASE WHEN $[$38.44.NUMBER]=0 THEN 2*2
ELSE
(SELECT T0.Price From RDR1 T0 INNER JOIN ORDR T1 ON T0.DocEntry=T1.DocEntry
WHERE T1.DocNum=$[$38.44.NUMBER] AND T0.ItemCode=$[$38.1.0])
END
This query only workable for local currency or currency specify in your Delivery Order. If your Sales Order line detail have different currency then you will need to modify the query.
Hope this help... -
Get matrix row data and put it into header field with formatted search ???
Hi All,
I ask your help concerning the following:
On an invoice matrix I want to check all Itemgroup Codes of all items in the rows, if there are some rows' items with ItemGroupcode 101 and some others with anything else, then header field should be Y, otherwise N.
My main problem is: how do I put a matrix row data to a header data with checking all rows in the matrix?
A minor problem is that I can't get the formatted search to work on all rows when the formatted search is assigned to the user field in header.
If I put the formatted search to a row field then the row field is filled with the proper value, but the same query assigned to the user field in header works only on the first row.
What am I doing wrong?
SELECT USEDPROD= CASE T0.ItmsGrpCod WHEN 101 THEN Y ELSE N END FROM .[OITM] T0 WHERE T0.ItemCode = $[$38.1.0]
(SBO 7.6)
Any suggestions are welcome.
Thanks.
BálintDear Adele,
Thanks for the answer. The major one cannot be solved. OK, I'll try to get a workaround.
However I still do not understand why my query does not work in all selected rows, just in the first row, i.e. if I assign the query to a header field and I'm positioned in the first row it's OK, but when I add a new item to the second row or any of the next rows, the header field is not updated at all.
Why is that so? Do you have any idea?
Bálint -
Automatic delivery date change based on logistics calendar
Dear Experts,
I have a certain plant for which i have 5 days working & for the rest i have all days working .
My requirement is that the system should find out & change the delivery date in PO automatically , if the delivery date falls on a holiday .
I have assigned the 5 days a week calendar to the requitred plant & also i am getting the warning message ME080 in the PO , but the system is NOT changing the delivery date .
Please suggest what needs to be done in order to have the system to change the delivery date automatically ?
Thanks & regards
Anishi
check is there any user exit or BAPI can be implemeted in your system with the logic you want. -
Help with Formatted search involving a UDF
I have a Formatted search which runns the following code:
exec xsp_nssItemLookup $[$38.256.0]
This search is on a udf of the Purchase order screen. (256 is the item details field in the details.
The above query runs fine. What I really want to do is to pass the contents of another UDF to the stored procedure. The USF is called U_NSSItemID. If I change my stored procedure to read:
exec xsp_nssItemLookup $[$38.U_NSSItemID.0] however it does not work. I get blank results every time.
I have also tried exec xsp_nssItemLookup $[POR1.U_NSSItemID.0] which doesn't work either.
I can't figure out what is wrong with my syntax. I don't get any errors, just a blank value.
Thanks
don shieldsSuda,
Thanks for answering so quickly. To answer your question the data type is Alphanumber which I just figured out is the save as CHAR() in SQL. My problem turned out to be that I needed to trim the spaces from my parameter. I was getting values like "cover ", and I needted to get "cover". Problem solved now.
Don -
Identifying Fields with Formatted Search
Hi,
Is there a way (maybe running a query) to know what fields (of all documents) have formatted search?
In doing this, is it possible to know the query name in the formatted search?
Thank you.
AprilYou can identify the document by using 'FormId' field in the query.
Form Id Document
129 BP
133 A/R Invoice
134 Business Partner Master Data
136 Company Details
137 Correction Invoice
138 General Settings
139 Order
140 Delivery
141 A/P Invoice
142 Purchase Order
143 Goods Receipt PO
146 Payment Means
148 Define Currencies
149 Quotation
150 Item Master Data -
Schedule Line Delivery Date Calculation with Transportation Scheduling
Hi All,
We are currently running into a problem where our Sales Order Schedule Line delivery dates are being pushed out too far into the future - because of the Calendar being used to determine the transit time.
We have 'Delivery Scheduling' and 'Transportation Scheduling' activated for our Sales Document type
We have Routes that are configured with a 'Transit Time' and a 'Factory Calendar'
Order Scenario:
'Factory Calendar' assigned to our 'Route' is setup with only one 'Workday' in a given week e.g. Wednesday
Our 'Route' has a Transit Time of 2 days
We create a Sales Order on Monday for a Material that is available in our Plant
The 'Goods Issue' date is being determined correctly for the next Workday - being Wednesday
The 'Delivery Date' is extending out over 15 days (2 Wednesdays into the future) - since it is working on 'Calendar Days' and not 'Actual Days'
Does anyone know of a way (config or other) to only influence the 'Goods Issue' date with the 'Factory Calendar' assigned to the Route, and have the 'Delivery Date' calculated using the Transit Time on the Route and 'Actual Days' rather than Calendar days?
All help greatly appreciated.
Thanks,
Ravelle<i></i>Hi Pathik,
Thanks for your reply. I have already maintained the Calendars I'm using for this business process in <SCAL> - same as <OY05>.
The problem I'm having though is that by assigning a Calendar directly to my route (which I doing to influence the goods issue date - using a 1 Working Day Calendar) it is also taking precedence in determining the Transit time - which in this case I don't want, as I want my Transit time to be determined using a 5 Working Day Calendar.
I don't think this problem has a config option as a work around...I think the only possibility in this case is a development to achieve the results we need.
Thanks,
Ravelle -
Is there a way to NOT have the data from a formatted search highlighted
Hi all,
I have a formatted search that returns a big chunk of data, some comments that are then added to. When the fs is fired, it returns the data, but all of the data is highlighted so when the user starts typing they overwrite the data that was just returned. I know they could just hit the right arrow key or click their mouse at the end, but they don't do that half of the time. I also know they could use ctrl-z or undo when they do this, but they don't do that either. It would just be nice if they could fire the fs and when the data is returned, the cursor would be at the end of the data.
Any thoughts?I don't think there are any options for you to change default system behavior like this. What you may do is to change your FMS logic to get only one record if possible. Post your query here if you can.
Thanks,
Gordon -
Problem With Formatted Search.
Hi to all,
I have linked a formatted search to a UDF that lies at row level in AP Invoice. This field is used to display the Sales Order Price. The requirement is that from SO we create a purchase order and subsequently create a goods receipt and AP invoice.. Now in invoice it is showin perfectly fine whether it is copied from goods receipt or purchase order.. But in the purchase order and goods receipt screen this query will not work. And the same query used in AP invoice is being linked to these documents. Is there any work around for this?? Is it possible to run queries based on the form numbers?? If so ho do i pull the form number in the formatted search query??
Please Help!!!!
Regards
ArisI recommend creating separate queries for each document.
ie
1 formatted search to lookup price on sales order from AP Invoice
1 formatted search to lookup price on sales order from GRPO
1 formatted search to lookup price on sales order from PO
then change the lookup to pull fields from the document that you are using as a reference.
when you are building the formatted searhes start by returning the values that are you are using as a reference. That way you are sure that you are pulling the correct information.
Then layer in the lookup to the sales order.
If you get stuck I recommend that you copy and paste the formatted search in SQL Server management studio and replace the variables refereces with real values.
In my experience troubleshooting queries is more effective when using SQL Server management studio. (the error reporting is better). -
Read item code from Sales Order with formatted search
hi,
i'm tring to read tha values of the item or items of a sales order (before save it) with a formatted search.
i have no problem to read the value of card code or cardname but i can't read the item's value.
i tried with this [code]Select $[RDR1.ItemCode][/code] (i found it on the forum) but it doesn't work.
somebody can help me ?
thank youHi, Alessandro!
I think the trouble is that you are trying to assign a FS to the header of the document. You are getting the information of the current row, so you have to bind a formatted search to some column of the "table - part" of the document.
And also you can try:
SELECT $[$38.1]
38 - the value of "Item" (when you point a mouse to the cell, information you want from)
1 - the value of "Column" (the same...)
It will get an info of this cell in a current row.
HTH! -
Problem with formatted search in grid
Hi all,
I have a Grid with 3 columns in my user defind form. In that Grid,I used one one formatted search on column 2 based on the value of column 1.
I mean when i was press 'SHFT+F2' on second column, it will execute the query based on value of what we entered in the first column of the grid. How can i do this?? How can i fetch the value of first column in the formatted search??. Please help me.
Thanx in Advance
Oram.Hi
write a query like this and assign formatted search on column2
SELECT ITEMNAME FROM OITM T0 WHERE T0.ITEMCODE = $[/$GRIDUID.COL1 UID.ROWNUM])
regards
Vishnu
Maybe you are looking for
-
Error when upgrading from 8.1.3.0 domain to 9.2.0.0 domain
I am running the upgrade.sh found in the WLS92/common/bin directory and all goes well until I get this... <Dec 13, 2006 10:54:00 AM EST> <INFO> <Upgrade> <BEA-800000> <Starting in-memory configuration upgrade ... > java.lang.NullPointerException at w
-
Need help with javascript for an attachment button in a pdf built in LiveCycle
what is the javascript to add an button for an attachment to a pdf
-
New version supporting camera raw plug-in 7.1
Hello, I've a canon eos 650D and i wonder when there will be a new version of photoshop elements supporting the camera raw plug-in 7.1 since I don't want to make use of the coverter?
-
LMS 3.2.1 integration with Clarity NMS for snmp trap forwarding
Our client have integrated Clarity NMS to Ciscoworks LMS 3.2.1. So far they are receiving raw alarms/snmp traps but it lacks information/inventory of the originating device. Kindly see sample raw alarms below: 2420: 2011-11-25 12:10:46 Received trap
-
How to use Enums in query ?
Hi, I would like to use java 1.5 Enums in query, but i cannot find any usefull informations in docs. I use Kodo 4.0.0EA3. I have a class with a field that is an enum, and i would like to filter the query on specific value. Enums are defined in an oth