09-22-2008 1:52 PM
Hello
i want create a dynamic selections screen.
here for example
select-options: sl_matnr for mara-matnr obligatory,
sl_vkorg for a602-vkorg obligatory no intervals no-extension,
sl_kunnr for a602-kunnr,
sl_vtweg for a950-vtweg,
sl_datab for a602-datab no intervals no-extension.
when i write in sl_kunnr field, it should invisiable sl_vtweg.
i try to this way.
at selection-screen on sl_kunnr.
loop at screen.
if screen-name = '%_SL_VTWEG_%_APP_%-TEXT'.
%_sl_vtweg_%_app_%-invisible = 'X'.
endif.
endloop.
but it show error, that the filed "invisible" not exist.
ths for help
kostonstyle
09-22-2008 2:33 PM
Try it this way:
select-options: sl_matnr for mara-matnr obligatory,
sl_vkorg for a950-vkorg," obligatory no intervals no-extension,
sl_kunnr for a950-kunnr,
sl_vtweg for a950-vtweg,
sl_datab for a950-datab no intervals no-extension.
at selection-screen output.
if sl_matnr[] is not initial.
loop at screen.
if screen-name CS 'SL_VKORG'.
SCREEN-ACTIVE = 0.
MODIFY SCREEN.
endif.
endloop.
endif.
With luck,
Pritam.
09-22-2008 1:54 PM
hi,
use the screen table for selection-screen validations.
u can write as screen-invisible = 'X' .
09-22-2008 1:59 PM
Hi,
Try this.
LOOP AT SCREEN.
IF screen-name = 'SL_VTWEG-LOW' OR screen-name = 'SL_VTWEG-HIGH'.
IF SL_KUNNR IS NOT INITAIL.
SCREEN-INPUT = 1.
ELSE.
SCREEN-INPUT=0.
ENDIF.
ENDIF.
MODIFY SCREEN,
ENDLOOP.
09-22-2008 1:59 PM
hi,
SELECT-OPTIONS : sl_matnr FOR mara-matnr OBLIGATORY,
sl_vkorg FOR a602-vkorg OBLIGATORY NO INTERVAL NO-EXTENSIONS,
sl_kunnr FOR a602-kunnr,
sl_vtweg FOR a950-vtweg MODIF ID 001, "modif id
sl_datab FOR a602-datab NO INTERVAL NO-EXTENSIONS.
AT SELECTION-SCREEN OUTPUT sl_kunnr. "selection screen PBO
LOOP AT screen.
CHECK screen-group EQ '001'.
IF sl_kunnr IS INITIAL.
screen-invisible EQ '0'.
ELSE.
screen-invisible EQ '1'.
ENDIF.
MODIFY screen.
ENDLOOP.
hoep this helps
ec
09-22-2008 2:00 PM
Give "sl_vtweg for a950-vtweg" a MODIF ID
Eg. sl_vtweg for a950-vtweg MODIF ID B1.
Then you can do:
loop at screen.
if screen-group1 eq 'B1'.
screen-invisible = 1.
endif.
modify screen.
endloop.
Edited by: Maen Anachronos on Sep 22, 2008 3:00 PM
09-22-2008 2:00 PM
Hello kostonstyle,
Rewrite your code as below to avoid syntax error.
loop at screen.
if screen-name = '%_SL_VTWEG_%_APP_%-TEXT'.
screen-visible = 0.
modify screen.
endif.
endloop.
Writing this statement in the event at selection screen on sl_kunnr will not meet your requirement as this event is triggered only when you execute the report.
You need to assign a user-command to sl_kunnr. See F1 for help.
Then write the above code in at selection-screen output event.
Regards
Farzan
09-22-2008 2:23 PM
when i write into sl_kunnr field, then it should invisible sl_vtweg, otherwise not.
09-22-2008 2:27 PM
/spoonfeed
AT SELECTION_SCREEN OUTPUT.
IF NOT sl_kunnr[] is initial.
* Do your stuff
ENDIF.
I'm sure there are other ways, but honestly i cba to look them up.
09-22-2008 2:33 PM
Try it this way:
select-options: sl_matnr for mara-matnr obligatory,
sl_vkorg for a950-vkorg," obligatory no intervals no-extension,
sl_kunnr for a950-kunnr,
sl_vtweg for a950-vtweg,
sl_datab for a950-datab no intervals no-extension.
at selection-screen output.
if sl_matnr[] is not initial.
loop at screen.
if screen-name CS 'SL_VKORG'.
SCREEN-ACTIVE = 0.
MODIFY SCREEN.
endif.
endloop.
endif.
With luck,
Pritam.
09-22-2008 2:39 PM
@Pritam Ghosh
you are my good. super, it's functional.
thx all people for try help me.
regards kostonstyle
09-22-2008 2:44 PM
You cannot change the screen in the AT SELECTION-SCREEN ON.. event. You have to do it in AT SELECTION-SCREEN OUTPUT. Also, to trigger AT SELECTION-SCREEN OUTPUT, the user has to press enter after a value is entered in the selection screen. You can try something like this.
DATA: kunnr_entered TYPE c.
select-options: sl_matnr for mara-matnr obligatory,
sl_vkorg for a602-vkorg obligatory no intervals no-extension,
sl_kunnr for a602-kunnr,
sl_vtweg for a950-vtweg,
sl_datab for a602-datab no intervals no-extension.
AT SELECTION-SCREEN ON sl_kunnr.
IF sl_kunnr IS NOT INITIAL.
kunnr_entered = 'X'.
ELSE.
CLEAR kunnr_entered.
ENDIF.
AT SELECTION-SCREEN OUTPUT.
IF kunnr_entered = 'X'.
LOOP AT SCREEN.
CHECK screen-group1 = 'KUN'.
screen-active = 0.
MODIFY SCREEN.
*-- even if the value is entered, clear it
CLEAR sl_vtweg[].
ENDLOOP.
ELSE.
LOOP AT SCREEN.
CHECK screen-group1 = 'KUN'.
screen-active = 1.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
09-22-2008 2:54 PM
09-22-2008 3:04 PM
>
>
CHECK screen-group1 = 'KUN'.
>
> You forgot to add the MODIF ID KUN.
and this code
AT SELECTION-SCREEN ON sl_kunnr.
IF sl_kunnr IS NOT INITIAL.
kunnr_entered = 'X'.
ELSE.
CLEAR kunnr_entered.
ENDIF.
is just waste of time, because the content of sl_kunnr can be checked in the PBO directly. Anyway, it was worth 6 points...
09-22-2008 3:21 PM
It's a selection screen. Given the requirements, how do you want to check the contents of the select-option in the PBO and act upon them?
But i agree, it's a bit silly to set an indicator that the select-option is filled.
edit: on second thought, perhaps you meant the SELECTION_SCREEN OUTPUT when you wrote PBO.
Edited by: Maen Anachronos on Sep 22, 2008 4:22 PM
09-22-2008 3:24 PM
>
> It's a selection screen. Given the requirements, how do you want to check the contents of the select-option in the PBO and act upon them?
>
> But i agree, it's a bit silly to set an indicator that the select-option is filled.
there are no tricks needed, it is possible to do it directly, just have a look at my solution above and give it a try! (of course the PBO has to be triggered through a USER-COMMAND, but it is necessary in any case)
09-22-2008 3:30 PM
Aahh that post!
While i was posting my first reply, you already hit submit. Hence my reply was a minute later.
And trust me, with 13 years of experience i don't think i need to try it out.
09-22-2008 3:36 PM
>
edit: on second thought, perhaps you meant the SELECTION_SCREEN OUTPUT when you wrote PBO.
yes!
by simple report programming:
AT SELECT-SCREEN OUTPUT - this is PBO for the (automatically generated) selection screen
AT SELECTION-SCREEN ON ... - these are PAIs for the (automatically generated) selection screen
but I believe this is clear-cut for you with 13 years of experience