06-25-2019 11:39 AM
hi all,
i have a requirement to make a ALV report,
with Parameter : GJAHR
Select Options : PS_POSID
KOSTL
SAKNR
in above 4 fields PS_POSID is from COBL Structure, hoe can i write select stament in program.
And need to generate
Report Output Columns:
Report output will be displayed in ALV format and will include the following fields:
can you guys please help me.
06-25-2019 1:31 PM
'PS_POSID is from COBL Structure, how could I write select statement in program.' You cannot, you can only select data from database (table, view, etc.) not from structures...
Basically you have to identify the main table(s) that contain(s) the ratio to display, do you guess which table in your requirement carry such amount/quantity field (you have 2 seconds)
Then find the tables required for other fields, when available prefer JOIN to separate selects followed by some merging data, Look for foreign relations in Abap ddic, add some personal logic.
Then back to your Abap training manuals...
06-25-2019 2:49 PM
mouli mukesh kumar niddapu Activate the SQL trace, ask the functional guy to show you in live the screens where the data come from, what values are expected in the smart form, then deactivate the SQL trace, look at the tables in the trace, and find out which ones contain the data. When you know the tables, the columns and the relationships between those tables, you are ready to write your SQL query.