2007 Mar 16 12:06 PM
Hi all,
I got a requirement from client to creat f4 help for select-options field.
The field is APNAM from table CATSDB(Data base table for time sheet).
It has used in CADO standard transaction.
Please tell me the solution.
Thanks,
Naveen.
2007 Mar 16 12:19 PM
APNAM is just the username , you can get it from table USR01
no need of writing special code for that , just declare like this
tables : usr01.
select-options : s_apnam for usr01-bname.
APNAM is just the username , you can get it from table USR01
no need of writing special code for that , just declare like this
tables : usr01.
select-options : s_apnam for usr01-bname.
2007 Mar 16 12:08 PM
hi
F4IF_FIELD_VALUE_REQUEST u use this function module on ur field it completes ur work
for f4 help we use this function modules
F4IF_INT_TABLE_VALUE_REQUEST Display internal table as search help (documented in SAP)
F4IF_INT_VALUE_REQUEST Display internal table as search help (documented in SAP)
Message was edited by:
sunil kumar
2007 Mar 16 12:11 PM
Hi,
Go through the test program.
REPORT Ztest_HELP .
TABLES : MARA.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS : P_MATNR(10) TYPE C.
SELECTION-SCREEN END OF BLOCK B1.
DATA : BEGIN OF ITAB OCCURS 0,
MATNR TYPE MATNR,
END OF ITAB.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_MATNR.
SELECT MATNR
FROM MARA
INTO TABLE ITAB
UP TO 10 ROWS.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'MATERIAL NUMBER'
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'P_MATNR'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = ITAB
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3.
reward if useful.
Regards,
Anji
2007 Mar 16 12:12 PM
See the following ex:
TYPES: BEGIN OF TY_MBLNR,
MBLNR LIKE MKPF-MBLNR,
END OF TY_MBLNR.
DATA: IT_MBLNR TYPE STANDARD TABLE OF TY_MBLNR WITH HEADER LINE.
data: it_ret like ddshretval occurs 0 with header line.
At selection-screen on value-request for s_mat-low.
Select MBLNR from mkpf into table it_mblnr.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
RETFIELD = 'MBLNR'
PVALKEY = ' '
DYNPPROG = ' '
DYNPNR = ' '
DYNPROFIELD = ' '
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
VALUE_TAB = IT_MBLNR
FIELD_TAB =
RETURN_TAB = IT_RET
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.
IF SY-SUBRC = 0.
read table it_ret index 1.
move it_ret-fieldval to S_mat-low.
ENDIF.
At selection-screen on value-request for s_mat-high.
Select MBLNR from mkpf into table it_mblnr.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
RETFIELD = 'MBLNR'
PVALKEY = ' '
DYNPPROG = ' '
DYNPNR = ' '
DYNPROFIELD = ' '
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
VALUE_TAB = IT_MBLNR
FIELD_TAB =
RETURN_TAB = IT_RET
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.
IF SY-SUBRC = 0.
read table it_ret index 1.
move it_ret-fieldval to S_mat-high.
ENDIF.
2007 Mar 16 12:19 PM
APNAM is just the username , you can get it from table USR01
no need of writing special code for that , just declare like this
tables : usr01.
select-options : s_apnam for usr01-bname.
2007 Mar 16 12:28 PM
Thanks for reply chandrasekar.
I have tried for usr01-bname.But it is not giving f4 help
2007 Mar 16 12:38 PM
use this
tables : usr02.
select-options : s_apnam for usr02-bname.
2007 Mar 16 12:51 PM
Thanks chandrasekar.
It is giving the f4 help.But the field apnam is 'person who approved the data'.
for my requirement the client has given some test data.when i use usr02 table i could not find some fields which the client has given.
Thanks,
Naveen.
2007 Mar 16 1:39 PM
Hi Naveen,
Please let me know where can i find that field inm transaction CADO
2007 Mar 16 1:49 PM
Hi chandrashekar
Thanks for reply.The field is not there in cado roport.
I have copied the transaction as zcado as per client requirement and added apnam field from catsdb table in the selection screen.
2007 Mar 16 12:22 PM
Hi,
do like this...This is enough
select-options : s_apnam for usr01-bname.
Regards,
nagaraj
2007 Mar 16 1:26 PM
2007 Mar 16 2:07 PM
Hi naveen,
in data dictionary (SE11), create search help: Enter Table name, field name, set import and export for the field, activate. It's easy.
Then
SELECT-OPTIONS selcrit FOR f ... MATCHCODE OBJECT <name if search help>
Regards,
Clemens
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |