09-29-2010 11:48 AM
Hi All,
I need to add a where clause with constant value in SAP Query.
Example:
I joined VBAK and VBAP table to get the output. I used SQ01, SQ02 and SQ03 to build the querr and it is working fine as expected.
Now i need to restrict the VBAP-CHARG = '9953981656'. It has to be hard-coded in the query. How to achieve this?
Thanks,
Raj.
09-29-2010 12:05 PM
Hi Rajesh,
Open the code behind the SAP query, modify the SQL query and activate it.
Regards,
Amitava
09-29-2010 12:05 PM
Hi Rajesh,
Open the code behind the SAP query, modify the SQL query and activate it.
Regards,
Amitava
09-29-2010 11:49 PM
Hi
You can add field VBAP-CHARG to the selection screen and pre-define it with the required value
Kind regards
08-19-2013 4:08 PM
Hi,
I Think the easiest ist to adding a little check in your code.
Directly in SQ02 open your infoset in change mode.
click on the extras button
select that you want to add a code.
insert the below line
CHECK VBAP-CHARG= '9953981656'.
Save and generate your infoset and it's done.
After some test I figured out that the mehode proposed in a post above, meaning add your field in the selection screen and fill it there is much better by performance point of view.
I do the following to handle such requestes.
Hope it helps
Best regards
08-19-2013 5:37 PM
As suggested by Yannick,
In SQ02
in the 'Record processing' section of the 'Code' tab of Extras, put the 'CHECK code' as shown below.
Save the code, Save and Generate the Infoset.
Run SQ01 afresh, and then see the result.
Jogeswara Rao K