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

Field catalog display problem

Former Member
0 Likes
1,115

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.......

6 REPLIES 6
Read only

Former Member
0 Likes
1,092

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

Read only

0 Likes
1,092

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.


Read only

0 Likes
1,092

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

Read only

0 Likes
1,092

why nested if (elseif) condition is not working for perform fieldcatalog conditon

Read only

alessandroieva
Active Participant
0 Likes
1,092

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

Read only

Former Member
0 Likes
1,092

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.