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 in reports

Former Member
0 Likes
1,017

I need to provide F4 for Selection Screen parameter(workcenter, CRHD-ARBPL). In f4 popup window Wrokcenter and description should be appeared. when user selects required workcenter its corresponding resource indicator(CRHD-ARBID) should be appeared in Selection Screen parameter.

can anybody suggest how to define logic for this.

Regards,

Naseer.

I need to provide F4 for Selection Screen parameter(workcenter, CRHD-ARBPL). In f4 popup window Wrokcenter and description should be appeared. when user selects required workcenter its corresponding resource indicator(CRHD-ARBID) should be appeared in Selection Screen parameter.

can anybody suggest how to define logic for this.

Regards,

Naseer.

6 REPLIES 6
Read only

former_member386202
Active Contributor
0 Likes
967

Hi,

Use FM F4IF_INT_TABLE_VALUE_REQUEST within

at selection-screen on value request of field

Regards,

Prashant

Read only

Former Member
0 Likes
967

Check the following code to get the F4 help in select options for G/L Account

<b>AT SELECTION-SCREEN ON VALUE-REQUEST</b> FOR HKONT-LOW.

SELECT KSTAR KTEXT INTO TABLE IT_HKONT FROM CSKU WHERE SPRAS EQ 'EN'.

SORT IT_HKONT BY KSTAR.

CALL FUNCTION <b>'F4IF_INT_TABLE_VALUE_REQUEST'</b>

EXPORTING

RETFIELD = 'HKONT'

VALUE_ORG = 'S'

TABLES

VALUE_TAB = IT_HKONT

RETURN_TAB = IT_RETURN.

IF SY-SUBRC = 0.

READ TABLE IT_RETURN INDEX 1.

MOVE IT_RETURN-FIELDVAL TO HKONT-LOW.

ENDIF.

Reward points if useful.

Read only

Former Member
0 Likes
967

u can do that

try this.

suppose <b>field</b> is ur parameter.

then do this.

at selection-screen on value-request for <b>field</b>.

CALL FUNCTION 'POPUP_WITH_TABLE'

EXPORTING

endpos_col = 60

endpos_row = sy-srows

startpos_col = 1

startpos_row = 1

titletext = 'field'

IMPORTING

CHOICE = field

tables

valuetab = itab "internal table containing values for popup

  • EXCEPTIONS

  • BREAK_OFF = 1

  • OTHERS = 2

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

return.

ENDIF.

before calling this func module u can fill ur internal table with data using select querry.

Read only

Former Member
0 Likes
967

chk this.

data : it_agtab type zagtab occurs 0 with header line.

data : it_agtab1 type DDSHRETVAL occurs 0 with header line.

<b>at selection-screen on value-request for month.</b>

*select data thta needs to be passed to field

select * from zagtab into table it_agtab.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

  • DDIC_STRUCTURE = ' '

retfield = 'RO'

  • PVALKEY = ' '

DYNPPROG = sy-cprog

DYNPNR = sy-dynnr

DYNPROFIELD = 'MONTH'

  • STEPL = 0

  • WINDOW_TITLE =

  • VALUE = ' '

VALUE_ORG = 'S'

  • MULTIPLE_CHOICE = ' '

  • DISPLAY = ' '

  • CALLBACK_PROGRAM = ' '

  • CALLBACK_FORM = ' '

  • MARK_TAB =

  • IMPORTING

  • USER_RESET =

tables

value_tab = it_agtab

  • FIELD_TAB =

RETURN_TAB = it_agtab1

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

start-of-selection.

plz reward point if helps.

regard,

rahul

Read only

Former Member
0 Likes
967

HI

like this example

TYPES : BEGIN OF ST_OBJID_SH,
         OTYPE TYPE HRP1000-OTYPE,
         OBJID TYPE HRP1000-OBJID,
        END OF ST_OBJID_SH.

DATA : IT_OBJID_SH TYPE STANDARD TABLE OF ST_OBJID_SH.
DATA : WA_OBJID_SH TYPE ST_OBJID_SH.


************SELECTION SCREEN DESIGN************************

SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.

*SELECT-OPTIONS : S_OTYPE FOR HRP1001-OTYPE NO INTERVALS .
SELECT-OPTIONS : S_OBJID FOR HRP1001-OBJID NO INTERVALS .
SELECT-OPTIONS : DATE FOR SY-DATUM NO-EXTENSION OBLIGATORY.

SELECTION-SCREEN END OF BLOCK B1.

***********END OF SELECTION SCREEN DESIGN******************

AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_OBJID-LOW.

*  IF S_OBJID IS NOT INITIAL.

    SELECT OTYPE OBJID FROM HRP1000
                 INTO TABLE IT_OBJID_SH
                 WHERE OTYPE = 'D'.

 IF SY-SUBRC EQ 0.

* SEARCH HELP FOR QUALIFICATION.

    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
      EXPORTING
*              DDIC_STRUCTURE         = ' '
        RETFIELD               =  'OBJID'
*              PVALKEY                = ' '
       DYNPPROG               = SY-REPID
       DYNPNR                 = SY-DYNNR
       DYNPROFIELD            = 'S_OBJID'
*              STEPL                  = 0
*              WINDOW_TITLE           =
*              VALUE                  = ' '
       VALUE_ORG              = 'S'
*              MULTIPLE_CHOICE        = ' '
*              DISPLAY                = ' '
*              CALLBACK_PROGRAM       = ' '
*              CALLBACK_FORM          = ' '
*              MARK_TAB               =
*            IMPORTING
*              USER_RESET             =
      TABLES
        VALUE_TAB              =  IT_OBJID_SH
*              FIELD_TAB              =
*              RETURN_TAB             = RETURN_TAB
*              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.
  ENDIF.

              .

<b>Reward uif usefull</b>

Read only

Former Member
0 Likes
967

TYPES: BEGIN OF TY_MBLNR,

MBLNR LIKE MKPF-MBLNR,

END OF TY_MBLNR.

data: it_ret like ddshretval occurs 0 with header line.

DATA: IT_MBLNR TYPE STANDARD TABLE OF TY_MBLNR WITH HEADER LINE.

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

Select MBLNR from mkpf into table it_mblnr.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

  • DDIC_STRUCTURE = ' '

RETFIELD = 'MBLNR'

  • PVALKEY = ' '

  • DYNPPROG = ' '

  • DYNPNR = ' '

  • DYNPROFIELD = ' '

  • STEPL = 0

  • WINDOW_TITLE =

  • VALUE = ' '

VALUE_ORG = 'S'

  • MULTIPLE_CHOICE = ' '

  • DISPLAY = ' '

  • CALLBACK_PROGRAM = ' '

  • CALLBACK_FORM = ' '

  • MARK_TAB =

  • IMPORTING

  • USER_RESET =

TABLES

VALUE_TAB = IT_MBLNR

  • FIELD_TAB =

RETURN_TAB = IT_RET

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

IF SY-SUBRC = 0.

read table it_ret index 1.

move it_ret-fieldval to S_mat-low.

ENDIF.

At selection-screen on value-request for s_mat-high.

Select MBLNR from mkpf into table it_mblnr.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

  • DDIC_STRUCTURE = ' '

RETFIELD = 'MBLNR'

  • PVALKEY = ' '

  • DYNPPROG = ' '

  • DYNPNR = ' '

  • DYNPROFIELD = ' '

  • STEPL = 0

  • WINDOW_TITLE =

  • VALUE = ' '

VALUE_ORG = 'S'

  • MULTIPLE_CHOICE = ' '

  • DISPLAY = ' '

  • CALLBACK_PROGRAM = ' '

  • CALLBACK_FORM = ' '

  • MARK_TAB =

  • IMPORTING

  • USER_RESET =

TABLES

VALUE_TAB = IT_MBLNR

  • FIELD_TAB =

RETURN_TAB = IT_RET

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

IF SY-SUBRC = 0.

read table it_ret index 1.

move it_ret-fieldval to S_mat-high.

ENDIF.