cancel
Showing results for 
Search instead for 
Did you mean: 

FMS SQL Codes for SAPB1

Former Member
0 Kudos
82

Hi Experts,

I'm creating formatted search in marketing documents but I can't seem to complete for I having an error with my sql codes. Please see the sample codes below

Select Case $[ORDR.OWNER]

When '2' then (SELECT GroupCode FROM OCRD WHERE GroupCode LIKE 'Branch1')

When '3' then (SELECT  GroupCode FROM OCRD WHERE GroupCode LIKE 'Branch2')

When '4' then (SELECT  GroupCode FROM OCRD WHERE GroupCode LIKE 'Branch3')

else

' '

end

The number 2, 3, & 4 is the Employee Code. What I want to happen is, first I'm going to select the employee and from that the business partner List will be filtered in marketing data base on the branch that was tagged to employee master data. Can someone help me fix my sql codes? Thanks in advance.

Regards,

Horhe

Accepted Solutions (0)

Answers (1)

Answers (1)

Johan_H
Active Contributor
0 Kudos

Hi Horhe,

What is the error ?

Regards,

Johan

Former Member
0 Kudos

Hi Johan,

When i ran the fms in marketing document it says "internal error". So maybe there's a problem with my codes.


Regards,

Horhe

Former Member
0 Kudos

Internal error means the data did not match in the query you made. I'll try to revise you query.

Select Case $[ORDR.OWNERCODE]
When '2' then (SELECT GroupCode FROM OCRG WHERE GroupName LIKE 'Branch1')
When '3' then (SELECT  GroupCode FROM OCRG WHERE Groupname LIKE 'Branch2')
When '4' then (SELECT  GroupCode FROM OCRG WHERE Groupname LIKE 'Branch3')
else
' '
end

From ORDR

Hope this can help you to see what might be the error.

Regards,

RD

Former Member
0 Kudos

Hi RD,

Thanks for answering my question. I finally made it. Anyway, is there any possible way to turn off the list when someone presses the 'TAB' button. I mean, I set FMS in Customer/Vendor in Marketing documents but when i press the "TAB" the real list still showing.

Regards,

Horhe

Former Member
0 Kudos

I'm sorry but I think that is not possible. I suggest that you post another issue for that concern in this forum. Other users would have an idea on how to overwrite that functionality. Good luck.

Regards,

RD