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

code for selection screen

Former Member
0 Likes
699

hi all,

in selectin screen i have to populate two fields VIQMEL-KDAUF(sales order) & VIQMEL-QMNUM( shop visit notification),

here i have to give any of the inputs.like, if i give the SALES ORDER as input, SVN should be retrived& if SVN is given as input SO should be retrived.

depending on the given input the second input also should be retrived and passed to others as input.

can any one send me the code for this..i need it immediately.

5 REPLIES 5
Read only

messier31
Active Contributor
0 Likes
646

Use event AT-SELECTION SCREEN INPUT

Check which field is populated and retrieve the value of other field based on input entered in populated field and assign this to new field..

But for this to work, user will have to trigger event by hitting enter, only then at selection screen input will be call and your code will be executed..

Enjoy SAP.

Pankaj Singh.

Read only

Former Member
0 Likes
646

can u kindly send me the code ..

Read only

Former Member
0 Likes
646

Hi,

tables: viqmel.

Data: begin of it_viqmel occurs 0,

qmnum like viqmel-qmnum,

kdauf like viqmel-kdauf,

end of it_viqmel.

select-options: s_qmnum for viqmel-qmnum,

s_kdauf for viqmel-kdauf.

select QMNUM KDAUF from VIQMEL

into table it_viqmel where qmnum in s_qmnum

and kdauf in s_kdauf.

loop at it_viqmel.

write: /10 it_viqmel-kdauf, 20 it_viqmel-qmnum.

endloop.

Thanks

Naveed

Read only

Former Member
0 Likes
646

Hi,

1. Use select-options/parameter statement to take the input values.

2. Write the select statement to get the data of KDAUF & QMNUM from table VIQMEL,use where condition for select-options.

3.Use event AT LINE-SELECTION.(like Validations)

4.Write the code to give the input to another input field.

Reward,if useful.

thanks,

Chandu

Read only

Former Member
0 Likes
646

Hi,

Tables: viqmel.

Data: begin of it_itab occurs 0,

ls_qmnum like viqmel-qmnum,

ls_kdauf like viqmel-kdauf,

end of it_itab.

select-options: s_qmnum for viqmel-qmnum,

s_kdauf for viqmel-kdauf.

select QMNUM KDAUF

from VIQMEL

into table it_itab

where qmnum in s_qmnum

OR kdauf in s_kdauf.

loop at itab.

write: /it_itab-ls_kdauf, it_itab-ls_qmnum.

endloop.

Reward pts if helpfull