on 11-15-2012 8:37 AM
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
Try this:
SELECT t.Name FROM dbo.[@MAP_OCRD] t WHERE t.CODE=$[OCRD.GROUPCODE]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vasileios
The CODE and NAME fields in SAP must both be unique, with other words the name cannot be repeated. My suggestion is to add another User Defined Field to your @MAP_OCRD table and call it GLAcc for example. In the Code and Name columns, add the customer group code. So 116 in Code and 116 in Name fields, then the 30.00.00.0000 in the U_GLAcc field. Change your query to return [U_GLAcc] and it will work.
Kind regards
Peter Juby
Hi Vasileios
When you say used, I assume you are referring to it already being populated? Has it been linked to any other functions other than the filling of the Accounts Receivable/ Payable account? If not, then it should be safe to make the changes.
Add the user defined field first, then edit the table values and copy the Name values to the U_GLAcc field before copying the Code field over the Name field.
Kind regards
Peter Juby
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.