‎2008 Jul 23 12:57 PM
Hello All,
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-s03.
PARAMETERS: p_ldest TYPE ssfcompop-tddest DEFAULT 'LIME'.
PARAMETERS: p_print TYPE rldru-druck DEFAULT ' '.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-s04.
PARAMETERS: p_tddel TYPE ssfcompop-tddelete DEFAULT 'X'.
PARAMETERS: p_tdimm TYPE ssfcompop-tdimmed DEFAULT 'X'.
PARAMETERS: p_datas TYPE ssfcompop-tddataset DEFAULT 'IMLBEL'.
PARAMETERS: p_copis TYPE ssfcompop-tdcopies DEFAULT '1'.
PARAMETERS: p_autor TYPE ssfcompop-tdautority.
SELECTION-SCREEN END OF BLOCK b3.
data:p_lgpbe type c.
AT SELECTION-SCREEN.
IF s_lgpbe[] is initial.
select single lgpbe
from mard
into s_lgpbe
where werks in s_werks and
lgort in s_lgort and
matnr in s_matnr.
endif.
Above is my code in program.
My question when user will not enter any select option let say storage bin in selection screen.
Then i written above logic but is is not wrking.In this case i want select the data first for storage bin and then do the selection.
‎2008 Jul 23 1:01 PM
hi check this..
use an internal table for the lgpbe donot use the into s_lgpbe
IF s_lgpbe[] is initial.
select single lgpbe
from mard
into s_lgpbe
where werks in s_werks and
lgort in s_lgort and
matnr in s_matnr.
endif.
‎2008 Jul 23 1:03 PM
hi,
Put the Select query in the ELSE part of IF statemetn.
Thanks & Regards,
Chandralekha.
‎2008 Jul 23 1:05 PM
Hi Anil,
In the event START-OF-SELECTION write the following code :
START-OF-SELECTION.
if s_matnr is initial.
Select <fieldnames>
from <DB Tab Name>
into < Int Tab Name>.
elseif s_werks is initial.
Select <fieldnames>
from <DB Tab Name>
into < Int Tab Name>.
else.
Select <fieldnames>
from <DB Tab Name>
into < Int Tab Name>.
endif.Hope this solves the issue.
Regards,
Swapna.
‎2008 Jul 23 1:07 PM
select a value into a variable and then populate select-option
AT SELECTION-SCREEN .
IF s_lgpbe[] is initial.
select single lgpbe
from mard
into v_lgpbe
where werks in s_werks and
lgort in s_lgort and
matnr in s_matnr.
s_lgpbe-sign = 'I'.
s_lgpbe-option = 'EQ'.
s_lgpbe-low = v_lgpbe.
append s_lgpbe.
endif.