Using Selection screen and selection screen output
Hi All,
I am trying to execute AT SELECTION-SCREEN and AT SELECTION-SCREEN output. Both the para's working fine seperately. But when I execute them together AT SELECTION-SCREEN output is not working. Please let me know how to solve this problem. Please see below for the code.
PARAMETERS: p_werks LIKE marc-werks OBLIGATORY MEMORY ID WRK,
p_lgort LIKE mard-lgort OBLIGATORY,
p_rlgort LIKE mard-lgort OBLIGATORY.
PARAMETERS: p_boml TYPE c RADIOBUTTON GROUP mode user-command flag.
SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS: p_aufnr LIKE aufk-aufnr MODIF ID cp2.
SELECTION-SCREEN: END OF BLOCK b1.
*SELECTION-SCREEN COMMENT 1(44) text-004 FOR FIELD p_cmpl.
PARAMETERS: p_cmpl TYPE c RADIOBUTTON GROUP mode.
SELECTION-SCREEN: BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
PARAMETERS: p_matnr type marc-matnr MODIF ID cp1,
p_verid type afpo-verid MODIF ID cp1,
p_labst type mard-labst MODIF ID cp1.
SELECTION-SCREEN: END OF BLOCK b2.
PARAMETERS: p_mstr TYPE c RADIOBUTTON GROUP mode.
AT SELECTION-SCREEN output.
LOOP AT SCREEN.
IF p_boml <> 'X' AND
screen-group1 = 'CP1'.
screen-active = '1'.
MODIFY SCREEN.
ENDIF.
IF p_cmpl <> 'X' AND
screen-group1 = 'CP2'.
screen-active = '1'.
MODIFY SCREEN.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
AT SELECTION-SCREEN.
IF p_boml EQ 'X'.
IF p_AUFNR EQ space.
MESSAGE e000(z1) WITH 'Please fill Production Order.'.
ENDIF.
endif.
IF p_cmpl EQ 'X'.
IF p_MATNR EQ space OR p_verid EQ space OR p_labst EQ space.
MESSAGE e000(z1) WITH text-003 'Production Version & Quantity. '.
ENDIF.
endif.
Thanks,
Senthil
Hi Senthil,
As far as my knowledge is concerned AT Selection-Screen output and AT Selection-Screen wont work together.In this code you are trying to do the validation in AT Selection-Screen. Instead of that try doin your validations in Start-of-selection Event.
i,e., modify your code as follows:
PARAMETERS: p_werks LIKE marc-werks OBLIGATORY MEMORY ID WRK,
p_lgort LIKE mard-lgort OBLIGATORY,
p_rlgort LIKE mard-lgort OBLIGATORY.
PARAMETERS: p_boml TYPE c RADIOBUTTON GROUP mode user-command flag.
SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS: p_aufnr LIKE aufk-aufnr MODIF ID cp2.
SELECTION-SCREEN: END OF BLOCK b1.
*SELECTION-SCREEN COMMENT 1(44) text-004 FOR FIELD p_cmpl.
PARAMETERS: p_cmpl TYPE c RADIOBUTTON GROUP mode.
SELECTION-SCREEN: BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
PARAMETERS: p_matnr type marc-matnr MODIF ID cp1,
p_verid type afpo-verid MODIF ID cp1,
p_labst type mard-labst MODIF ID cp1.
SELECTION-SCREEN: END OF BLOCK b2.
PARAMETERS: p_mstr TYPE c RADIOBUTTON GROUP mode.
AT SELECTION-SCREEN output.
LOOP AT SCREEN.
IF p_boml <> 'X' AND
screen-group1 = 'CP1'.
screen-active = '1'.
MODIFY SCREEN.
ENDIF.
IF p_cmpl <> 'X' AND
screen-group1 = 'CP2'.
screen-active = '1'.
MODIFY SCREEN.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
START-OF-Selection.
Perform validation.
form validation.
IF p_boml EQ 'X'.
IF p_AUFNR EQ space.
MESSAGE e000(z1) WITH 'Please fill Production Order.'.
ENDIF.
endif.
IF p_cmpl EQ 'X'.
IF p_MATNR EQ space OR p_verid EQ space OR p_labst EQ space.
MESSAGE e000(z1) WITH text-003 'Production Version & Quantity. '.
ENDIF.
endif.
endform.
Kindly reward if useful.
Thanks,
pavithra
Similar Messages
-
Im using bridge cs6 and i cant output to pdf or web on a new iMac 10.8.5 Help please
im using bridge cs6 and i cant output to pdf or web on a new iMac 10.8.5 Help please.
I have reset preferences etcHi Curt
No the far right field was left totally empty, reset preferences etc and nothing.
finally un-installed photoshop and re installed it and now all is going fine
Regards Terry -
Help: use command "run" and "exec", no output
I create a script file Test.sql, and type "run d:\test.sql" in ttisql's command prompt, but there is no output, not even any error messages.
Command> run d:\test.sql;
Command>
I try to use "Prepare" and "Exec", still no output
Command> prepare 1 select * from employee;
Command> exec 1;
Command>
ttisql looks recognize these commands, but it doesn't execute them. Who knows the reason? thanks.Hi,
I create a script file Test.sql, and type "run d:\test.sql" in ttisql's command prompt, but there is no output, not even any error messages.What SQL statements are in Test.sql? To see more verbose output from ttIsql, try increasing verbosity. The default is 2. The highest (most verbose) is 4.
Command>verbosity;
verbosity = 2
Command> verbosity 4;
The command succeeded.
try to use "Prepare" and "Exec", still no outputTry adding a fetchone or fetchall command to retreive the result. e.g.
Command> prepare 1 select * from emp;
Command> exec 1;
Command> fetchone;
< 7369, SMITH, CLERK, 7902, 1980-12-17 00:00:00.000000, 800.0000, <NULL>, 20 >
1 row found.
Command> fetchone;
< 7499, ALLEN, SALESMAN, 7698, 1981-02-20 00:00:00.000000, 1600.000, 300.0000, 3
0 >
1 row found.
Command> fetchall;
< 7521, WARD, SALESMAN, 7698, 1981-02-22 00:00:00.000000, 1250.000, 500.0000, 30
>
< 7566, JONES, MANAGER, 7839, 1981-04-02 00:00:00.000000, 2975.000, <NULL>, 20 >
< 7654, MARTIN, SALESMAN, 7698, 1981-09-28 00:00:00.000000, 1250.000, 1400.000,
30 >
< 7698, BLAKE, MANAGER, 7839, 1981-05-01 00:00:00.000000, 2850.000, <NULL>, 30 >
< 7782, CLARK, MANAGER, 7839, 1981-06-09 00:00:00.000000, 2450.000, <NULL>, 10 >
< 7788, SCOTT, ANALYST, 7566, 1987-04-19 00:00:00.000000, 3000.000, <NULL>, 20 >
< 7839, KING, PRESIDENT, <NULL>, 1981-11-17 00:00:00.000000, 5000.000, <NULL>, 1
0 >
< 7844, TURNER, SALESMAN, 7698, 1981-09-08 00:00:00.000000, 1500.000, 0.000000e+
00, 30 >
< 7876, ADAMS, CLERK, 7788, 1987-05-23 00:00:00.000000, 1100.000, <NULL>, 20 >
< 7900, JAMES, CLERK, 7698, 1981-12-03 00:00:00.000000, 950.0000, <NULL>, 30 >
< 7902, FORD, ANALYST, 7566, 1981-12-03 00:00:00.000000, 3000.000, <NULL>, 20 >
< 7934, MILLER, CLERK, 7782, 1982-01-23 00:00:00.000000, 1300.000, <NULL>, 10 >
12 rows found.
Command>
Good luck.
Simon -
Is simultaneous use of HDMI and Component Video outputs possible?
I want to split the Apple TV video output to drive my main plasma TV when desired, but also to a smaller LCD TV for more frequent use to show what songs are playing thru Apple TV - as this is my common usage. It seems that with the HDMI cable plugged into the Apple TV, it does not drive the component output. Is there some way to do this or do I have to go for an HDMI splitter?
SurfSouth wrote:
I want to split the Apple TV video output to drive my main plasma TV when desired, but also to a smaller LCD TV for more frequent use to show what songs are playing thru Apple TV - as this is my common usage. It seems that with the HDMI cable plugged into the Apple TV, it does not drive the component output. Is there some way to do this or do I have to go for an HDMI splitter?
HDMI takes precedence over component, so you can't use both at the same time. if HDMI is connected it will use that. -
Parse JSON records using PL/SQL and store the output in Oracle Database.
We have JSON data/record stored in a Oracle table as CLOB(database version 10g). We need to read/parse this JSON data and recognize the relevant tags and corresponding values in this JSON data and then insert these id/values into a separate Oracle staging table.
Please let me know if there is any re-usable code available for this.
We are looking for solution that does this manipulation in pl/sql. If this is not feasible, even Java code approach is fine.
Regards,
Kiranmayi.Hello,
PL/JSON | Free software downloads at SourceForge.net
ERASME - pl/sql library for JSON
Regards
Marcus -
'Music' displays but won't play. Settings appear correct and iPhone (3G) is selected for output. Startup screen intermittently displays with the lower pause/play volume bar for no clear reason..... developed at the same time as play failure. Ideas????
Thank you for the replies.
Appearane of 'Music' functions (I>> > II <<I, plus volume slider) on the lock/log in screen (when first turning on the iPhone) thus far seems without pattern, i.e. regardless of which if any applications are up in the background, and indeed even when all have been quit.
All visual aspects of 'Music' appear normal after launch including the title scroll across the top in vertical mode. However, while pressing play (>) converts the play (>) icon to pause (II), selected song does not play and the elapsed time bar (upper end between the track count and the repeat/shuffle icons) remains stationary at 0:00 or at any point to which it is dragged. When using home sharing this same problem persists regardless of what output is selected.
Hope that may prompt a thought somewhere. -
At-selection screen output and radio button together
Hi all,
I want to make a screen with radio buttons and a drop down menu on selection screen as soon as I check any button and click on Open from drop down menu the output should come according to the button cheked but the problem is that desired output is not coming.
Please see if something could be done.
Thanks,
ShwetaHi,
Here is the code see y it didnt responds,
I made ZMENU2 in SE41 with Menu bar as OPEN , also activated buttons BACK and EXIT.
tables : sscrfields.
CONSTANTS : buttonselected TYPE c LENGTH 1 VALUE 'X'.
DATA: ok_code LIKE sy-ucomm.
SELECTION-SCREEN BEGIN OF BLOCK frame1 WITH FRAME TITLE text-001.
SELECTION-SCREEN ULINE /1(60).
PARAMETERS: first RADIOBUTTON GROUP rad DEFAULT 'X',
second RADIOBUTTON GROUP rad,
third RADIOBUTTON GROUP rad,
fourth RADIOBUTTON GROUP rad,
fifth RADIOBUTTON GROUP rad.
SELECTION-SCREEN END OF BLOCK frame1.
AT SELECTION-SCREEN OUTPUT.
SET PF-STATUS 'ZMENU2'.
If first = buttonselected and ok_code = 'OPEN'..
WRITE 'You selected first button'.
ELSEIF second = buttonselected and ok_code = 'OPEN'..
WRITE 'You selected second button'.
ELSEIF third = buttonselected and ok_code = 'OPEN'.
WRITE 'You selected third button'.
ELSEIF fourth = buttonselected and ok_code = 'OPEN'.
WRITE 'You selected fourth button'.
ELSEIF fifth = buttonselected and ok_code = 'OPEN'.
WRITE 'You selected fifth button'.
ELSEIF ok_code ='BACK'.
LEAVE PROGRAM.
ELSEIF ok_code ='EXIT'.
LEAVE PROGRAM.
ENDIF. -
At selection-screen output and at selection-screen on
Hi Experts,
I had coded in both at selection-screen output for disabling input of certain fields and at selection-screen for validation like this:
AT SELECTION-SCREEN output.
IF p_amt = 'X'.
LOOP AT SCREEN.
CASE screen-name.
WHEN 'P_AMT'.
screen-input = '1'.
WHEN 'P_TST'.
screen-input = '1'.
WHEN 'P_B4C'.
screen-input = '1'.
WHEN 'P_AFC'.
screen-input = '1'.
WHEN 'P_COM'.
screen-input = '1'.
WHEN 'P_COM1'.
screen-input = '1'.
WHEN 'P_COM2'.
screen-input = '1'.
WHEN OTHERS.
screen-input = '0'.
ENDCASE.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
IF p_amt = 'X'.
LOOP AT SCREEN.
CASE screen-name.
WHEN 'P_AMT'.
screen-input = '1'.
WHEN 'P_TST'.
screen-input = '1'.
WHEN 'P_B4C'.
screen-input = '1'.
WHEN 'P_AFC'.
screen-input = '1'.
WHEN 'P_COM'.
screen-input = '1'.
WHEN 'P_COM1'.
screen-input = '1'.
WHEN 'P_COM2'.
screen-input = '1'.
WHEN OTHERS.
screen-input = '0'.
ENDCASE.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
IF p_pdf = 'X'.
LOOP AT SCREEN.
CASE screen-name.
WHEN 'P_PDF'.
screen-input = '1'.
WHEN 'P_TST'.
screen-input = '1'.
WHEN 'P_PATH'.
screen-input = '1'.
WHEN OTHERS.
screen-input = '0'.
ENDCASE.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
IF p_afc = 'X'.
LOOP AT SCREEN.
CASE screen-name.
WHEN 'P_TST'.
screen-input = '1'.
WHEN 'S_FID-LOW' OR 'S_FID-HIGH'.
screen-input = '0'.
WHEN 'S_ORG-LOW' OR 'S_ORG-HIGH'.
screen-input = '0'.
WHEN 'S_OFF-LOW' OR 'S_OFF-HIGH'.
screen-input = '0'.
WHEN 'S_DAT-LOW' OR 'S_DAT-HIGH'.
screen-input = '0'.
ENDCASE.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
AT selection-screen on block b5.
if p_tst is initial.
message text-016 type 'E'.
endif.
AT selection-screen on block b2.
if p_amt ne 'X' and p_pdf ne 'X'.
if s_fid is initial and s_org is initial.
message text-000 type 'E'.
endif.
if s_dat is initial.
message text-000 type 'E'.
endif.
endif.
when i comment out at selection-screen validations the input is disabled for the screen fields as set, else the validations are executed first.
Any solution for this???
Thanks in advance.AT SELECTION-SCREEN
Syntax
AT SELECTION-SCREEN selscreen_event.
Effect
This statement defines event blocks for different events selscreen_event that are triggered by the ABAP runtime environment during selection screen processing.
Selection screen events occur immediately before sending a selection screen and after certain user actions on a displayed selection screen. They assist in selection screen processing in the ABAP program.
AT SELECTION-SCREEN is triggered at least twice during actions on selection screens that are linked into another selection screen as a subscreen - first for the linked selection screen itself, and then for the linking selection screens.
Note
The event blocks after AT SELECTION-SCREEN are implemented internally as procedures. Declarative statments in these event blocks create local data. -
Problem in using at selection-screen output
Hai Frnds,
I am using 5 parameters in the selection screen . I am entering data in the 4 input fields. Then I am doing concatenate 4 fileds data into the 5th field in the event AT SELECTION-SCREEN OUTPUT, but my problem is When ever i click ENTER , then only 5th field is updating. With out ENTER key , Is it possible update 5th filed.
Thanks,
Kiran.Hi,
We can restrict the functionality of ENTER.
User the Concatenation in AT SELECTION-SCREEN EVENT
because AT SELECTION-SCREEN OUTPUT is triggered before
selection screen is displayed.Below code will definitly work.
Ex:
Tables:SSCRFIELDS.
At selection-screen.
IF SY-ucomm = ' '.
Clear SSCRFIELDS-UCOMM.
ENDIF.
CHECK SSCRFIELDS-UCOMM EQ 'ONLI'.
CONCATENATE <FIELDS> INTO PARAMETER5.
ONLI is Function code of F8
' ' is for enter.
The above code will surely work.
Thanks. -
Regarding selection screen output
hi,
i have created ALV report by using selection screen.in this i have displayed kunnr field from kna1 table.
but it is showing someextra zero's and then code now i want to display only code not extra zero.here below i am giving example:----
sap code
00001562
but i want like this....
sap code
1562.
thanx/regards,
vaneet thakurTABLES : VBRK,KNA1.
TYPE-POOLS : SLIS.
DATA : T_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
L_FIELDCAT TYPE SLIS_FIELDCAT_ALV, "DECLARATION OF FIELDCAT FOR OUTPUT DISPLAY
T_LAYOUT TYPE SLIS_LAYOUT_ALV.
DATA : BEGIN OF ITAB OCCURS 0,
VBELN LIKE VBRK-VBELN, "PO NUMBER
VTEG LIKE VBRK-VTWEG, "DC
SPART LIKE VBRK-SPART, "DIVISION
FKDAT LIKE VBRK-FKDAT, "DATE
KUNRG LIKE VBRK-KUNRG, "CUSTOMER PLANT
WERKS LIKE VBRK-WAERK, "SITE
VKORG LIKE VBRK-VKORG, "SALE ORGANIZATION
NAME1 LIKE KNA1-NAME1,
ORT01 LIKE KNA1-ORT01,
END OF ITAB.
SELECTION-SCREEN : BEGIN OF BLOCK VANEET WITH FRAME TITLE TEXT-001.
*SELECT-OPTIONS : SITE FOR VBRK-WAERK.
SELECT-OPTIONS : PCODE FOR VBRK-KUNRG.
*SELECT-OPTIONS : INVOICE FOR VBRK-VBELN.
SELECT-OPTIONS : S_ORG FOR VBRK-VKORG OBLIGATORY.
SELECT-OPTIONS : DC FOR VBRK-VTWEG OBLIGATORY.
SELECT-OPTIONS : DIVISION FOR VBRK-SPART obligatory.
*SELECT-OPTIONS : PO_DATE FOR VBRK-FKDAT.
SELECTION-SCREEN : END OF BLOCK VANEET.
SELECTION-SCREEN : BEGIN OF BLOCK VANEET1 WITH FRAME TITLE TEXT-002.
SELECT-OPTIONS : INVOICE FOR VBRK-VBELN.
SELECT-OPTIONS : PO_DATE FOR VBRK-FKDAT.
SELECTION-SCREEN : END OF BLOCK VANEET1.
*PERFORM TOP-OF-PAGE.
PERFORM FETCH-DATA.
*PERFORM DISP_DATA.
PERFORM T_FIELDCAT.
PERFORM REUSE_ALV.
**& Form TOP-OF-PAGE
text
--> p1 text
<-- p2 text
*FORM TOP-OF-PAGE .
*FORMAT COLOR 3 INTENSIFIED OFF.
*FORMAT COLOR 5 INTENSIFIED OFF.
*write : /48(120) 'NAHAR RETAIL LTD'.
*FORMAT COLOR 3 INTENSIFIED OFF.
*write : /48(120) 'FOCAL POINT'.
*FORMAT COLOR 6 INTENSIFIED OFF.
*write : /48(120) 'LUDHIANA'.
*write : / sy-uline.
*format color 4.
**WRITE: /1(20) 'INVOICENO',
25(15) 'SAP CODE',
55(15) 'PARTYNAME',
100(50) 'LOCATION'.
format color 7 INTENSIFIED ON.
*ENDFORM. " TOP-OF-PAGE
*& Form FETCH-DATA
text
--> p1 text
<-- p2 text
FORM FETCH-DATA .
REFRESH ITAB.
SELECT AVBELN AKUNRG AFKDAT AWAERK BNAME1 BORT01 INTO CORRESPONDING FIELDS OF TABLE ITAB
FROM VBRK AS A INNER JOIN KNA1 AS B
ON AKUNRG = BKUNNR
WHERE
A~VBELN IN INVOICE
and
A~FKDAT IN PO_DATE
and
B~KUNNR IN PCODE
GROUP BY AVBELN AKUNRG BNAME1 BORT01 AFKDAT AWAERK.
SORT ITAB ascending BY VBELN.
*ENDSELECT.
ENDFORM. " FETCH-DATA
**& Form DISP_DATA
text
--> p1 text
<-- p2 text
*FORM DISP_DATA .
*loop at itab.
*write :/1(18) itab-VBELN,
27(5) ITAB-KUNRG,
55(25) ITAB-NAME1,
100(50) ITAB-ORT01.
*endloop.
*ENDFORM. " DISP_DATA
*& Form T_FIELDCAT
text
--> p1 text
<-- p2 text
FORM T_FIELDCAT .
PERFORM fill_field USING 'VBELN' 'PO NO'.
PERFORM fill_field USING 'KUNRG' 'CUSTOMER PLANT'.
PERFORM fill_field USING 'NAME1' 'PARTY NAME'.
PERFORM fill_field USING 'ORT01' 'LOCATION'.
PERFORM fill_field USING 'BASME' 'UOM'.
PERFORM SELECTION_WIDTH.
ENDFORM. " T_FIELDCAT
*& Form fill_field
text
-->P_0267 text
-->P_0268 text
FORM fill_field USING p_fieldname
p_seltext.
L_FIELDCAT-FIELDNAME = p_fieldname.
L_FIELDCAT-TABNAME = 'ITAB'.
L_FIELDCAT-SELTEXT_M = p_seltext.
L_FIELDCAT-OUTPUTLEN = 10.
APPEND L_FIELDCAT TO T_FIELDCAT.
CLEAR L_FIELDCAT.
ENDFORM. " fill_field
*& Form REUSE_ALV
text
--> p1 text
<-- p2 text
FORM REUSE_ALV .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = ' '
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT = T_LAYOUT
IT_FIELDCAT = T_FIELDCAT
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
I_HTML_HEIGHT_TOP = 0
I_HTML_HEIGHT_END = 0
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
IR_SALV_FULLSCREEN_ADAPTER =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = ITAB
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " REUSE_ALV
*& Form SELECTION_WIDTH
text
--> p1 text
<-- p2 text
FORM SELECTION_WIDTH .
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = itab-kunrg
IMPORTING
OUTPUT = itab-kunrg -
AT SELECTION-SCREEN OUTPUT not working!
Hi,
I am useing the statement AT SELECTION-SCREEN OUTPUT to disable some input fields based on a check box(PR_FILE).however when I execute the program the changes on the screen are not reflected!I have written the AT SELECTION-SCREEN OUTPUT stmt immediately after SELECTION-SCREEN stmt .
Defination for the screen elements is as follows:
SELECT-OPTIONS s_plants FOR ls_selected_plant-plant
NO INTERVALS.
SELECTION-SCREEN BEGIN OF BLOCK filesel WITH FRAME TITLE text-012.
PARAMETERS pr_file TYPE xfeld .
PARAMETER : pr_path LIKE rlgrap-filename .
SELECTION-SCREEN END OF BLOCK filesel.
AT SELECTION-SCREEN OUTPUT.
IF pr_file = 'X'.
LOOP AT SCREEN.
IF screen-name = 's_plants'.
screen-input = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSE.
LOOP AT SCREEN.
IF screen-name = 'pr_path'.
screen-input = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
Can anybody suggest what wrong i have done??You need to use the User Command for the checkbox and the Modificaiton ID (Group) for the fields.
Try like this:
TABLES: VBRP.
SELECT-OPTIONS S_PLANTS FOR VBRP-WERKS NO INTERVALS MODIF ID GP1.
SELECTION-SCREEN BEGIN OF BLOCK FILESEL WITH FRAME TITLE TEXT-012.
PARAMETERS PR_FILE TYPE XFELD USER-COMMAND USR1.
PARAMETER : PR_PATH LIKE RLGRAP-FILENAME MODIF ID GP2 .
SELECTION-SCREEN END OF BLOCK FILESEL.
AT SELECTION-SCREEN OUTPUT.
IF PR_FILE = 'X'.
LOOP AT SCREEN.
if screen-group1 = 'GP1'.
SCREEN-active = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSE.
LOOP AT SCREEN.
IF SCREEN-group1 = 'GP2'.
SCREEN-active = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
Regards,
Naimesh Patel -
At selection-screen output probelm
Hi ,
I am using 4 parameters in the selection screen . I am entering data in the 3 input fields. Then I am doing concatenate 3 fileds data into the 4 th field in the event AT SELECTION-SCREEN OUTPUT, bur my problem is When ever i click ENTER , then only 4th field is updating. With out ENTER key , Is it possible update 4th filed.
regards,
ramajay reddyHi,
This is not possible without a user action on the screen, unless your fields are drop down lists, check box or radiobutton respectively, Reason is that the SAP Screen processing will not trigger the PAI event unless there is a user action on the screen like pushing a button, radiobutton , checkbox or selecting a value from a dropdown list. And hence PBO will not get triggered either. Thus entering value in input fields and pressing the tab key is not enough. The user must press 'Enter' if the PAI--PBO should be triggered.
Pressing 'Enter' is much more user friendly and convinient than adding a button/radiobutton/checkbox on the selection screen to update other fields on the selection screen as in your scenario.
regards,
Advait -
At selection screen output not responding
Hi ppl,
I've 4 selection options in my screen. however I just need user to insert only 1 of the 4 for searching. Therefore i included 4 radio buttons. when user select <i>rbf</i>, <i>sfileno</i> will activer and other 3 will be grayed out, when user select <i>rbi</i>, <i>sidnum</i> will active and other will not be active and so forth. You can see the codes below.
However, during the program running, I found out when i select <i>rbf,</i> the other select options fields - <i>sfileno</i>, <i>sidnum</i> n <i>scompsno</i> are not inactive/grayed. It is the same when I seledt the other radio button. I just seem that i receive no response from the program. What have i done wrong here. please help. TQ
SELECTION-SCREEN BEGIN OF BLOCK frm1 WITH FRAME TITLE text-t01 .
SELECT-OPTIONS : sfileno FOR zlic_masterdb-nofailpermohonan modif id f01
sidnum FOR zcustomer-idnumber modif id i01,
sconame FOR zcustomer-contactname modif id n01,
scompsno FOR zcom_compdhdr-compsno modif id c01.
PARAMETERS: rbf RADIOBUTTON GROUP g1 ,
rbi RADIOBUTTON GROUP g1,
rbn RADIOBUTTON GROUP g1,
rbc RADIOBUTTON GROUP g1.
SELECTION-SCREEN END OF BLOCK frm1.
INITIALIZATION.
sfileno = '00001'.
AT SELECTION-SCREEN OUTPUT
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
CHECK SCREEN-GROUP1 = 'f01' OR
SCREEN-GROUP1 = 'i01' OR
SCREEN-GROUP1 = 'n01' OR
SCREEN-GROUP1 = 'c01'.
IF rbf = 'X'.
IF SCREEN-GROUP1 EQ 'f01'.
SCREEN-ACTIVE = 1.
ELSEIF SCREEN-GROUP1 EQ 'i01'.
SCREEN-ACTIVE = 0.
ELSEIF SCREEN-GROUP1 EQ 'n01'.
SCREEN-ACTIVE = 0.
ELSEIF SCREEN-GROUP1 EQ 'c01'.
SCREEN-ACTIVE = 0.
ENDIF.
ELSEIF rbi = 'X'.
IF SCREEN-GROUP1 EQ 'i01'.
SCREEN-ACTIVE = 1.
ELSEIF SCREEN-GROUP1 EQ 'f01'.
SCREEN-ACTIVE = 0.
ELSEIF SCREEN-GROUP1 EQ 'n01'.
SCREEN-ACTIVE = 0.
ELSEIF SCREEN-GROUP1 EQ 'c01'.
SCREEN-ACTIVE = 0.
ENDIF.
ELSEIF rbn = 'X'.
IF SCREEN-GROUP1 EQ 'n01'.
SCREEN-ACTIVE = 1.
ELSEIF SCREEN-GROUP1 EQ 'f01'.
SCREEN-ACTIVE = 0.
ELSEIF SCREEN-GROUP1 EQ 'i01'.
SCREEN-ACTIVE = 0.
ELSEIF SCREEN-GROUP1 EQ 'c01'.
SCREEN-ACTIVE = 0.
ENDIF.
ELSEIF rbc = 'X'.
IF SCREEN-GROUP1 EQ 'c01'.
SCREEN-ACTIVE = 1.
ELSEIF SCREEN-GROUP1 EQ 'f01'.
SCREEN-ACTIVE = 0.
ELSEIF SCREEN-GROUP1 EQ 'n01'.
SCREEN-ACTIVE = 0.
ELSEIF SCREEN-GROUP1 EQ 'i01'.
SCREEN-ACTIVE = 0.
ENDIF.
ENDIF.
MODIFY SCREEN.
continue.
ENDLOOP.hi Enzo
Check my sample code
TABLES: eban,
SSCRFIELDS.
SELECTION-SCREEN BEGIN OF SCREEN 100 TITLE title.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-t01.
PARAMETER:rad1 RADIOBUTTON GROUP rad USER-COMMAND frad1 DEFAULT 'X',
rad2 RADIOBUTTON GROUP rad .
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-t02.
PARAMETER: mtr AS CHECKBOX MODIF ID g3 USER-COMMAND chk1,
p_matnr TYPE eban-matnr MODIF ID g1,
sloc AS CHECKBOX MODIF ID g3 USER-COMMAND chk2,
str_loc TYPE eban-lgort MODIF ID g4.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-t03.
SELECT-OPTIONS: matnr1 FOR eban-matnr MODIF ID g2.
SELECTION-SCREEN END OF BLOCK b3.
SELECTION-SCREEN PUSHBUTTON /20(10) name USER-COMMAND UCOM.
SELECTION-SCREEN END OF SCREEN 100.
name = 'FETCH'.
title = 'Test Report'.
CALL SELECTION-SCREEN '100'.
TYPE-POOLS slis.
* declaration of internal tables and work areas to be used
DATA: BEGIN OF it_pr OCCURS 0,
banfn TYPE eban-banfn,
bnfpo TYPE eban-bnfpo,
loekz TYPE eban-loekz,
statu TYPE eban-statu,
ekgrp TYPE eban-ekgrp,
matnr TYPE eban-matnr,
werks TYPE eban-werks,
lgort TYPE eban-lgort,
preis TYPE eban-preis,
peinh TYPE eban-peinh,
END OF it_pr.
DATA: BEGIN OF it_mat OCCURS 0,
matnr TYPE eban-matnr,
END OF it_mat.
*DATA:BEGIN OF ITAB1 OCCURS 0,
DATA: l_answer.
DATA: it_fieldcat TYPE slis_t_fieldcat_alv,
wa_fieldcat LIKE LINE OF it_fieldcat,
it_event TYPE slis_t_event,
wa_event TYPE slis_alv_event.
* declaration of variables to be used
DATA: r_ucomm TYPE sy-ucomm,
mat_no TYPE eban-matnr,
len TYPE i VALUE 1,
count TYPE i VALUE IS INITIAL,
iflag TYPE i VALUE IS INITIAL,
iflag1 TYPE i VALUE 0.
DATA :pr_id TYPE sy-repid,
rt_extab TYPE slis_t_extab.
INITIALIZATION.
pr_id = sy-repid.
probably it would sol;ve ur problem
regards
ravish
<b>plz dont forget to reward points if helpful</b> -
At selection screen output plz help
hi all ,
i written below code . my req is if users select radio button r_com all elements in block b2 should be invisable.
this code is not working becuase r_com is populated with 'X' VALUE at rumtime in the event .
tables : coep ,SSCRFIELDS.
SELECTION-SCREEN : BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS : S_GJAHR FOR COEP-GJAHR NO INTERVALS NO-EXTENSION
OBLIGATORY ,
S_PERIO FOR COEP-PERIO NO INTERVALS NO-EXTENSION
OBLIGATORY.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(20) TEXT-002.
PARAMETERS : r_Com RADIOBUTTON GROUP mai user-command rusr .
SELECTION-SCREEN COMMENT 25(15) TEXT-003.
PARAMETERS : r_group RADIOBUTTON GROUP mai .
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN : END OF BLOCK B1 .
SELECTION-SCREEN : BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(30) TEXT-003 MODIF ID B21.
parameters : p_0001 like AFRU-ISMNW OBLIGATORY MODIF ID B21.
SELECTION-SCREEN COMMENT 45(40) TEXT-004 MODIF ID B21.
parameters : p_0002 like AFRU-ISMNW OBLIGATORY MODIF ID B21 .
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(30) TEXT-005 MODIF ID B21.
parameters : p_0003 like AFRU-ISMNW OBLIGATORY MODIF ID B21.
SELECTION-SCREEN COMMENT 45(40) TEXT-006 MODIF ID B21.
parameters : p_0004 like AFRU-ISMNW OBLIGATORY MODIF ID B21 .
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN : END OF BLOCK B2 .
at selection-screen OUTPUT.
IF R_COM EQ 'X' .
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'B21'.
SCREEN-ACTIVE = 0 .
MODIFY SCREEN.
ENDIF.
ENDLOOP.
thanks ,
sridharAMIT ,
IT IS WORKING , thanks but when i use another block like below and using this code it is not working .
SELECTION-SCREEN : BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-002..
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(30) TEXT-003 MODIF ID B22.
parameters : p_0005 like AFRU-ISMNW OBLIGATORY MODIF ID B22.
SELECTION-SCREEN COMMENT 45(40) TEXT-004 MODIF ID B22.
parameters : p_0006 like AFRU-ISMNW OBLIGATORY MODIF ID B22 .
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(30) TEXT-005 MODIF ID B21.
parameters : p_0007 like AFRU-ISMNW OBLIGATORY MODIF ID B22.
SELECTION-SCREEN COMMENT 45(40) TEXT-006 MODIF ID B22.
parameters : p_0008 like AFRU-ISMNW OBLIGATORY MODIF ID B22 .
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN : END OF BLOCK B3 .
at selection-screen OUTPUT.
IF R_COM EQ 'X' .
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'B21'.
SCREEN-ACTIVE = 0 .
MODIFY SCREEN.
ENDIF.
ENDLOOP.
elseif r_group eq 'X'.
LOOP AT SCREEN .
IF SCREEN-GROUP1 = 'B22'.
SCREEN-ACTIVE = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
my question is , whne i select one radio button how to diable block .
thanks,
sridhar -
At selection-screen output in batch job
Hi guys,
is at selection-screen output event being triggered in batch job?
Thanks!Yes it will, We set the value using a variant during scheduling the job but that values can also be false. You can check that yourself and look for job log then.
Thanks,
Jayant
Maybe you are looking for
-
How to stay Signed In in ASC forums?
With our first Apple -- a MacBook Pro with Mountain Lion -- these forums have been helpful on a few confusing issues. But each time I get an email that someone has replied to one of my ASC discussion threads, and I click on the link in the email, I h
-
How To Add Business Partner Catalog Numbers throuh the SDK (OSCN)
Is there an SDK Object to Add Business Partner Catalog Numbers (form 993) I would like to use a sdk object to Add Business Partner Catalog Numbers instead of using SQL to insert into the OSCN table Sincerely yours Riade Asleh
-
Purchased a KT3 Ultra2 after reading good reviews. Replaced old Chaintech CT-7AJA motherboard. Fitted new 512MB DDR memory module (PC2100). Reconnected all devices etc. Switched on power. Front panel power LED came on. Hard drive LED came on for 20 s
-
App Store rejects all my credit cards
I'm italian and I have 2 credit card (postepay and paypal) and everytime I try to buy something Apple Store don't recognize my credit card. The error message tell me there are some mistake, but I have used this card before to buy app for my iPhone o
-
I'm running a G4 with 9.2.2. I was attempting to upgrade to the X "family" of operating systems. I put the 10.1 disc in and it says that os 10 was not there so it couldn't install. Now when I tried to put os 10 in, the computer just freezes on the in