2013 Nov 27 7:09 AM
hi Good day,
i dint understand the meaning of the select statement when it is like this
SELECT * FROM viaufks
INTO CORRESPONDING FIELDS OF TABLE h_viaufks
WHERE iphas IN stat
and (diaufk_where).
can i please know what and (diaufk_where) means?
your valueble info is highly appriciated.
thank you,
jacob.kata.
2013 Nov 27 7:11 AM
It means dynamically specifyying where clause.
for example your varriable may have
diaufk_where = ' BUKRS EQ '1000' and WERKS eq '2000' .'
Check where used list of this variable or in debugging you will see how it is filled
2013 Nov 27 7:11 AM
It means dynamically specifyying where clause.
for example your varriable may have
diaufk_where = ' BUKRS EQ '1000' and WERKS eq '2000' .'
Check where used list of this variable or in debugging you will see how it is filled
2013 Nov 27 7:16 AM
2013 Nov 27 8:04 AM
Hi jacob kata
You can find this type of statement in Standard Program SAPDBAFI
Just debug... for solution...
2013 Nov 27 8:07 AM
This is dynamic where condition..
please check this link for more info..
2013 Nov 27 8:23 AM
Hi Jacob,
This is a condition syntax. It is used to write dynamic queries.
IF you notice this is a string structure.
During program execution this string variable diaufk_where will have a conditions like field1 = value1, or logical expression using AND, OR, NOT etc.
When the select query is executed during run time, the condition or logical expression inside the string diaufk_where will also be checked. diaufk_where could be a structure or internal table. If its an internal table the conditions can extend across different rows.
If there is no value in diaufk_where, the logical expression result would be true.
Any syntax error in the cond_syntax can be caught using the try catch end try statements.
2013 Nov 27 8:43 AM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |