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

Read Dynpro-Multiselection

Former Member
0 Likes
492

Hello Community,

i've got the Problem, that I want to read a field with Multiselection-Function in a Dynpro.

The field has the type PerNr und includes the possibilities to select single-values, a range of values, non-values and a range of non-values.

CALL FUNCTION 'GET_DYNP_VALUE' doesn't help me, because it gives me just the shown value and not the ranges e.g.

I looped the Field-Value like this:

TYPES: BEGIN OF pernr_tab,
           pernr TYPE PERNR_D,
        END OF pernr_tab.

DATA lt_pernr   TYPE TABLE OF pernr_tab,


RANGES: R_TXT_PERNO_QUELL FOR TXT_PERNO_QUELL.

LOOP AT R_TXT_PERNO_QUELL.
       APPEND R_TXT_PERNO_QUELL-low TO lt_pernr.
       APPEND R_TXT_PERNO_QUELL-high TO lt_pernr.
     ENDLOOP.

It gives me all needed values but without any order.

May you help me? Thanks a lot!

1 ACCEPTED SOLUTION
Read only

Venkat_Sesha
Product and Topic Expert
Product and Topic Expert
0 Likes
445

Better you can do the above operation like this.

DATA lt_pernr   TYPE RANGE OF PERNR_D.


RANGES: R_TXT_PERNO_QUELL FOR TXT_PERNO_QUELL.

Just move data like this.

LT_PERNR[] = R_TXT_PERNO_QUELL[].

Hope this helps.

3 REPLIES 3
Read only

Venkat_Sesha
Product and Topic Expert
Product and Topic Expert
0 Likes
446

Better you can do the above operation like this.

DATA lt_pernr   TYPE RANGE OF PERNR_D.


RANGES: R_TXT_PERNO_QUELL FOR TXT_PERNO_QUELL.

Just move data like this.

LT_PERNR[] = R_TXT_PERNO_QUELL[].

Hope this helps.

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
445

What is the idea behind appending all the values to lt_pernr ? What has to be done further with lt_pernr  ?

Read only

Former Member
0 Likes
445

Sorry, stupid Question of mine. Thanks for your help.

I've done it like this:

TYPES: BEGIN OF pernr_tab,
             sign type c LENGTH 1,
             option type c LENGTH 2,
             low type PERNR_D,
             high TYPE PERNR_D,
          END OF pernr_tab.

lt_pernr   TYPE TABLE OF pernr_tab.

LOOP AT R_TXT_PERNO_QUELL.
     Append R_TXT_PERNO_QUELL TO lt_pernr.
   ENDLOOP.

Thank you!!