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

how can i create f4 functionality

Former Member
0 Likes
934

Hi frds,

My requirement is diff plant create diff report no , but all the plant are see all the report no.

I want to prevent for every one plant that is one plant created report no not see other plant.

Is it possible ,Pls suggest me.

Thanks in advance.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
901

hello Yumkumar,

if you are using report in at selection-screen event use FM 'F4IF_INT_TABLE_VALUE_REQUEST'.

or if you using module pool program in POV use the above given function module..

if you want to know how this function module should be used check using "Where used-list "

7 REPLIES 7
Read only

Former Member
0 Likes
901

HI ,

r u using the Module Pool Program?

If so u can add functionality in the POV of the field.

Other wise use the below function module.

DATA: BEGIN OF lt_table OCCURS 0,

dappl TYPE dappl,

cvtext TYPE cvtext,

END OF lt_table,

lt_return LIKE ddshretval OCCURS 0 WITH HEADER LINE.

SELECT dappl cvtext FROM tdwp INTO TABLE lt_table.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'DAPPL'

  • DYNPPROG = 'SAPLIQS0'

  • DYNPNR = '7200'

  • DYNPROFIELD = ' '

  • STEPL = 0

  • WINDOW_TITLE =

  • VALUE = ' '

value_org = 'S'

  • MULTIPLE_CHOICE = ' '

  • DISPLAY = ' '

  • CALLBACK_PROGRAM = ' '

  • CALLBACK_FORM = ' '

  • MARK_TAB =

  • IMPORTING

  • USER_RESET =

TABLES

value_tab = lt_table

  • FIELD_TAB =

return_tab = lt_return

  • 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.

READ TABLE lt_return INDEX 1.

MOVE lt_return-fieldval TO p_dappl.

With Regards,

Sumodh.P

Edited by: Sumodh P on Apr 21, 2010 8:06 AM

Read only

Former Member
0 Likes
902

hello Yumkumar,

if you are using report in at selection-screen event use FM 'F4IF_INT_TABLE_VALUE_REQUEST'.

or if you using module pool program in POV use the above given function module..

if you want to know how this function module should be used check using "Where used-list "

Read only

0 Likes
901

Thank u for replys,

I m use selection screen input for ALV.

Thanks in advance

Read only

0 Likes
901

Hi,

As said above use FM 'F4IF_INT_TABLE_VALUE_REQUEST' at selection-screen event .

Regards

Read only

0 Likes
901

hello,

then u should call this FM below the " AT selection-screen " event

check below given example

data : L_RETFIELD LIKE DFIES-FIELDNAME.

DATA: BEGIN OF LT_VALUE OCCURS 0,

ZVBELNP LIKE ZVPLH-ZVBELNP,

BUDAT LIKE ZVPLH-BUDAT,

LIFNR LIKE ZVPLH-LIFNR,

SKOSTL LIKE ZVPLP-SKOSTL,

KSTAR LIKE ZVPLP-KSTAR,

ZVLTWGNRX LIKE ZVPLP-ZVLTWGNRX,

WAERS LIKE ZVPLH-WAERS,

ISTKOSTEN LIKE ZVPLP-ISTKOSTEN,

END OF LT_VALUE.

at selection-screen

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

  • DDIC_STRUCTURE = ' '

RETFIELD = L_RETFIELD

WINDOW_TITLE = L_TITLE

  • VALUE = ' '

VALUE_ORG = 'S'

  • MULTIPLE_CHOICE = ' '

DISPLAY = 'X'

TABLES

VALUE_TAB = LT_VALUE.

try this..

Read only

0 Likes
901

Thank ur's replay

Read only

Former Member
0 Likes
901

Hi Kumar,

You must be maintaining an internal table or Database table with the plant / report-number mapping.

If yes, then you can simply create a new internal table at runtime to display the specific report numbers for a plant. Here's a quick pseudo-code:


* Assume plant and report number are stored in table it_plant_rep, with fields PLANT and REPNO.
* Also, let's say the selection screen field for plant and report number are PA_PLANT and PA_REPNO respectively
AT SELECTION-SCREEN ON VALUE REUQEST FOR PA_REPNO.

if not pa_plant is initial.
loop at it_plant_rep into wa_plant_rep where plant = pa_plant.

wa_f4table-plant = wa_plant_rep-plant.
wa_f4table-repno = wa_plant_rep-repno.
append wa_f4table to it_f4table.

endloop.

* Here, IT_F4TABLE will contain plant-specific report numbers.
* Now pass this to the 'F4IF_INT_TABLE_VALUE_REQUEST' Function Module

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
  WINDOW_TITLE = lv_title
  VALUE_ORG = 'S'
TABLES
  VALUE_TAB = it_f4table
  RETURN_TAB = lt_return.

* The first line of lt_return will contain the value selected by the user

Hope this helps! Do let me know if you need anything else!!

Cheers,

Shailesh.