‎2008 May 09 6:53 PM
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.
‎2008 May 09 7:05 PM
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.
‎2008 May 09 7:07 PM
‎2008 May 09 7:40 PM
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
‎2008 May 10 4:52 AM
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
‎2008 May 10 7:12 AM
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