Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Populate missing value when executing SQ01 query

mark_j15
Explorer
0 Likes
1,539

Hi All,

We have an existing query in SQ01/SQ02 that we run to calculate pallets needed on an existing delivery. The calculation is total delivery quantity / LE QTY. The issue is that we have moved one of our plant SLOCs off of WM and now when running the query the LE QTY is 0 since there is no warehouse no. on the delivery.

Is it possible that I default/hard-code the warehouse number to "populate" the missing warehouse no. value after I hit execute at the query selection screen? Essentially, I am trying to trick the system into thinking that the delivery has warehouse value "XX" attached when in reality it is blank; otherwise we cannot get access to the LE qty maintained for the same plant but different SLOC (IM managed). The warehouse value will not change so it is to be a fixed value. I'm not an ABAPer, so I wasn't sure if it's as straightforward as setting MLGN-LGNUM = 'XX'. in the "Code" section under the infoset or if there is more I need to do.

Any advice is much appreciated! Thank you,

-Z

3 REPLIES 3
Read only

thkolz
Contributor
0 Likes
1,466

Are you an ABAP developer?

I can only recommend you to get rid of those bloody queries, because maintaining and transporting them is a pain in the a**!
Recently I've replaced 3 queries with simple straight-forward ALV reports using class CL_SALV_GUI_TABLE_IDA and CDS views (see https://codezentrale.de/tag/cl_salv_gui_table_ida/).
But of course this can also be achieved via CL_SALV_TABLE.

Read only

0 Likes
1,466

Thanks for the response! I do not have much ABAP experience, this is just a legacy transaction/query used for one site that no longer works due to the missing warehouse no. field in deliveries now. Unfortunately SQ01/SQ02 is my only option at this moment in time; I was hoping there would be quick way to intiialize the value of LIPS-LGNUM after the selection screen but prior to the report being pulled as to make the system think there is actually a value there.

I feel like I can accomplish this with one line of ABAP under the "Code" area of the infoset but I just am not sure how to approach it. I've tried LIPS-LGNUM = 'XX'. but I don't know if that is the appropriate way to go about this.

Thanks again for your input!

Z

Read only

Jeansy
Active Contributor
0 Likes
1,466

Can you tell us which tables have been joined in the Infoset?