Application Development 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: 

ABAP 7.40: VALUE....CORRESPONDING with WHERE

ralf_wenzel_heuristika
Active Participant
0 Kudos

Hi everybody,

I need some help by constructing the following (blue) command:

data:

    "! standard table with selection screen content

   "! the selection screen contains a SelOpt for MARC-LADGR, called S_LADGR

   selscreen type standard table of rsparams,

   "! selection range for loading groups

    loading_grps type range of ladgr.

   " assume, there are records for SELSCREEN-SELNAME = 'S_LADGR' !

   " fill all records to loading group range tab for SELSCREEN-SELNAME = S_LADGR

    "   SELSCREEN-SIGN   -> LOADING_GROUPS-SIGN

   "   SELSCREEN-OPTION -> LOADING_GROUPS-OPTION

   "   SELSCREEN-LOW    -> LOADING_GROUPS-LOW

   "   SELSCREEN-HIGH   -> LOADING_GROUPS-HIGH   => usage of 'corresponding' is recommended

    loading_grps = value #( for <i> in selscreen ( CORRESPONDING #( <i> ) where ( selname = 'S_LADGR' ) ).

Syntax check shows a typing error - but how I have to write this command correctly? I tried to replace the brackets, but that did not help.

Kind Regards

Ralf

PS: Happy Easter, find some eggs!

1 ACCEPTED SOLUTION

ChristianGünter
Contributor

Hi Ralf,

try this one.


loading_grps = VALUE #( FOR <i> IN selscreen
                        WHERE ( selname = 'S_LADGR' )
                         ( CORRESPONDING #( <i> ) ) ).

I think you put the where clause in the wrong place and a closing bracket was missing.

Regards Christian

1 REPLY 1

ChristianGünter
Contributor

Hi Ralf,

try this one.


loading_grps = VALUE #( FOR <i> IN selscreen
                        WHERE ( selname = 'S_LADGR' )
                         ( CORRESPONDING #( <i> ) ) ).

I think you put the where clause in the wrong place and a closing bracket was missing.

Regards Christian