cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP Sourcing 10.0 Adding New Fields On Queries

Former Member
0 Likes
381

Hi Gurus,

I'm new in SAP Sourcing 10.0,

How do you add fields to existing queries statements?

Your assistance will be much appreciated.

Regards,

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Likes

You need to duplicate a standard query to add your fields and map this new query in place of the old one.

Former Member
0 Likes

Thanks Yeshwanth, Just did that now. But I am getting an error please have a look at the screen shots and see if you can assist with the error I'm getting. I duplicated the query on the first image and added the line on the second image and the third picture has the error I'm battling with.

Your assistance will be highly appreciated.

Regards,

Image 3

.  Image 1

Former Member
0 Likes

I suppose you should use AND_OP instead of AND in case of dynamic filters. Try changing it.

Former Member
0 Likes

Just did that and i'm still getting the same error.

Former Member
0 Likes

Hello,

The problem is that optional tokens (<%AND%> or <%AND_OP%>) cannot work with the '?' parameter marker. They can only work with Named Parameters.

Please check Documentation for Query Definition:Filter Prompts.

I'm also unsure why you need it as an optional parameter. It will also work if you use the AND clause as in the original query:

AND (<%SCHEMA%>.<%CHECK_COLLAB_MGR(T1.OBJECTID, 9999101, ?)%> = 1)

PS: you also have an extra dot (.):

Bogdan

Former Member
0 Likes

SELECT <%RESULTS%> FROM <%SCHEMA%>.FCI_UDEF_BIZDOC1 T1

LEFT OUTER JOIN <%SCHEMA%>.FCI_MAS_INTERNAL_CAT T4

ON T1.INT_CAT_OBJECT_ID = T4.OBJECTID

<%DYN_JOIN%>

WHERE T1.CONTEXTID=<%CONTEXT(userdefined.bizdoc1)%>

<%AND_OP(<%SCHEMA%>.<%CHECK_COLLAB_MGR(T1.OBJECTID, 9999101, <%?(Check)%>)%> = 1)

<%AND_OP("UPPER(T1.DISPLAY_NAME)",<%?(T1.DISPLAY_NAME)%>)%>

<%AND_OP("UPPER(T1.DOCUMENT_DESCRIPTION)",<%?(T1.DOCUMENT_DESCRIPTION)%>)%>

<%AND_OP("UPPER(T1.IS_TEMPLATE)",<%?(T1.IS_TEMPLATE)%>)%>

<%AND_OP("T1.INT_CAT_OBJECT_ID",<%?(T1.INT_CAT_OBJECT_ID)%>)%>

<%AND_OP("T1.INACTIVE",<%?(T1.INACTIVE)%>)%>

<%DYN_FILTER%>

<%ORDERBY%>

Check this query. Also add a new filter

Former Member
0 Likes

Thank you so much guys, I'll give it a try now and give you feedback.

Former Member
0 Likes

After running the query this is the error I come across

Former Member
0 Likes

Bogdan, I tried running as you advised but i got the same error as before.

Former Member
0 Likes

I couldnt see an extra filter added for check. Can you please add that and check.

Former Member
0 Likes

Just added the Check filter and this is the error im receiving now. Please check the screenshot

Former Member
0 Likes

I think the query is different from the one which i gave. Can you please share the query used. The one which i gave is working fine in the system.

Former Member
0 Likes

Hi Yeshwanth, sorry for the delayed response. Here is the query code and the error i'm getting.

Former Member
0 Likes

Use this query. Don't change the query. I could see that you used AND_OP.

SELECT <%RESULTS%> FROM <%SCHEMA%>.FCI_UDEF_BIZDOC1 T1

LEFT OUTER JOIN <%SCHEMA%>.FCI_MAS_INTERNAL_CAT T4

ON T1.INT_CAT_OBJECT_ID = T4.OBJECTID

<%DYN_JOIN%>

WHERE T1.CONTEXTID=<%CONTEXT(userdefined.bizdoc1)%>

AND (<%SCHEMA%>.<%CHECK_COLLAB_MGR(T1.OBJECTID, 9999101, <%?(Check)%>)%> = 1)

<%AND_OP("UPPER(T1.DISPLAY_NAME)",<%?(T1.DISPLAY_NAME)%>)%>

<%AND_OP("UPPER(T1.DOCUMENT_DESCRIPTION)",<%?(T1.DOCUMENT_DESCRIPTION)%>)%>

<%AND_OP("UPPER(T1.IS_TEMPLATE)",<%?(T1.IS_TEMPLATE)%>)%>

<%AND_OP("T1.INT_CAT_OBJECT_ID",<%?(T1.INT_CAT_OBJECT_ID)%>)%>

<%AND_OP("T1.INACTIVE",<%?(T1.INACTIVE)%>)%>

<%DYN_FILTER%>

<%ORDERBY%>

New Filter

Filter Tab

If you still face issues then please attach the screenshots from your system like the ones which i did.

Former Member
0 Likes

Thank you Yeshwanth it works perfectly thank you for your patience.

Former Member
0 Likes

Happy to help you Sabelo.

Former Member
0 Likes

Hi Yeshwanth,

How can I view the query database on SAP Sourcing? Let's say I want to view the Database Column name, where do I go to view such?

Your assistance will be highly appreciated

Regards,

Former Member
0 Likes

Hi Sabelo,

You can view all the queries in the system under the Query definiton and search *

You can go to any Master Agreement/Subagreement (for an example) and click on Reference guide at the top right corner to view the class details. If you click on schema view you can get the column names and the table name corresponding.

Regards,

Yeshwanth K.S

Former Member
0 Likes

Thank you found the queries and all the tables.

Answers (0)