2014 Nov 06 1:27 PM
Hi,
In my alv report i dont want to display fieldcatalog for some conditions.
if SO_VTWEG <> '70'.
elseif SO_VTWEG <> '80'.
ELSEif SO_VTWEG <> '90'.
else.
PERFORM F005_BUILDFC USING '30' 'NETWR' 'ITAB2' TEXT-024 '15' ''.
ENDIF.
But this condition not working...Anybody suggest please.......
Hi,
In my alv report i dont want to display fieldcatalog for some conditions.
if SO_VTWEG <> '70'.
elseif SO_VTWEG <> '80'.
ELSEif SO_VTWEG <> '90'.
else.
PERFORM F005_BUILDFC USING '30' 'NETWR' 'ITAB2' TEXT-024 '15' ''.
ENDIF.
But this condition not working...Anybody suggest please.......
2014 Nov 06 1:53 PM
Hi,
What do you mean by you do not want fieldcatalog?
Do you want to disable certain columns?
Could you specify your issue or your requirement in much more detail?
What is SO_VTWEG?
I am assuming it is a select-options.
You cannot directly use it in the comparison. You need to make use of the HIGH and LOW parameters
Something like if SO_VTWEG-HIGH <> '70'. or if SO_VTWEG-LOW <> '70'.
Your question is not very clear and also your code.
Regards,
Ankur Parab
2014 Nov 06 1:57 PM
Hi,
Am using select option only.
But in that condition it displays fieldcatalog.
if SO_VTWEG <> '70'.
elseif SO_VTWEG <> '80'.
ELSEif SO_VTWEG <> '90'.
else.
PERFORM F005_BUILDFC USING '30' 'NETWR' 'ITAB2' TEXT-024 '15' ''.
ENDIF.
2014 Nov 06 2:00 PM
Hi,
As i mentioned, your code is incorrect.
Please debug and double click on SO_VTWEG and you will notice why your conditions fail.
Regards,
Ankur Parab
2014 Nov 06 2:33 PM
why nested if (elseif) condition is not working for perform fieldcatalog conditon
2014 Nov 06 4:01 PM
Hi,
if your select-option has only one record use this condition:
if SO_VTWEG-LOW <> '70'.
elseif SO_VTWEG-LOW <> '80'.
ELSEif SO_VTWEG-LOW <> '90'.
else.
PERFORM F005_BUILDFC USING '30' 'NETWR' 'ITAB2' TEXT-024 '15' ''.
ENDIF.
let me know,
AI
2014 Nov 06 5:49 PM
i guess i am confused by the logic here. i agree that you need to use so_vtweg-low, AFTER you read the first table line, but its the logic of the if statement that has me puzzled.
if SO_VTWEG-LOW <> '70'.
elseif SO_VTWEG-LOW <> '80'.
ELSEif SO_VTWEG-LOW <> '90'.
else.
PERFORM F005_BUILDFC USING '30' 'NETWR' 'ITAB2' TEXT-024 '15' ''.
ENDIF.
after the first line, everything other than a '70' will have triggered the execution of the code in the first section. after the first elseif, everything except '80' will trigger the code in that section, including 70... so, whats left? i dont think you will ever get to the second elseif or the final else.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |