F4 hep for selection screen field
Hello ,
Im trying to create custom f4 help for Parameter ekbe-belnr by using below code. It displaying F4 values for EKBE-belnr. But when i select any value in F4 hlep , its not displaying in Selection Field. How can i reflect selected value in to selection field.
REPORT YMP.
Parameter: p_belnr type ekbe-belnr.
types: begin of tys_itab,
belnr type ekbe-belnr,
end of tys_itab.
data: itab type table of tys_itab.
at selection-screen on value-request for p_belnr.
select belnr from bkpf into table itab .
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE =
retfield = 'BELNR'
PVALKEY = ' '
DYNPPROG = Sy-repid
DYNPNR = SY-DYNNR
DYNPROFIELD = ' '
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
tables
value_tab = itab
FIELD_TAB =
RETURN_TAB =
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Thanks for ur time and help
sanjana
hi,
<b>F4IF_INT_TABLE_VALUE_REQUEST</b>
This FM is used to dsiplay values stored in an internal table as input
help.This FM is used to program our own custom help if no such input help
exists in ABAP dictionary for a particular field. The parameter VALUE_TAB is used to pass the internal table containing input values.The parameter RETFIELD
is used to specify the internal table field whose value will be returned to the screen field or RETURN_TAB.
If DYNPNR,DYNPPROG and DYNPROFIELD are specified than the user selection is passed to the screen field specified in the DYNPROFIELD. If RETURN_TAB is specified the selectionis returned in a table.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = field from int table whose value will be returned
DYNPPROG = SY-CPROG
DYNPNR = SY-DYNNR
DYNPROFIELD = 'screen field'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = internal table whose values will be shown.
RETURN_TAB = internal table of type DDSHRETVAL
EXCEPTIONS
parameter_error = 1
no_values_found = 2
others = 3.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'BELNR' " or belnr
DYNPPROG = Sy-repid " or SY-CPROG
DYNPNR = SY-DYNNR
DYNPROFIELD = 'p_belnr'
VALUE_ORG = 'S'
tables
value_tab = itab
regards,
Ashok Reddy
Similar Messages
-
Default value for selection screen field
Hi all,
I am using LDB PNPCE. I want to give default value for field Personnel area on selection screen.
How can I do it?
Thanks
RahulHi Rahul,
In the INITIALIZATION event we can set the default values for selection screen fields.
INITIALIZATION.
loop at screen.
if screen-name = 'S_MATNR-LOW'.
CLEAR S_MATNR.
s_matnr-low = '1234'.
s_matnr-option = 'EQ'.
s_matnr-sign = 'I'.
append s_matnr.
CLEAR S_MATNR.
s_matnr-high = '5678'.
s_matnr-option = 'EQ'.
s_matnr-sign = 'I'.
append s_matnr
clear s_matnr.
endif.
endloop.
Hope it helps.
Mark if useful
Regards,
Saumya -
How to put Mandatory option for selection screen fields in ABAP Queries
Hi Experts
Can anyone tell me how to put mandatory option for the selection screen fields in ABAP Queries.
Manually I had written code in the At Selection Screen option in infoset to display error message if that field is blank.
But I need to display the selection fields with the tick mark (obligatory mark).
How to do this?
Appropriate answers will be awardedHi
For parameter option
parameters : p_kunnr type kna1-kunnr obligatory.
For select option
select-options: s_date for vbak-erdat obligatory.
Plz rewards points ,
Regards ,
Ganesh. -
Possible entries for selection screen field
Hi,
I have created a custom DDIC table Z_TAB which contains 3 fields of type char. The table contains about 100 rows of data. I want that at the selection screen, for each selection field a list of entries in the table should appear. E.g. Data rows:
Field1 Field2 Field3
aaaaa bbbbb ccccc
bbbbb bbbbb ccccc
ccccc bbbbb ccccc
(contd.) (contd.) (contd.)
Now at the selection screen:
Field1 _________
Field2 _________
Field3 _________
It is required that at selection screen:
Field1 should give the option of entries: aaaaa, bbbbb, ccccc, ...
Field2 should give the option of entries: bbbbb, ...
Field3 should give the option of entries: ccccc, ...
and so on, like for the standard DDIC tables.
How can this be achieved? Help is appreciated.
RegardsHi,
AT selection-screen output even you read the records of the table into internal table and then At selection-screen on value request event you
use function module F4IF_FIELD_INT_TABLE_VALUE_REQUEST
(dont exacty remember the FM sorry but will be of similar kind)
and populate value for that functional module for each field in the even
ON VALUE REQUEST FOR PARTICULAR field by reading that record from first to the FIRST FIELD and from second record to second Field and from Third to the THIRD FIELD..
Hope this would solve your problem
Regards
Narin Nandivada. -
Search help for selection screen field
Hi ,
steps for creating search help for a key field in selection screen..
tables is a userdefined from which the field is taken..
thxs,
vindhi,
c this.
REPORT ZXYZ_0002 .
data: dynfields type table of dynpread with header line.
data: return type table of ddshretval with header line.
selection-screen begin of block b1 with frame title text-001 .
selection-screen begin of line.
PARAMETERS: P_BUKRS type T001-BUKRS.
selection-screen comment 30(20) BUTXT for field p_bukrs.
selection-screen end of line.
selection-screen end of block b1.
at selection-screen output.
if butxt is initial.
select single butxt into butxt
from t001
where bukrs = p_bukrs.
endif.
at selection-screen on value-request for p_bukrs.
call function 'F4IF_FIELD_VALUE_REQUEST'
exporting
tabname = 'T001'
fieldname = 'BUKRS'
dynpprog = sy-cprog
dynpnr = sy-dynnr
dynprofield = 'P_BUKRS'
tables
return_tab = return
exceptions
field_not_found = 1
no_help_for_field = 2
inconsistent_help = 3
no_values_found = 4
others = 5.
read table return with key fieldname = 'P_BUKRS'.
Add it back to the dynpro.
dynfields-fieldname = return-retfield.
dynfields-fieldvalue = return-fieldval.
append dynfields.
Get the company code from db and add to dynpro
data: xt001 type t001.
clear xt001.
select single * into xt001
from t001
where bukrs = return-fieldval.
dynfields-fieldname = 'BUTXT'.
dynfields-fieldvalue = xt001-butxt.
append dynfields.
Update the dynpro values.
call function 'DYNP_VALUES_UPDATE'
exporting
dyname = sy-cprog
dynumb = sy-dynnr
tables
dynpfields = dynfields
exceptions
others = 8.
start-of-selection.
rgsds
anver
if hlped mark points -
Multiple Selection For Selections screen field
Hi Friends ,
Can any body tell me how to create multiple selection for a field in selection screen and how to capture all those values of that fields in program for database selction. Suppose i am having document number EBELN from EKKO exists in selectio screen . how to create multiple selection for that and how to use all those values given to EBELN to get data from EKKO.
Kumar.hi,
select-options is one type of parameters where u can give multiple values in ranges or single as a input. when u use select-options then system will create a selection screen for u and u give multiple values as
ex:
select-options: s_ebeln for ekko-ebeln.
internally system creates a internal for s_ebeln which has for attributes
1. low --- starting value if range is used
2. high -
ending value
3. sign -
operator used for validating field
4. option -
to exclude given range of values or single value or to include.
for this u can assign default values in INITIALIZATION event as
INITIALIZATION.
s_ebeln -low = '1'.
s_ebeln- high = '100-100'.
s_ebeln-sign = 'BT'.
s_ebeln-option = 'I' // include
'E' // exclude.
if helpful reward some points.
with regards,
Suresh Aluri. -
F4 Help for the selection screen field
Hi Gurus,
I have to display F4 help for a selection screen field. i am using following code:
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'CODE'
dynpprog = lw_repid
dynpnr = sy-dynnr
VALUE_ORG = 'S'
TABLES
value_tab = gi_text
field_tab = li_fields_tab
return_tab = pi_return_tab
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
My internal table gi_emp has two fields CODE & TEXT. When i select 1 particular value, it returns the CODE value in the pi_return_tab table.
But my requirement is i have to capture the corresponding TEXT value for the Returned CODE. Ex: following is the F4 help being displayed: -
001 test
001 test1
but is i select code 001(First Value), i also need to capture it's corresponding Text value. In return table pi_return_tab i have only Code value.
Please help me out.
Note: Based on return code i can't search into the internal table gi_code, because as shown in the example, code has multiple text.Sachin,
I think this is what you need. The following code will return the key and the text (OR any other columns), if both columns are in the selection screen the selected values (both columns) will also be passed to the corresponding parameters. If you only need the text to be in the return table and not passed to the selection screen then set the parameter for text with NO-DISPLAY option.
REPORT zktest01 .
DATA :
BEGIN OF value_tab OCCURS 0,
field LIKE e070-trkorr,
text LIKE e07t-as4text,
END OF value_tab.
DATA: t_fldtab LIKE dfies OCCURS 0 WITH HEADER LINE,
t_rettab LIKE ddshretval OCCURS 0 WITH HEADER LINE,
t_dynmap LIKE dselc OCCURS 0 WITH HEADER LINE.
PARAMETERS : p_field LIKE value_tab-field,
p_text LIKE value_tab-text. "NO-DISPLAY.
INITIALIZATION.
t_fldtab-tabname = 'VALUE_TAB'.
t_fldtab-fieldname = 'FIELD'.
t_fldtab-langu = 'E'.
t_fldtab-position = 1.
t_fldtab-offset = 0.
t_fldtab-fieldtext = 'Key'.
t_fldtab-reptext = 'Key'.
t_fldtab-leng = 20.
t_fldtab-intlen = 20.
t_fldtab-outputlen = 20.
t_fldtab-datatype = 'CHAR'.
t_fldtab-inttype = 'C'.
t_fldtab-headlen = 20.
t_fldtab-keyflag = 'X'.
t_fldtab-lowercase = ' '.
APPEND t_fldtab.
t_fldtab-tabname = 'VALUE_TAB'.
t_fldtab-fieldname = 'TEXT'.
t_fldtab-position = 2.
t_fldtab-offset = 20.
t_fldtab-fieldtext = 'Text'.
t_fldtab-reptext = 'Text'.
t_fldtab-leng = 60.
t_fldtab-intlen = 60.
t_fldtab-outputlen = 60.
t_fldtab-headlen = 60.
t_fldtab-keyflag = ' '.
t_fldtab-lowercase = ' '.
APPEND t_fldtab.
value_tab-field = '101'.
value_tab-text = 'dddd'.
APPEND value_tab.
value_tab-field = '202'.
value_tab-text = 'aaaa'.
APPEND value_tab.
t_dynmap-fldname = 'FIELD'.
t_dynmap-dyfldname = 'P_FIELD'.
APPEND t_dynmap.
t_dynmap-fldname = 'TEXT'.
t_dynmap-dyfldname = 'P_TEXT'.
APPEND t_dynmap.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_field.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'FIELD'
dynpprog = 'ZKTEST01'
dynpnr = '1000'
dynprofield = 'P_FIELD'
value_org = 'S'
TABLES
field_tab = t_fldtab
value_tab = value_tab
return_tab = t_rettab
dynpfld_mapping = t_dynmap
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc EQ 0.
ENDIF.
START-OF-SELECTION.
Jeffrey Satriadi -
Can we create serach help for a selection screen field
Can we create serach help for a selection screen field with out creating searchhelp object.
I mean is it possible to create serchelp in the program itself with some specific values i want to give.
E.g say we can define any internal table and fill it with values and using that into selection screen fields
Regards
MaveAT SELECTION-SCREEN ON VALUE-REQUEST FOR paymeth.
PERFORM PAYMENT_HELP.
FORM PAYMENT_HELP.
DATA: begin of DESCR_TAB occurs 0,
DESCR LIKE BKPF-BKTXT,
END OF DESCR_TAB.
DATA: gd_repid like sy-repid.
gd_repid = sy-repid.
DESCR_TAB-DESCR = 'aaaaa'.
append DESCR_TAB.
DESCR_TAB-DESCR = 'bbbbb'.
append DESCR_TAB.
DESCR_TAB-DESCR = 'ccccc'.
append DESCR_TAB.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'DESCR'
DYNPPROG = gd_repid
DYNPNR = '1000'
DYNPROFIELD = 'paymeth'
VALUE_ORG = 'S'
DISPLAY = ' '
TABLES
value_tab = DESCR_TAB.
endform.
Svetlin -
Selection-screen fields validation for dialog
Hello ABAP Gurus
Requirements: this is a report wherein , depending upon the correct select-options , user will pick some field values from table and some will be entered by the user in the next se51 custom screen for creation of a record in a ztable .
the problem is :without validating select-options values , it calls the se51 screen 100.
How to keep the cursor at the selection-screen field until & unless user enters the correct i/p s .if i/p are correct then only it should call screen 100 otherwise remain in the selection screen only .
*& Report ZSD_REP_QUOT_BANK_CREATE *
REPORT ZSD_REP_QUOT_BANK_CREATE NO STANDARD PAGE HEADING LINE-SIZE 255.
TABLES: VBAK,VBAP,VBRK,ZSD_TABL_QOTBANK,MARA,KONV.
DATA: OK_CODE LIKE SY-UCOMM,
SAVE_OK_CODE LIKE SY-UCOMM,
WA_ITAB LIKE ZSD_TABL_QOTBANK,
ANSWER TYPE C,
COPIED ,
STS TYPE N,
EMGRP LIKE MARA-EXTWG,
QTY LIKE ZSD_TABL_QOTBANK-QTY,
UPRICE LIKE ZSD_TABL_QOTBANK-UPRICE,
TOT LIKE ZSD_TABL_QOTBANK-TOT,
INO LIKE VBAP-POSNR.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-000.
SELECT-OPTIONS: S_QTNO FOR ZSD_TABL_QOTBANK-QTNO
NO INTERVALS NO-EXTENSION OBLIGATORY,
S_ITNO FOR ZSD_TABL_QOTBANK-ITNO
NO INTERVALS NO-EXTENSION OBLIGATORY.
S_MATNO FOR ZSD_TABL_QOTBANK-MATNO
NO INTERVALS NO-EXTENSION. "
SELECTION-SCREEN END OF BLOCK b1.
AT SELECTION-SCREEN.
SELECT SINGLE VBTYP
INTO VBAK-VBTYP
FROM VBAK
WHERE VBELN IN S_QTNO.
IF SY-SUBRC EQ 0 AND VBAK-VBTYP NE 'B'.
MESSAGE I005(ZQOTBANK).
SET CURSOR FIELD S_QTNO-LOW.
SUBMIT (SY-REPID) VIA SELECTION-SCREEN.
ENDIF.
CLEAR WA_ITAB.
SELECT SINGLE QTNO ITNO
INTO WA_ITAB
FROM ZSD_TABL_QOTBANK
WHERE QTNO IN S_QTNO
AND ITNO IN S_ITNO.
IF SY-SUBRC EQ 0.
MESSAGE I001(ZQOTBANK).
SET CURSOR FIELD S_QTNO-LOW.
SET CURSOR FIELD S_ITNO-LOW.
SUBMIT (SY-REPID) VIA SELECTION-SCREEN.
ENDIF.
*START-OF-SELECTION.
END-OF-SELECTION.
CALL SCREEN 0100.
*& Module STATUS_0100 OUTPUT
text
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS '0100'.
SET TITLEBAR '0100'.
ZSD_TABL_QOTBANK-QTNO = S_QTNO-LOW.
SELECT SINGLE BUKRS_VF VKORG VTWEG SPART KUNNR ERDAT BNDDT
KNUMV
INTO (ZSD_TABL_QOTBANK-CCODE,
ZSD_TABL_QOTBANK-SORG,
ZSD_TABL_QOTBANK-DISTCHAN,
ZSD_TABL_QOTBANK-DIV,
ZSD_TABL_QOTBANK-CUSTNO,
ZSD_TABL_QOTBANK-QTDAT,
ZSD_TABL_QOTBANK-QTVALDAT,
VBAK-KNUMV)
FROM VBAK
WHERE VBELN IN S_QTNO
AND VBTYP = 'B'.
IF SY-SUBRC EQ 0.
SELECT SINGLE KWMENG POSNR MATNR
INTO (QTY , INO , ZSD_TABL_QOTBANK-MATNO)
FROM VBAP
WHERE VBELN IN S_QTNO.
SELECT SINGLE EXTWG
INTO EMGRP
FROM MARA
WHERE MATNR EQ ZSD_TABL_QOTBANK-MATNO.
ZSD_TABL_QOTBANK-ITNO = INO.
ZSD_TABL_QOTBANK-EMATGRP = EMGRP.
ZSD_TABL_QOTBANK-QTY = QTY.
SELECT SINGLE KBETR
INTO UPRICE
FROM KONV
WHERE KNUMV = VBAK-KNUMV
AND KPOSN = INO
AND KSCHL = 'PR00'.
ENDIF.
ZSD_TABL_QOTBANK-UPRICE = UPRICE.
TOT = QTY * UPRICE .
ZSD_TABL_QOTBANK-TOT = TOT .
CLEAR: QTY, UPRICE, TOT.
QTY = ZSD_TABL_QOTBANK-CGL_QTY.
UPRICE = ZSD_TABL_QOTBANK-CGL_UPRICE .
TOT = QTY * UPRICE .
ZSD_TABL_QOTBANK-CGL_TOT = TOT .
CLEAR: QTY, UPRICE, TOT.
QTY = ZSD_TABL_QOTBANK-BHEL_QTY.
UPRICE = ZSD_TABL_QOTBANK-BHEL_UPRICE .
TOT = QTY * UPRICE .
ZSD_TABL_QOTBANK-BHEL_TOT = TOT .
CLEAR: QTY, UPRICE, TOT.
QTY = ZSD_TABL_QOTBANK-BHEL_QTY.
UPRICE = ZSD_TABL_QOTBANK-BHEL_UPRICE .
TOT = QTY * UPRICE .
ZSD_TABL_QOTBANK-BHEL_TOT = TOT .
CLEAR: QTY, UPRICE, TOT.
QTY = ZSD_TABL_QOTBANK-ALSTOM_QTY.
UPRICE = ZSD_TABL_QOTBANK-ALSTOM_UPRICE .
TOT = QTY * UPRICE .
ZSD_TABL_QOTBANK-ALSTOM_TOT = TOT .
CLEAR: QTY, UPRICE, TOT.
QTY = ZSD_TABL_QOTBANK-SIEMENS_QTY.
UPRICE = ZSD_TABL_QOTBANK-SIEMENS_UPRICE .
TOT = QTY * UPRICE .
ZSD_TABL_QOTBANK-SIEMENS_TOT = TOT .
CLEAR: QTY, UPRICE, TOT.
QTY = ZSD_TABL_QOTBANK-TELK_QTY.
UPRICE = ZSD_TABL_QOTBANK-TELK_UPRICE .
TOT = QTY * UPRICE .
ZSD_TABL_QOTBANK-TELK_TOT = TOT .
CLEAR: QTY, UPRICE, TOT.
QTY = ZSD_TABL_QOTBANK-OTH_QTY.
UPRICE = ZSD_TABL_QOTBANK-OTH_UPRICE .
TOT = QTY * UPRICE .
ZSD_TABL_QOTBANK-OTH_TOT = TOT .
CLEAR: QTY, UPRICE, TOT.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
text
MODULE USER_COMMAND_0100 INPUT.
CASE OK_CODE.
WHEN 'SAVE'.
INSERT ZSD_TABL_QOTBANK.
IF SY-SUBRC EQ 0.
MESSAGE I000(ZQOTBANK).
COMMIT WORK.
CALL SELECTION-SCREEN 1000.
ELSE.
MESSAGE E001(ZQOTBANK).
CALL SELECTION-SCREEN 1000.
ENDIF.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Module EXIT_COMMAND INPUT
text
MODULE EXIT_COMAND INPUT.
SAVE_OK_CODE = OK_CODE.
CLEAR OK_CODE.
CASE SAVE_OK_CODE.
WHEN 'CANCEL'.
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
TITLEBAR = 'Quotation Bank Entry'
TEXT_QUESTION = 'Do you want to Cancel ?'
TEXT_BUTTON_1 = 'Yes'
TEXT_BUTTON_2 = 'No'
DEFAULT_BUTTON = '2'
IMPORTING
ANSWER = ANSWER.
IF ANSWER = '1'.
LEAVE PROGRAM.
ELSE.
CALL SELECTION-SCREEN 1000.
ENDIF.
WHEN 'EXIT'.
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
TITLEBAR = 'Quotation Bank Entry'
TEXT_QUESTION = 'Do you want to Exit ?'
TEXT_BUTTON_1 = 'Yes'
TEXT_BUTTON_2 = 'No'
DEFAULT_BUTTON = '2'
IMPORTING
ANSWER = ANSWER.
IF ANSWER = '1'.
LEAVE PROGRAM.
ELSE.
CALL SELECTION-SCREEN 1000.
ENDIF.
ENDCASE.
ENDMODULE. " EXIT_COMMAND INPUT
Thnx in AdvancePut the statement
CALL SCREEN 100
in the event <b>AT SELECTION-SCREEN</b> and NOT in <b>END-OF-SELECTION</b>.
Regards,
Subramanian V. -
How to display the selection screen fields for selected checkboxes
Hi all,
I have 7 checkboxes, for each check box we have some seletion screen fields.if i select first check box,i want to display first slection screen fields only.
and if we select more than one check box how to display the selection screen fields for selected check boxes,please help me this
Thanks
sriman.hi,
Try this code
report z_13317_sdn2.
tables : mara, marc, dd03l.
parameters : p_chk1 as checkbox user-command ABC,
p_chk2 as checkbox user-command PQR,
p_chk3 as checkbox user-command XYZ.
select-options : s_matnr for mara-matnr modif id A,
s_ersda for mara-ersda modif id A,
s_werks for marc-werks modif id B,
s_lvorm for marc-lvorm modif id B,
s_tab for dd03l-tabname modif id C.
data: v_chk1,
v_chk2,
v_chk3.
at selection-screen output.
loop at screen.
if screen-group1 = 'A' or
screen-group1 = 'B' or
screen-group1 = 'C'.
screen-input = 0.
modify screen.
endif.
endloop.
loop at screen.
if v_chk1 = 'X'.
if screen-group1 = 'A'.
screen-input = 1.
modify screen.
endif.
endif.
if v_chk2 = 'X'.
if screen-group1 = 'B'.
screen-input = 1.
modify screen.
endif.
endif.
if v_chk3 = 'X'.
if screen-group1 = 'C'.
screen-input = 1.
modify screen.
endif.
endif.
endloop.
at selection-screen.
if sy-ucomm = 'ABC'.
if v_chk1 = ' '.
v_chk1 = 'X'.
else.
v_chk1 = ' '.
endif.
endif.
if sy-ucomm = 'PQR'.
if v_chk2 = ' '.
v_chk2 = 'X'.
else.
v_chk2 = ' '.
endif.
endif.
if sy-ucomm = 'XYZ'.
if v_chk3 = ' '.
v_chk3 = 'X'.
else.
v_chk3 = ' '.
endif.
endif.
Regards,
Sailaja. -
Truncation of selection screen field in reports
Hi,
Is there any way to avoid truncation of selection screen fields in ABAP reports? For eg, I declare:
SELECT-OPTIONS: s_test FOR ztest-test_field NO INTERVALS
The length of this field in the table is 30 chars. However, on displaying the field via selection screen, this gets truncated to around 18 or so. How do I avoid this as I need to display the full length of the field?Hi,
Try this
Tables : makt.
select-options maknr for makt-maktx.
now go to the screen painter of your program in change mode and move the Help buttons first to the Right each. now increasethe length of the Matnr Field length so that they are equal to 40 Char. in your program you have handle the length now if you want to restrict to 18 otherwise it will be ok
if they don't fit you need incease the Size of the Screen Visible area both in the Screen Painter as well as in the
Screen Attributes
You also get an Information Message just ignore that.
Just open your program in SE80 if you can't go to the screen painter in SE38. the other way just keep this program in Display mode and execute then take F1 help , take Technical Information and double click on the Screen number now go to the Screen Layout and go to Change mode here.
Regards,
Shirisha -
Regarding Search help on selection-screen field
Hi there,
I am working on custom tables.
I have a requirement to maintain search pattern on a selection-screen field.
selection-screen parameter: p_name which is company name filed from Z table.
By giving a string like Holl* and by pressing F4 on the field p_name it has to popup a dialogbox having list of company names starting with Holl.
Thanks in advance.
-TulasiHi
Go through the link given below :
How to create a search help for my own fields in selection screen
F4 search help on report selection screen
also try :
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
RETFIELD = 'VKORG'
PVALKEY = ' '
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'P_VKORG'
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'C'
TABLES
VALUE_TAB = T_TABLE1
FIELD_TAB = field_tab
RETURN_TAB = RET_TAB
DYNPFLD_MAPPING = DYN_TAB
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
With Regards
Nikunj shah -
Selection screen field problem
Hello experts..
i have a selection screen , in that i have a field s_bwart for mseg-bwart.
some times the user will input the data in the field and sometimes he wont. we have fixed movement types combination like
11-21 , 13-24 , 13-56 , 101-543 , 101-544 etc.
if the user did not input any thing in the selection screen , i am populating s_bwart in at-selection screen event with all the mvt types. after executing the report when user presses the back button to come to the selection screen, there the s_bwart field is containing all the mvt types in single values ie in the select options screen. So the user dont want that, if he comes back nothing should be there in the selection screen field s_bwart if he has not inputted anything. if he inputs only 11 mvt type then when he comes back after executing the report he should see only 11 in the select screen field ie s_bwart. Please send the replies on how to solve the problem.hi,
in ur program try to display values for users in START-OF-SELECTION event as it triggers after the selection screen displayed for users. if user doesn't give any input then display default values in this event. and also create a variable
for ex:
data: ws_flag type c,
p_value type i.
after u display default values for users in selection screen assign the flag as ' X '
ws_flag = 'X'.
before leaving ur program based on flag try to do like this.
if ws_flag = ' X '.
clear s_data. // s_data is the select options for u.
else.
s_data = p_value. // the value which user gave in selection screen as i/p.
endif.
if helpful reward some points.
with regards,
Suresh Aluri. -
Regarding Selection-Screen Field Display
Hi All,
I have issues with Selection-Screen field display.
The Actual issue is i had declared a selection screen field as: <b>s_exgen FOR embk-exgen</b>.
<b>EMBK-EXGEN</b> is actually <b>20</b> Char length field.
But in output display it is being shown as <b>18</b> Char field though i can type in all <b>20</b> characters.
But <b>display</b> restricted to <b>18</b> Characters only.
Can anybody give me the solution for the same!
Thanks in advance.
Thanks & Regards,
Prasad.Hi,
You can decrease the visible length of the field but you can not increase more than database field length. check SAP help on this :
select-options: s_exgen FOR embk-exgen VISIBLE LENGTH 5.
... VISIBLE LENGTH vlen
Effect
This addition allows you to shorten the visible length of the corresponding screen field on the selection screen to vlen.
Variant 2
SELECT-OPTIONS sel FOR (f).
Additions as in variant 1.
Effect
In this variant, (f) must be a field containing the name of the actual reference field at runtime. The system creates the LOW and HIGH fields as character fields with length 45. However, their appearance on the selection <b>screen is inherited from the reference field whose name is contained in field f at runtime.</b>
Regards
Appana -
Hi,
I want to group the selection screen fields. where should i group.
I want to group using the modif Id
T Y P E S
TYPES:
BEGIN OF TYVBAK,
VBELN TYPE VBAK-VBELN,
AUART TYPE VBAK-AUART,
AUDAT TYPE VBAK-AUDAT,
KUNNR TYPE VBAK-KUNNR,
NETWR TYPE VBAK-NETWR,
END OF TYVBAK.
D A T A D E C L A R A T I O N S
DATA:
STVBAK TYPE TYVBAK,
ITVBAK TYPE TABLE OF TYVBAK.
S E L E C T I O N S C R E E N
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS:
SKUNNR FOR STVBAK-KUNNR.
SELECTION-SCREEN END OF BLOCK B1.
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
SELECT-OPTIONS:
SVBELN FOR STVBAK-VBELN,
SAUDAT FOR STVBAK-AUDAT.
SELECTION-SCREEN END OF BLOCK B2.
I N I T I A L I Z A T I O N
*INITIALIZATION.
FILLING SELECT OPTIONS WITH DEFAULTS
SKUNNR-SIGN = 'I'.
SKUNNR-OPTION = 'BT'.
SKUNNR-LOW = '1'.
SKUNNR-HIGH = '4000000'.
APPEND SKUNNR.
T O P O F P A G E
TOP-OF-PAGE.
WRITE:/1'SALES DOC',12 'DOC TYPE',20 'SALES DATE',32 'NETWORTH',60 'CUSTOMER'.
*A T S E L E C T I O N S C R E E N O U T P U T .
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-NAME = 'SVBELN-LOW'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
IF SCREEN-NAME = 'SVBELN-HIGH'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
where should i group SBVELN and SAUDATHi
Instead of SCREEN-NAME use SCREEN-GROUP1 and for your select options give MODIF ID.
As follows
SELECTION-OPTIONS: selcrt for dobj MODIF ID MOD1.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
CHECK SCREEN-GROUP1 = 'MOD1.
SCREEN-REQUIRED = 1.
MODIFY SCREEN.
ENDLOOP.
This is COZ when you use select-options you get TWO fileds on the INPUT screen LOW and HIGH so you have to check for selcrit-low and selctri-high you can avoid all this my assigning a MODIF ID.
See this sample programs for this
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS: pa_file TYPE rlgrap-filename MODIF ID abc,
pa_lifnr TYPE lfa1-lifnr MODIF ID abc,
pa_vkorg TYPE vbak-vkorg MODIF ID abc.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
PARAMETERS: pa_kunnr TYPE vbak-kunnr MODIF ID def.
SELECT-OPTIONS: s_lifnr FOR gs_lfa1-lifnr MODIF ID def,
s_date FOR gs_lfa1-erdat MODIF ID def,
s_augru FOR gs_vbak-augru MODIF ID def,
s_vbeln FOR gs_vbak-vbeln MODIF ID def.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: pa_upd RADIOBUTTON GROUP g1 USER-COMMAND uc01 DEFAULT 'X'."#EC *
SELECTION-SCREEN COMMENT 3(60) text-004 FOR FIELD pa_upd.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: pa_rep RADIOBUTTON GROUP g1 ."#EC *
SELECTION-SCREEN COMMENT 3(60) text-005 FOR FIELD pa_rep.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK b3.
IF pa_rep EQ gc_x.
LOOP AT SCREEN.
IF screen-group1 = gc_abc.
screen-input = gc_zero_num.
ELSEIF screen-group1 = gc_def.
screen-active = gc_one_num.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ELSEIF pa_upd EQ gc_x.
*For Reprocessing
LOOP AT SCREEN.
IF screen-group1 = gc_def.
screen-input = gc_zero_num.
ELSEIF screen-group1 = gc_abc.
screen-active = gc_one_num.
ENDIF.
MODIFY SCREEN.
CLEAR pa_upd.
ENDLOOP.
ENDIF.
REPORT zrich_001.
PARAMETERS: p_rad1 RADIOBUTTON GROUP grp1 DEFAULT 'X'
user-command chk,
p_rad2 RADIOBUTTON GROUP grp1.
SELECT-OPTIONS: s_datum1 FOR sy-datum MODIF ID d1,
s_datum2 FOR sy-datum MODIF ID d2.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF p_rad1 = 'X'
AND screen-group1 = 'D2'.
screen-active = '0'.
ENDIF.
IF p_rad2 = 'X'
AND screen-group1 = 'D1'.
screen-active = '0'.
ENDIF.
MODIFY SCREEN.
ENDLOOP
Maybe you are looking for
-
How to combine 17" iMac G4 flat panel display & iBook G4
I have a 17" flat panel G4 800 iMac. Monitor works fine. The logic board is toast. I have a 14" G4 1.33 iBook that works perfectly but the screen is broken. I want to attach the 17" flat panel to the VGA adapter on the iBook so I can see the desktop.
-
How to add datafile from previous installation to a new one
Hello, I have a new installation Oracle 11g 11.1.0.6 (64b), in addition to that i have a copy (all files - 'cold backup') of my previous installation Oracle 11g 11.1.0.6 (32b). I don't have any backup from expdp or rman. How can I import data from th
-
What can I do about screen flickering?
I have a problem on my screen. She has trembled when I use the scroll. Is it problem on the screen, or some setting?
-
Get Material Descrition of Production Order
Hi, Could you tell me how to get material description of production order, I cannot found the field in table of AFKO and AFPO. Thanks.
-
I am all wacked out....ok, I have a DW CS3 template laid out with CSS. I have a banner background, a repeating outer wrapper background and a footer background. I have a space in the banner area where I want to put a random banner either via javascri