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

F4 help

Former Member
0 Likes
830

Hi all...

I have created a field posting_date in some Ztable…when I use this field in some Zreport as select-option..when I press F4 it generally shows a calendar …but instead of showing the calendar I have created a search help for that field now it show only the entries in the Ztable..but as it is posting_date there are many POs which have same posting date it is showing the date of all POs even it is the same date…in clear there will be many POs with same posting_date when I press F4 help for that field in some Zreport it is showing the Ztable entries I want to make the display entries as unique..i.e,if 10 POs have same posting_date 10/4/2006 when I press F4 it shows 10/4/2006 repeatedly as 10 times..i want to make it as unique..if a different POs have same date it should display only once..

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
799

Hi vj,

1. In that case

2. we can use the FM

F4IF_INT_TABLE_VALUE_REQUEST

and our own ITAB

and our own logic

for removing the duplicate values

using SORT and DELETE ADJACENT DUPLICATES.

3. To get a taste of how to use this FM,

just copy paste.

4.

REPORT ABC.

*----


DATA : BEGIN OF ITAB OCCURS 0,

UNAME LIKE USR01-BNAME,

END OF ITAB.

data : RETURN_TAB LIKE DDSHRETVAL occurs 0 .

data : RETURN_wa LIKE DDSHRETVAL .

*----


PARAMETERS : A(12) TYPE C.

*----


AT SELECTION-SCREEN ON VALUE-REQUEST FOR A.

ITAB-UNAME = 'U01'. APPEND ITAB.

ITAB-UNAME = 'U02'. APPEND ITAB.

ITAB-UNAME = 'U03'. APPEND ITAB.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

  • DDIC_STRUCTURE = ' '

retfield = 'ITAB-UNAME'

  • PVALKEY = ' '

DYNPPROG = SY-REPID

DYNPNR = SY-DYNNR

DYNPROFIELD = 'A'

  • STEPL = 0

  • WINDOW_TITLE =

  • VALUE = ' '

VALUE_ORG = 'S'

  • MULTIPLE_CHOICE = ' '

  • DISPLAY = ' '

  • CALLBACK_PROGRAM = ' '

  • CALLBACK_FORM = ' '

  • MARK_TAB =

  • IMPORTING

  • USER_RESET =

tables

value_tab = ITAB

  • FIELD_TAB = FTAB

RETURN_TAB = return_tab

  • DYNPFLD_MAPPING =

  • EXCEPTIONS

  • PARAMETER_ERROR = 1

  • NO_VALUES_FOUND = 2

  • OTHERS = 3

.

break-point.

regards,

amit m.

8 REPLIES 8
Read only

Former Member
0 Likes
800

Hi vj,

1. In that case

2. we can use the FM

F4IF_INT_TABLE_VALUE_REQUEST

and our own ITAB

and our own logic

for removing the duplicate values

using SORT and DELETE ADJACENT DUPLICATES.

3. To get a taste of how to use this FM,

just copy paste.

4.

REPORT ABC.

*----


DATA : BEGIN OF ITAB OCCURS 0,

UNAME LIKE USR01-BNAME,

END OF ITAB.

data : RETURN_TAB LIKE DDSHRETVAL occurs 0 .

data : RETURN_wa LIKE DDSHRETVAL .

*----


PARAMETERS : A(12) TYPE C.

*----


AT SELECTION-SCREEN ON VALUE-REQUEST FOR A.

ITAB-UNAME = 'U01'. APPEND ITAB.

ITAB-UNAME = 'U02'. APPEND ITAB.

ITAB-UNAME = 'U03'. APPEND ITAB.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

  • DDIC_STRUCTURE = ' '

retfield = 'ITAB-UNAME'

  • PVALKEY = ' '

DYNPPROG = SY-REPID

DYNPNR = SY-DYNNR

DYNPROFIELD = 'A'

  • STEPL = 0

  • WINDOW_TITLE =

  • VALUE = ' '

VALUE_ORG = 'S'

  • MULTIPLE_CHOICE = ' '

  • DISPLAY = ' '

  • CALLBACK_PROGRAM = ' '

  • CALLBACK_FORM = ' '

  • MARK_TAB =

  • IMPORTING

  • USER_RESET =

tables

value_tab = ITAB

  • FIELD_TAB = FTAB

RETURN_TAB = return_tab

  • DYNPFLD_MAPPING =

  • EXCEPTIONS

  • PARAMETER_ERROR = 1

  • NO_VALUES_FOUND = 2

  • OTHERS = 3

.

break-point.

regards,

amit m.

Read only

0 Likes
799

Hi amit,

Thanks for u reply..

But the FM 'F4IF_INT_TABLE_VALUE_REQUEST'is used for user specific values such as hard coded values..but i want the data from Ztable but the date value which contain in it should not be repeated ...a unique value..if 10/4/2006 entry is present 15 times in the table it should be displayed only once when i press F4 in the Zreport

Read only

Former Member
0 Likes
799

Hi,

REFRESH and CLEAR the internal table that you use for searchhelp initially (before calling the FM for F4)..

otherwise..each time you use F4,the previous values get appended..

Regards,

Ajith

Read only

anversha_s
Active Contributor
0 Likes
799

hi,

its dynamic serach help.

so ur passing an internal table to the help.

we can domanipulation on that itab.

look this.

select order date from ztable into itab where ...(ur condiation).

sort itab by order.

loop at itab into wa.

wa-order =itab-order.

<b>at new date.</b>

wa-date = itab-date.

end at.

append itab2 from wa.

clear wa.

endloop.

pass this itab2 to the dynamic f4.

rgds

anver

Message was edited by: Anversha s

Read only

Former Member
0 Likes
799

hi

You can use the FM

At selection-screen on value request for posting_date-low.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = 'POSTING_DATE'

DYNPROFIELD = 'POSTING_DATE-LOW'

DYNPPROG = SY-CPROG

DYNPNR = SY-DYNNR

TABLES

VALUE_TAB = HELP_ITEM.

In the help_item, you can populate the PO's and the unique dates by deleting adjacent duplicates comparing PO's and date.

Regards,

Navneet

Read only

Former Member
0 Likes
799

Hi vj,

try this

data : begin of it_po occurs 0,

PO like table-PO,

end of it_po.

data : begin of it_dates occurs 0,

PO like table-dates,

end of it_dates.

Select distinct PO from ZTABLE into table it_po.

Select distinct dates from ztable

into table it_dates

for all entries in it_po

where PO = it_po-PO.

Regards,

Ajith

MArk if useful.

Read only

0 Likes
799

thank you..ajith

But we will be getting the uniques values to internal table...but how i can get to the unique values in F4 help

Read only

0 Likes
799

data : begin of it_po occurs 0,

PO like table-PO,

end of it_po.

data : begin of it_dates occurs 0,

PO like table-PO,

dates like table-dates,

end of it_dates.

Select distinct PO from ZTABLE into table it_po.

<b>Select distinct PO dates from ztable

into table it_dates

for all entries in it_po

where PO = it_po-PO.</b>

so now it_dates has PO and its dates,..

Pass this table it_dates to the F4

Regards ,

Ajith

Mark if useful