cancel
Showing results for 
Search instead for 
Did you mean: 

Modify query

Former Member
0 Kudos

Hi all

I have set up a UDF call 'invoice number' on the AR invoice document header to automatically populate the invoice number. Below is the query i have used

SELECT $[$8.0.0]

I need to modify this query so that it puts a letter eg: D infront of the number

eg invoice number on the AR invoice doc is 5000. On the UDF of the document the invoice number needs to populate as D5000

With the above query it just put 5000

can someone please help me with this query

Thanks

Regards

Apsara

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

HI Apsara ,

You should use

SELECT 'D'+ ${OINV.DOCNUM}

Use [ in place of {

TRY THIS

Thanks

--

Ashish

Edited by: ASHISH RANJAN on Jun 23, 2011 11:12 AM

Former Member
0 Kudos

Hi Ashish

thanks for your reply.

But it did not work. can you please tell me the reason why you have used $http://

Thanks

Regards

Apsara

Former Member
0 Kudos

Hi Apsara ,

$[OINV.DocNum]

, this syntax is use to pick the On screen Value .

So , your FMS should be like :

SELECT 'D'+ $[OINV.DOCNUM]

Thanks

--

Ashish

Former Member
0 Kudos

Hi Ashish

This still does not work. by any chance did this work on your side

Thanks

Regards

apsara

Former Member
0 Kudos

HI Apsara ,

It is working on my DB , i have checked the same twice with the same query .

Try on thing .

Save the query first , and then close the document , and open it again and then call the FMS .

Thanks

--

Ashish

Former Member
0 Kudos

Hi Apsara ,

SELECT 'D'+ $[$-8.0.0\]

Save it. Assign FMS to your UDF again.

Thanks,

Gordon

Answers (4)

Answers (4)

former_member583013
Active Contributor
0 Kudos

Apsara,

When referring to a value on the Main Window on a Formatted Search Query linked to a user defined field you need to use the Prefix minus

This should work

SELECT 'D'+$[$-8.0.0]

All the best

Suda

Former Member
0 Kudos

Hello malhaar ,

Both answer working properly i think you have any other issue.

Are you check condition on sql query window Or SAP ?

in SQL it will show error.

Thanks

Manvendra Singh Niranjan

Edited by: Manvendra Singh Niranjan on Jun 23, 2011 3:01 PM

former_member218051
Active Contributor
0 Kudos

Hi Manvendra,

Sorry for responding late as i was not keeping well.

As the work around was all about FMS , I concentrated myself purely on front end.

Thanks

Malhaar

former_member206488
Active Contributor
0 Kudos

Hi,

Try this:

SELECT  'D' +  $[OINV.DocNum.0]

Thanks,

Neetu

former_member218051
Active Contributor
0 Kudos

Hi,

Try This

select 'D' + $[$8.1.number]

Thanks

Malhaar