Skip to Content

help for an FMS

Hello to all

i am interested for a help in an FMS

a customer has created a groupcode in bp master data with code 116

i have created an fms which is used for feeling the Accounts Receivable field automatically.

the FMS created byme is the following

SELECT code FROM dbo.[@MAP_OCRD] WHERE CODE=$[OCRD.GROUPCODE]

i have created the above table with info Code and Name

Code is the same code with groupcode from ocrd table

and Name is the GL Account

the new groupcode will have a new code value but wants to have the same gl account with an othwer code from the above table

for example

100 30.00.00.0000 103 30.01.00.0000 104 30.01.02.0000 101 50.00.00.0000 106 50.01.01.0000 116 30.00.00.0000

i tried to use the same fms but while adding the value 30.00.00.0000 in the above table it is not alloed

do you have any idea how to manage it?

i also tried this

DECLARE @GLACCOUNT NVARCHAR(50)

DECLARE @GROUPCODE1 NVARCHAR(20)

SET @GLACCOUNT='30.00.00.0000'

SET @GROUPCODE1=(SELECT GROUPCODE FROM OCRD WHERE CARDCODE=$[OINV.CARDCODE])

IF (@GROUPCODE1='100')

BEGIN

SELECT code FROM dbo.[@MAP_OCRD] WHERE CODE=$[OCRD.GROUPCODE]

END

ELSE

BEGIN

SELECT @GLACCOUNT

END

but it does not work

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Nov 15, 2012 at 08:48 AM

    Try this:

    SELECT t.Name FROM dbo.[@MAP_OCRD] t WHERE t.CODE=$[OCRD.GROUPCODE]

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.