‎2008 Feb 07 10:21 AM
Hello people,
I start to work with screen in SAP. I create a screen ( layout, attributes, element list, flow logic) . It work for the moment .
I just want to know how to add a link on the right of my input field to help users. For exemple I have an input with date, and i need a link to calendar or a table... Or a link to a person ID. I need a bouton ( like in standard screen) not just a help with F4 !!!
thanks in advance.
‎2008 Feb 07 10:26 AM
You have to use the event "Process in Help Reguest'.
Ex:
PROCESS BEFORE OUTPUT.
MODULE INIT.
PROCESS AFTER INPUT.
MODULE CANCEL AT EXIT-COMMAND.
PROCESS ON VALUE-REQUEST.
FIELD CARRIER MODULE VALUE_CARRIER.
FIELD CONNECTION MODULE VALUE_CONNECTION.
REPORT demo_dynpro_f4_help_module .
TYPES: BEGIN OF values,
carrid TYPE spfli-carrid,
connid TYPE spfli-connid,
END OF values.
DATA: carrier(3) TYPE c,
connection(4) TYPE c.
DATA: progname TYPE sy-repid,
dynnum TYPE sy-dynnr,
dynpro_values TYPE TABLE OF dynpread,
field_value LIKE LINE OF dynpro_values,
values_tab TYPE TABLE OF values.
CALL SCREEN 100.
MODULE init OUTPUT.
progname = sy-repid.
dynnum = sy-dynnr.
CLEAR: field_value, dynpro_values.
field_value-fieldname = 'CARRIER'.
APPEND field_value TO dynpro_values.
ENDMODULE.
MODULE cancel INPUT.
LEAVE PROGRAM.
ENDMODULE.
MODULE value_carrier INPUT.
CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
EXPORTING
tabname = 'DEMOF4HELP'
fieldname = 'CARRIER1'
dynpprog = progname
dynpnr = dynnum
dynprofield = 'CARRIER'.
ENDMODULE.
MODULE value_connection INPUT.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = progname
dynumb = dynnum
translate_to_upper = 'X'
TABLES
dynpfields = dynpro_values.
READ TABLE dynpro_values INDEX 1 INTO field_value.
SELECT carrid connid
FROM spfli
INTO CORRESPONDING FIELDS OF TABLE values_tab
WHERE carrid = field_value-fieldvalue.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'CONNID'
dynpprog = progname
dynpnr = dynnum
dynprofield = 'CONNECTION'
value_org = 'S'
TABLES
value_tab = values_tab.
ENDMODULE.
‎2008 Feb 07 10:36 AM
hi,
u need to write like this into screen flow logic after PAI...
PROCESS ON HELP-REQUEST.
FIELD srno MODULE help_srn.
MODULE help_srn INPUT.
CALL SCREEN 2000 STARTING AT 10 5
ENDING AT 60 10.
ENDMODULE. " help_srn INPUT
in the screen 2000 u can take one text box providing info about that field...
u need to take this screen modal dialog box in attributes ---> screen type
reward if usefull...
‎2008 Feb 07 11:18 AM
Hi,
Try like this,
First add a push button right side of your text box. and add icon on that push button. ( push button attributes->icon name).
and give function code (push)
Now in PAI event,
when 'push'.
u can do whatever u want such as call other screen or call list, to provide required details.
REWARD POINTS IF HELPFUL,
regards.
s.senthil
‎2008 Feb 07 11:29 AM
‎2008 Feb 07 11:27 AM
Maybe i dont explain good my self : I dont want help when The user push F4 ( I have it arleady) but i need just a ""bouton" on the right of the input box which link to a table. ( like in standard screen) . It is more is for end users...
By the way , how to put a defaut value ?
Thanks
‎2008 Feb 07 3:23 PM
I do it my self !! In layout just select the bos and put 1 in the program - poss entries key fild