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 fetch data from ALV to another Selection Screen

Former Member
0 Kudos

hi...

i need to export the two fields that is VBELN and POSNR to some other selection screen of a transaction which is triggered by pressing a button on ALV...

Could u please let me know ki how can i transport these two fields to the screen of that transaction which is 'MASS ORDER CHANGE' transaction...

Regards:

Gaurav Arora

4 REPLIES 4

Former Member
0 Kudos

Hi,

When ever you double click on any record onthe alv output the index of that particular record will be stored int he structure slis_selfield. base on this u will come to know the record number of the internal table that is used for alv output.

so try like below inthe user command routine.

form user_com USING p_selfield TYPE slis_selfield.

read table itab with p_selfield-index.

....

.....

endform.

Satya.

Former Member
0 Kudos

Hi Gaurav,

Before calling the transaction, you need to use the command

<b>SET PARAMETER ID</b> .... and then call the transaction..

Best Regards,

Ram.

former_member588853
Active Contributor
0 Kudos

HI,

Submit <program name(the second program)>

s_sel1 = r_selvalues

...

Via selection scree.

You can use submit.

collect the values in a range for the selection screen and submit to the program.

rewards if useful,

regards,

nazeer

Former Member
0 Kudos

try this program:

IF NOT p_vbeln IS INITIAL.

PERFORM set_data USING 'P_VBELN' p_vbeln '' 'S' 'I' 'EQ'.

ENDIF.

<b> SUBMIT zprogram

USING SELECTION-SET xvar

* xvar is variant name in program zprogram

WITH SELECTION-TABLE seltab

AND RETURN.</b>

FORM set_data USING pr_selname

pr_value_low

pr_value_high

pr_kind

pr_sign

pr_option.

CLEAR seltab_wa.

MOVE: pr_selname TO seltab_wa-selname,

pr_kind TO seltab_wa-kind,

pr_sign TO seltab_wa-sign,

pr_option TO seltab_wa-option.

IF NOT pr_value_low IS INITIAL.

MOVE pr_value_low TO seltab_wa-low.

ENDIF.

IF NOT pr_value_high IS INITIAL.

MOVE pr_value_high TO seltab_wa-high.

ENDIF.

APPEND seltab_wa TO seltab.

ENDFORM. "set_data