2014 Dec 10 10:12 AM
My program has a initial selection screen 20 with a parameter p_obj and runs from a transaction zabc.
If i run this transaction from a parameter transaction with p_obj filled in default values of transaction,
I want to hide this field on the selection screen.
But when i tried the parameter transaction default values are filled after the selection screen output is processed.
Is there any other way get this.
Thanks
My program has a initial selection screen 20 with a parameter p_obj and runs from a transaction zabc.
If i run this transaction from a parameter transaction with p_obj filled in default values of transaction,
I want to hide this field on the selection screen.
But when i tried the parameter transaction default values are filled after the selection screen output is processed.
Is there any other way get this.
Thanks
2014 Dec 10 10:31 AM
Hi Harsh,
Maybe you can try invisible it in 'AT SELECTION-SCREEN.' event.
AT SELECTION-SCREEN.
If p_obj is not intial.
loop screen.
screen-invisible = '1'.
modify screen.
endloop.
endif.
You see, if call it from transaction, p_obj have value, then it will be invisible. Just try.
regards,
Archer
2014 Dec 10 11:29 AM
2014 Dec 10 11:52 AM
Hi,
different from Archer's post you have to do that at PBO of the selection screen, which is in event
AT SELECTION-SCREEN OUTPUT.
Additionally you have to check SCREEN-NAME within the loop, otherwise all fields would be set to invisible.
Also don't check a selection screen parameter like P_OBJ directly, otherwise your field will become invisible in normal transaction too after input and ENTER. Check for the tcode. If it's the normal one, don't modify screen.
Regards,
Klaus
2014 Dec 10 1:40 PM
The value from the parameter transaction gets filled in screen field after AT SELECTION-SCREEN OUTPUT.
Thanks
2014 Dec 11 1:46 AM
INITIALIZATION.
LOOP AT SCREEN.
IF screen-name = 'P_WERKS' OR screen-name = '%_P_WERKS_%_APP_%-TEXT'.
IF sy-tcode IS NOT INITIAL.
screen-output = '0'.
screen-active = '0'.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.
2014 Dec 10 10:36 AM
Hi Harsh,
parameters: p_obj like "-----" default 'abc...' no-display.
is this your requirement?
Thanks.
2014 Dec 10 10:58 AM
In my case the same zabc transaction can be called from different parameter transactions with different default values. So the values come from transaction i cannot put that as default in code.
Thanks
2014 Dec 10 11:51 AM
In the PBO : AT SELECTION-SCREEN OUTPUT, execute a LOOP AT SCREEN and hide/deactivate the field if parameter is not empty.
NB: Is there any event that the parameter must be accessible, in this case set a variable in the INITIALIZATION event not to hide the field if it was not initially populated.
Ref: The parameters are received by the report after end of INITIALIZATION event, just before the AT SELECTION-SCREEN OUTPUT event. (Calling Executable Programs / Flow of an Executable Program)
Regards,
Raymond
2014 Dec 10 2:12 PM
Oops , I tested with a transaction "dialog transaction" with a variant and tbe value was available IN AT SELECTION-SCREEN OUTPUT, BUT with a "parameter transaction" the value is not yet available (same behavior as if a small BDC was executed, so no event to "intercept" program flow is available)
You CANNOT use those transactions for your requirement, the LOOP AT SCREEN only make sense in PBO, or you would have to check sy-tcode in AT SELECTION-SCREEN OUTPUT event.
So
Regards,
Raymond
2014 Dec 10 12:00 PM
Hi Harsh,,
Please try these.............
PARAMETERS : p_dummy type mara-matnr.
LOOP AT SCREEN.
IF screen-name CS 'P_DUMMY' OR " Hide dummy paramater
screen-group1 = 'ONE' OR
screen-group1 = 'TWO' OR
screen-group1 = 'TRI' OR
screen-group1 = 'FR' OR
screen-group1 = 'FIV' .
screen-input = 0.
screen-active = 1.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Regards,
Kabil
2014 Dec 11 9:50 AM
Hi Harsh,
Hope it helpful
DATA FLAG(01).
Declare one variable use export and import memory id.
AT SELECTION-SCREEN OUTPUT.
IF FLAG IS NOT INITIAL.
LOOP AT SCREEN.
IF SCREEN-NAME = 'WERKS'.
SCREEN_INPUT = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
Regards,
Venkat.
2014 Dec 11 11:57 AM
Hi,
Try with this,
PARAMETERS : P_KUNNR TYPE KNA1-KUNNR MODIF ID AAA .
PARAMETERS : P_CNAME TYPE KNA1-NAME1 MODIF ID AAA .
PARAMETERS : P_LIFNR TYPE LFA1-LIFNR MODIF ID BBB .
PARAMETERS : P_VNAME TYPE LFA1-NAME1 MODIF ID BBB .
PARAMETERS : RB_CUST RADIOBUTTON GROUP ABC DEFAULT 'X' USER-COMMAND UCOMM,
RB_VEND RADIOBUTTON GROUP ABC .
AT SELECTION-SCREEN OUTPUT .
IF RB_CUST = 'X' .
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'AAA' .
SCREEN-INPUT = '1' .
MODIFY SCREEN .
ELSEIF SCREEN-GROUP1 = 'BBB' .
SCREEN-INPUT = '0' .
MODIFY SCREEN .
ENDIF .
ENDLOOP .
ELSEIF RB_VEND = 'X' .
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'AAA' .
SCREEN-INPUT = '0' .
MODIFY SCREEN .
ELSEIF SCREEN-GROUP1 = 'BBB' .
SCREEN-INPUT = '1' .
MODIFY SCREEN .
Regards,
Darshan MS
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |