‎2007 Jun 06 10:23 AM
Hi all,
Can any one help in how to provide help for a parameter in program.
Ex
PARAMETERS: P1(3) TYPE C.
I want to provide F4 help for this,
can any one have sample program of this.
help me out.
Thanks
Amar
‎2007 Jun 06 10:33 AM
for that screen after pbo and pai write this pov
PROCESS ON VALUE-REQUEST.
FIELD p1 MODULE VALUE_p1.
this code in ur report
MODULE VALUE_p1 INPUT.
SELECT Receiver logsys descr
FROM ZGI_LISYS
INTO CORRESPONDING FIELDS OF TABLE VALUES_TAB.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'RECEIVER'
DYNPPROG = PROGNAME
DYNPNR = DYNNUM
DYNPROFIELD = 'S_SAPSYS'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = VALUES_TAB.
ENDMODULE. " VALUE_field INPUT
variable declaration.
TYPES: BEGIN OF VALUES, " write here what values it has to display when u press f4.
Receiver type ZGI_LISYS-RECEIVER, "Receiver system
logsys type zgi_lisys-LOGSYS, "logical system
descr type Zgi_lisys-descr, "description
END OF VALUES.
DATA: PROGNAME LIKE SY-REPID, "program name
DYNNUM LIKE SY-DYNNR, "screen number
DYNPRO_VALUES TYPE TABLE OF DYNPREAD,
FIELD_VALUE LIKE LINE OF DYNPRO_VALUES,
VALUES_TAB TYPE TABLE OF VALUES.
check this if useful
‎2007 Jun 06 10:25 AM
Hi
If u refer Data Dictionary object in ur parameters, Then only u will get a list of possible values. Or else its not possible to get list of possible values.
Regards
Ravi
‎2007 Jun 06 10:27 AM
hi amar
just try this,
selection-screen begin of block b1 with frame title text-001.
*PARAMETERS: file TYPE ibipparms-path OBLIGATORY.
parameters: file type rlgrap-filename obligatory.
selection-screen end of block b1.
*at selection screen event..
at selection-screen on value-request for file.
call function 'F4_FILENAME'
importing
file_name = file.
path = file.
reward points if helpful.
regards,
seshu.
‎2007 Jun 06 10:29 AM
try FM F4_IF_INT_TABLE_VALUE_REQUEST
IN THIS FUNCTION MODULE PASS THE VALUES THAT YOU WANT TO DISPLAY IN THE ITAB PROVIDED.
‎2007 Jun 06 10:33 AM
for that screen after pbo and pai write this pov
PROCESS ON VALUE-REQUEST.
FIELD p1 MODULE VALUE_p1.
this code in ur report
MODULE VALUE_p1 INPUT.
SELECT Receiver logsys descr
FROM ZGI_LISYS
INTO CORRESPONDING FIELDS OF TABLE VALUES_TAB.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'RECEIVER'
DYNPPROG = PROGNAME
DYNPNR = DYNNUM
DYNPROFIELD = 'S_SAPSYS'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = VALUES_TAB.
ENDMODULE. " VALUE_field INPUT
variable declaration.
TYPES: BEGIN OF VALUES, " write here what values it has to display when u press f4.
Receiver type ZGI_LISYS-RECEIVER, "Receiver system
logsys type zgi_lisys-LOGSYS, "logical system
descr type Zgi_lisys-descr, "description
END OF VALUES.
DATA: PROGNAME LIKE SY-REPID, "program name
DYNNUM LIKE SY-DYNNR, "screen number
DYNPRO_VALUES TYPE TABLE OF DYNPREAD,
FIELD_VALUE LIKE LINE OF DYNPRO_VALUES,
VALUES_TAB TYPE TABLE OF VALUES.
check this if useful
‎2007 Jun 06 10:35 AM
if u wnat that in report
use like this
at selection-screen p1.
SELECT Receiver logsys descr
FROM ZGI_LISYS
INTO CORRESPONDING FIELDS OF TABLE VALUES_TAB.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'RECEIVER'
DYNPPROG = PROGNAME
DYNPNR = DYNNUM
DYNPROFIELD = 'S_SAPSYS'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = VALUES_TAB.
variable declaration.
TYPES: BEGIN OF VALUES, " write here what values it has to display when u press f4.
Receiver type ZGI_LISYS-RECEIVER, "Receiver system
logsys type zgi_lisys-LOGSYS, "logical system
descr type Zgi_lisys-descr, "description
END OF VALUES.
DATA: PROGNAME LIKE SY-REPID, "program name
DYNNUM LIKE SY-DYNNR, "screen number
DYNPRO_VALUES TYPE TABLE OF DYNPREAD,
FIELD_VALUE LIKE LINE OF DYNPRO_VALUES,
VALUES_TAB TYPE TABLE OF VALUES.
check this if useful
‎2007 Jun 06 10:35 AM
chk the program DEMO_SELECTION_SCREEN_F4
this is one way of giving F4 help
‎2007 Jun 07 5:46 AM
Hi Chandrasekhar Jagarlamudi
I have used this program in my report with my values and its showing all values in the screen when i press F4, But after when execute it remains on same screen also its not going to debug mode.
I want when i select some data from the F4 help screen and execute it it should fetech data accorging to that.
I am using this parameter in select statement.
Please help me out if u find any solution.
Thanks n regards
Amar
‎2007 Jun 07 5:50 AM
‎2007 Jun 07 6:08 AM
Hi Atish,
Here is my code
TABLES : MARD.
PARAMETERS: PLANT(4) TYPE C. " MARD-WERKS.
*INCLUDE ZF4HELP.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR PLANT.
CALL SCREEN 100 STARTING AT 10 5
ENDING AT 70 10.
----
MODULE value_list OUTPUT
----
*
----
MODULE VALUE_LIST OUTPUT.
SUPPRESS DIALOG.
LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0.
SET PF-STATUS SPACE.
NEW-PAGE NO-TITLE.
WRITE 'Valid Plants' COLOR COL_HEADING.
ULINE.
PLANT = 'MHI'.
WRITE: / PLANT COLOR COL_KEY, 'Text message will be added'.
HIDE PLANT.
PLANT = 'SCME'.
WRITE: / PLANT COLOR COL_KEY, 'Text message will be added'.
HIDE PLANT.
PLANT = 'SCMD'.
WRITE: / PLANT COLOR COL_KEY, 'Text message will be added'.
HIDE PLANT.
PLANT = 'ASPA'.
WRITE: / PLANT COLOR COL_KEY, 'ASP Automation Limited'.
HIDE PLANT.
PLANT = 'ASPS '.
WRITE: / PLANT COLOR COL_KEY, 'ASP Software Limited'.
HIDE PLANT.
CLEAR PLANT.
ENDMODULE. "value_list OUTPUT
AT LINE-SELECTION.
CHECK NOT PLANT IS INITIAL.
LEAVE TO SCREEN 0.
DATA: BEGIN OF ITAB OCCURS 0,
MATNR LIKE MARD-MATNR,
WERKS LIKE MARD-WERKS,
LGORT LIKE MARD-LGORT,
LABST LIKE MARD-LABST,
SPEME LIKE MARD-SPEME,
INSME LIKE MARD-INSME,
END OF ITAB.
SELECT MATNR
WERKS
LGORT
LABST
SPEME
INSME FROM MARD INTO TABLE ITAB WHERE WERKS = PLANT.
LOOP AT ITAB.
WRITE: / ITAB-WERKS, ITAB-LGORT, ITAB-LABST, ITAB-SPEME.
ENDLOOP.
Reply Me ifyou found any solution
Thanks
Amar
‎2007 Jun 06 10:39 AM
Hi,
Please use below Fm
CALL FUNCTION 'RHP0_POPUP_F4_SEARK'
EXPORTING
f4 = 'X'
plvar = '01'
otype = 'O'
begda = '19000101'
endda = '99991231'
multi_select = 'X'
easy = 'X'
CHANGING
objid = p1
EXCEPTIONS
cancelled = 1
object_not_valid = 2
error = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
regards,
Ruchika
reward if useful..........
‎2007 Jun 07 5:50 AM
HI Amar ,
For any field with a DDIC reference you can provide F4 help like :
Parameter : MAT_NO like MARA-MATNR , it will give the F4 help automatically .
And for syntax like PARAMETERS: P1(3) TYPE C, for providing F4 help to variable P , you need to providea secrah help Using MATCH CODE addition of the parameter statement .
Reward if helpful !
Regards,
Ranjita
‎2007 Jun 07 6:00 AM
Hi Ranjita Kar
PARAMETERS: P1(4) TYPE C MATCHCODE OBJECT PLANT_HELP.
Tel me like this i have to provide search help. or there is any othe way.
I want three values for this parameter say ABCD, WXYZ, EFGH when i press F4.
So i have to create search help in DDIC with hardcoding these values or any other method.
Reply me,
Thanks
Amar
‎2007 Jun 07 5:51 AM
‎2007 Jun 12 6:31 AM
SET PF-STATUS 'xxxxxxxx'.
SET TITLEBAR 'xxx'.
<b>IF kz_prozessiert IS INITIAL.
kz_prozessiert = 'X'.
ELSE.
CLEAR kz_prozessiert.
SET SCREEN 0.
LEAVE SCREEN.
ENDIF.</b>
DATA: kz_prozessiert.
SET SCREEN 0.
LEAVE TO LIST-PROCESSING.
SET CURSOR FIELD 'INT_UOM-MEINH'.
SET PF-STATUS SPACE.
SET TITLEBAR '300'.
SUPPRESS DIALOG.
SELECT MEINH
FROM MEAN
INTO CORRESPONDING FIELDS OF TABLE INT_UOM
WHERE MATNR = wf_matnr_a.
DELETE ADJACENT DUPLICATES FROM INT_UOM[].
CLEAR INT_UOM.
skip 1.
LOOP AT INT_UOM[] INTO INT_UOM.
WRITE: / sy-tabix , INT_UOM .
HIDE INT_UOM.
ENDLOOP.
skip.
WRITE: / 'UOMs of Article ',wf_matnr_a.
SKIP .
Write :/'** (F2) Pick & (F12) Exit-Help **'.
ENDMODULE.
" STATUS_0320 OUTPUT
AT LINE-SELECTION.
READ TABLE INT_UOM WITH KEY MEINH = w_uom.
MOVE INT_UOM TO wf_uom.
CALL FUNCTION 'Z_DETERMINE_SALES_PRICE'
EXPORTING
ZWERKS = G_WERKS
MATNR = MATNR_OUT
"EAN11 = wf_ean11
MEINH = WF_UOM
IMPORTING
KBETR = WF_SPRIZE .
(This is working for me , check it out .) I have a another modification here , and my
qn is can we use a paramter (for selection) in interactive list---LEAVE TO LIST PROCESSING . Its giving error - paramter not supported in modulepool-type 1 prgms. thanks