cancel
Showing results for 
Search instead for 
Did you mean: 

Find ItemCode by using search code

Former Member
0 Kudos

Hello,

As our ItemCodes are in general 15 characters, we want to use a short code to find the articles easier.

We have used the field Additional Identifier (OITM.SWW) in the Item Master Data for the short article code. Unfortunately this field you cannot select on row level (e.g. RDR1).

So when we are entering an order in our system we have created an UDF (U_Vartcode) on document row level where we can enter the short code and the Item Code appears automaticly.

We have added a Formatted Search in the Item Code field with the following query:

SELECT T0.ItemCode FROM dbo.OITM T0
WHERE T0.SWW = $[RDR1.U_Vartcode]

The query works fine, but the value we have entered disappears.

What would be the solution so that the value (short code - OITM.SWW) we have entered is still visible.

Best regards,

Tim

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member187989
Active Contributor
0 Kudos

In our case Item article code length is 15.

UDF length will be greater or equal to Item short code.

Try to increase UDF length if not possible create a new udf for SWW in row level of marketing docs with alphanumeric type length 20.

Try it.

Jeyakanthan

former_member204969
Active Contributor
0 Kudos

The fact is that the system fill out the full row when you enter the item code. So to reserve this UDF value you should connect an other FS to fill it according to the item code.

Former Member
0 Kudos

I have tried that but the value still disappears.

I have added a FMS to the field U_Vartcode. The query is:

SELECT $[OITM.SWW]

Former Member
0 Kudos

Tim,

Istvan is right, when the Item No is filled, the rest of the row gets populated so it will empty the previous value of your UDF.

As a workaround, find a field which you will always need to fill like the Quantity and put the trigger of the FS on this field. So first the UDF will disappear but as soon as you fill the Quantity it gets populated again.

Regards,

Nat

former_member204969
Active Contributor
0 Kudos

Probably you set the FS on the item code autorefresh according to the UDF. So when you fill the udf, the FS fill the itemcode and the system delete the udf.

I think you have tow possibility:

1. You modify the FS on the item code without autorefresh asking your code:

Select t.ItemCode from OITM t where t.SWW=N'[%0]'

2. Or set the FS on the UDF without autorefresh and then the user should activate it again.

But your FS on the UDF should be something like this:

Select t.SWW from OITM t where t.ItemCode=$[$38.1.0]

Former Member
0 Kudos

Natalia,

This will delete the U_Vartcode field as well as the ItemCode field.

Former Member
0 Kudos

I tried it on my test system and it works:

In the ItemCode field use the query below, auto refresh when exiting altered column: VartCode, display saved values:

SELECT T0.ItemCode FROM dbo.OITM T0 WHERE T0.SWW = $[RDR1.U_Vartcode]

In the VartCode field use the query below, auto refresh when exiting altered column: Quantity, display saved values:

SELECT T0.SWW FROM dbo.OITM T0 WHERE T0.ItemCode = $[RDR1.ItemCode]

I am using 2007A PL45 and it works.

former_member204969
Active Contributor
0 Kudos

It should work!

It is a good idea to connect it to the quantity field!

Former Member
0 Kudos

Thanks Natalia,

It works, but only if the quantity is 2 or more. When the quantity is 1 (even if you enter it again) the value in the U_Vartcode field disappears.

Any ideas how to solve it when the quantity is 1.

Former Member
0 Kudos

You need to find a field which the users will update all the time so you can use it as a trigger. I advised Quantity because I assumed it will be changed in all the cases.

former_member204969
Active Contributor
0 Kudos

Then you should activate the FS manualy.

Former Member
0 Kudos

You may try LineTotal field because it should be always changed from the default value of 0.

Thanks,

Gordon

Former Member
0 Kudos

Tried this field as well, but no result.

Tim

former_member187989
Active Contributor
0 Kudos

What is datatype & lenght of field U_Vartcode ?

Jeyakanthan

Former Member
0 Kudos

The datatype is: alphanumeric

Length is: 10