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: 

How to capture values dynamically from output screen

Former Member
0 Kudos

Hi all,

I have a new requirement.

i developed a report which is showing output correctly. Here i have to take a check box for every record in output screen. if i check some of the check boxs then it should allow for further processing.

i succeeded upto put checkboxes on output screen.

but i don't know how to capture the values of checkboxes of every record into an internal table. it is necessary to capture into an internal table

will it be work by using LOOP AT SCREEN statement.

could you please explain with examples. it is normal report program only.

i would appreciate an early reply

Regards

Prabhakar

1 ACCEPTED SOLUTION

hymavathi_oruganti
Active Contributor
0 Kudos

use the fn module

DYNP_VALUES_READ

which is used to read the values on the screen

7 REPLIES 7

hymavathi_oruganti
Active Contributor
0 Kudos

use the fn module

DYNP_VALUES_READ

which is used to read the values on the screen

Former Member
0 Kudos

HI,

I think FM : DYNP_VALUES_READ can be used.

Regds,

Akshay

0 Kudos

Hi

Thanks, now i am trying the same. if it works, i can fully reward points.

I hope same co-operation will continue

Former Member
0 Kudos

Hi

You can output your records in table control (or may be alv grid)and add one additional field of type c for check box and then you can process your records according to the selections made

I hope I am getting you

Thanks

0 Kudos

Hi,

use command read line:

READ LINE SY-INDEX FIELD VALUE
                        itab-MARK  INTO HMARK
                        itab-BUKRS INTO HBK
                        itab-BELNR INTO HBL.

Message was edited by: Andreas Mann

former_member181962
Active Contributor
0 Kudos

Sample code for usage:

  • Internal table for Region and its Description

data: begin of t_t005u occurs 0,

LAND1 like t005u-land1,

BLAND like t005u-bland,

Bezei like t005u-bezei,

end of t_t005u.

  • Ranges for Country

ranges: r_land1 for t005u-land1.

  • Get the country codes and their descriptions

refresh r_land1.

clear r_land1.

refresh t_dynpfields.

move 'V_LAND1' to t_dynpfields-fieldname.

append t_dynpfields.

clear t_dynpfields.

  • Read the value in the Country field on the screen

call function 'DYNP_VALUES_READ'

EXPORTING

dyname = 'SAPLZ_VENDOR_MASTER'

dynumb = '0004'

translate_to_upper = 'X'

TABLES

dynpfields = t_dynpfields

EXCEPTIONS

invalid_abapworkarea = 01

invalid_dynprofield = 02

invalid_dynproname = 03

invalid_dynpronummer = 04

invalid_request = 05

no_fielddescription = 06

undefind_error = 07.

read table t_dynpfields with key fieldname = 'V_LAND1'.

if not t_dynpfields-FIELDVALUE is initial.

r_land1-low = t_dynpfields-FIELDVALUE.

r_land1-sign = 'I'.

r_land1-option = 'EQ'.

append r_land1.

clear r_land1.

endif.

  • Get the Regions to be displayed as F4 Help

select land1

bland

bezei

from t005u

into table t_t005u

where spras = 'EN'

and land1 in r_land1.

if not t_t005u[] is initial..

  • Popup to display Valid Regions for the selected country

CALL FUNCTION 'POPUP_WITH_TABLE_DISPLAY'

EXPORTING

ENDPOS_COL = 60

ENDPOS_ROW = 40

STARTPOS_COL = 40

STARTPOS_ROW = 20

TITLETEXT = 'Region'

IMPORTING

CHOISE = v_choice

TABLES

VALUETAB = t_t005u

EXCEPTIONS

BREAK_OFF = 1

OTHERS = 2.

if sy-subrc = 0.

if v_activity = 'V'.

read table t_t005u index v_choice.

if sy-subrc = 0.

v_regio = t_t005u-bland.

move 'V_BEZEI' to t_dynpfields-fieldname.

move t_t005u-bezei to t_dynpfields-fieldvalue.

append t_dynpfields.

  • Update the Region description on the screen.

call function 'DYNP_VALUES_UPDATE'

EXPORTING

dyname = 'SAPLZ_VENDOR_MASTER'

dynumb = '0004'

TABLES

dynpfields = t_dynpfields

EXCEPTIONS

invalid_abapworkarea = 01

invalid_dynprofield = 02

invalid_dynproname = 03

invalid_dynpronummer = 04

invalid_request = 05

no_fielddescription = 06

undefind_error = 07.

endif.

endif.

endif.

endif.

Former Member
0 Kudos

I do have same requirement, I am using Read command and able to process the selected records. But my requirement is when I click Back it goes to the basic list and now the list should display without the previous selected records.

Could some one tell me how to make this possible.

Witing for your reply.