Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

POH & POV Help Needed!

Former Member
0 Likes
1,521

Hi!

I want to do value & help request for field in <b>module pool programing </b>

eg:

SCREEN:

PLANT __________

STORAGE LOCATION __________

In Plant Field user presses F4 he should get the list of plants from MARC

AND

IN Storage Location user Presses F4 he should get list of storage location for the given plant from MARD

For that how to do coding part

IN FLOW LOGIC

i ve onley PAI & PBO

i want POV & POH

in flow logic which event i ve to use (or) i ve to include POV & POH what has to be done in Flowlogic part & Module pool Part.

and if possible pls tell how to do the same part in report selection screen.

I need ur help, thanks in advance

Rahul

1 ACCEPTED SOLUTION
Read only

former_member150733
Contributor
0 Likes
1,232

You can create a z search help for the plant and another z search help for the storage location & add it to the corresponding screen element in the module pool screen.

Its recommended to use search helps rather than POV.

FOr reports, you can attache the search help to a selection-screen parameter using the MATCHCODE OBJECT statement

example.

select-options : s_lifnr for EKKO-LIFNR MEMORY ID LIF

MATCHCODE OBJECT KRED. "Vendor

8 REPLIES 8
Read only

Former Member
0 Likes
1,232

Hi

For F4 Values on Screen:

PROCESS ON VALUE_REQUEST

using module call starting with FIELD i.e FIELD field MODULE module

There are number of function modules that can be used for the purpose, but these

can fullfill the task easily or combination of them.

DYNP_VALUE_READ

F4IF_FIELD_VALUE_REQUEST

F4IF_INT_TABLE_VALUE_REQUEST

POPUP_WITH_TABLE_DISPLAY

DYNP_VALUE_READ

This function module is used to read values in the screen fields. Use of this

FM causes forced transfer of data from screen fields to ABAP fields.

There are 3 exporting parameters

DYNAME = program name = SY-CPROG

DYNUMB = Screen number = SY-DYNNR

TRANSLATE_TO_UPPER = 'X'

and one importing TABLE parameter

DYNPFIELDS = Table of TYPE DYNPREAD

The DYNPFIELDS parameter is used to pass internal table of type DYNPREAD

to this FM and the values read from the screen will be stored in this table.This

table consists of two fields:

FIELDNAME : Used to pass the name of screen field for which the value is to

be read.

FIELDVALUE : Used to read the value of the field in the screen.

e.g.

DATA: SCREEN_VALUES TYPE TABLE OF DYNPREAD ,

SCREEN_VALUE LIKE LINE OF SCREEN_VALUES.

SCREEN_VALUE-FIELDNAME = 'KUNNR' . * Field to be read

APPEND SCREEN_VALUE TO SCREEN_VALUES. * Fill the table

CALL FUNCTION 'DYNP_VALUES_READ'

EXPORTING

DYNAME = SY-CPROG

DYNUMB = SY-DYNNR

TRANSLATE_TO_UPPER = 'X'

TABLES

DYNPFIELDS = SCREEN_VALUES.

READ TABLE SCREEN_VALUES INDEX 1 INTO SCREEN_VALUE.Now the screen value for field KUNNR is in the SCREEN_VALUE-FIELDVALUE and can be used for further processing like using it to fill the internal table to be used as parameter in F4IF_INT_TABLE_VALUE_REQUEST ETC.

F4IF_FIELD_VALUE_REQUEST

This FM is used to display value help or input from ABAP dictionary.We have to pass the name of the structure or table(TABNAME) along with the field name(FIELDNAME) . The selection can be returned to the specified screen field if three

parameters DYNPNR,DYNPPROG,DYNPROFIELD are also specified or to a table if RETRN_TAB is specified.

CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'

EXPORTING

TABNAME = table/structure

FIELDNAME = 'field name'

DYNPPROG = SY-CPROG

DYNPNR = SY-DYNR

DYNPROFIELD = 'screen field'

IMPORTING

RETURN_TAB = table of type DYNPREAD

.

F4IF_INT_TABLE_VALUE_REQUEST

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.

POPUP_WITH_TABLE_DISPLAY

This FM is used to display the contents of an internal table in a popup window.The user can select a row and the index of that is returned in the CHOISE

parameter.The VALUETAB is used to pass the internal table.

A suitable title can be set using TITLETEXT parameter. The starting and end position of the popup can be specified by the parameters STARTPOS_COL / ROW and ENDPOS_ROW / COL .

CALL FUNCTION 'POPUP_WITH_TABLE_DISPLAY'

EXPORTING

ENDPOS_COL =

ENDPOS_ROW =

STARTPOS_COL =

STARTPOS_ROW =

TITLETEXT = 'title text'

IMPORTING

CHOISE =

TABLES

VALUETAB =

EXCEPTIONS

BREAK_OFF = 1

OTHERS = 2.

e.g.

DATA: w_choice TYPE SY-TABIX.

DATA: BEGIN OF i_values OCCURS 0 WITH HEADER LINE,

values TYPE I,

END OF i_values.

PARAMETRS : id TYPE I.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR id

i_values-values = '0001'.

APPEND i_values.

i_values-values = '0002'.

APPEND i_values.

i_values-values = '0003'.

APPEND i_values.

i_values-values = '0004'.

APPEND i_values.

CALL FUNCTION 'POPUP_WITH_TABLE_DISPLAY'

EXPORTING

ENDPOS_COL = 40

ENDPOS_ROW = 12

STARTPOS_COL = 20

STARTPOS_ROW = 5

TITLETEXT = 'Select an ID'

IMPORTING

CHOISE = w_choice

TABLES

VALUETAB = i_values

EXCEPTIONS

BREAK_OFF = 1

OTHERS = 2.

CHECK w_choice > 0.

READ TABLE i_values INDEX w_choice....now we can process the selection as it is contained

...in the structure i_values.

Other FM that may be used to provide input help is HELP_START .

Reward points for useful Answers

Regards

Anji

Read only

0 Likes
1,232

Hi Anji!

U ve already given this info but i ve an exact doubt for POV can i call a module such that when user presses F4 for that field.

and apart from using search helps can i know which event i ve to use for POV request is it PAI or what.

Thanks

Rahul.

Read only

0 Likes
1,232

Hi Rahul,

There are 4 Events in the Module pool program.

1.PAI

2.PBO.

3.POV

4.POH

PAI and PBO are known to everyone but the last two are also the events of module pool program.

Read only

former_member150733
Contributor
0 Likes
1,233

You can create a z search help for the plant and another z search help for the storage location & add it to the corresponding screen element in the module pool screen.

Its recommended to use search helps rather than POV.

FOr reports, you can attache the search help to a selection-screen parameter using the MATCHCODE OBJECT statement

example.

select-options : s_lifnr for EKKO-LIFNR MEMORY ID LIF

MATCHCODE OBJECT KRED. "Vendor

Read only

Former Member
0 Likes
1,232

Hi Rahul ..

For PROCESS ON VALUE REQUEST(POV) --> Look at the Demo Programs <b>DEMO_DYNPRO_F4_HELP_MODULE</b>

<b>RUTSHEXP

demo_dynpro_f4_help_dictionary.

demo_dynpro_f4_help_module .</b>

and also look at the below SAP help link

http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbaac935c111d1829f0000e829fbfe/content.htm

for PROCESS ON HELP-REQUEST(POH) --> Look at the Demo Program <b>DEMO_DYNPRO_F1_HELP</b>

Look at the below link

http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbad0435c111d1829f0000e829fbfe/content.htm

Regards

Sudheer

Read only

Former Member
0 Likes
1,232

Check it and try to implement for your scenerio.

You have to add this in the flow logic of teh screen

PROCESS ON VALUE-REQUEST.

FIELD CARRIER MODULE VALUE_CARRIER.

FIELD CONNECTION MODULE VALUE_CONNECTION.

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.

Read only

0 Likes
1,232

Thanks Mukesh!

Can u pls tell me the same scenario in reports without using search helps.

Thanks in Advance.

Read only

0 Likes
1,232

Hi Rahul,

You will have to call the FM 'F4IF_INT_TABLE_VALUE_REQUEST'

Check the code using this FM

REPORT Z34331_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.