Application Development 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: 

search help using pnp?

Former Member
0 Kudos

hi

i am creating an alv report using PNP

i created a Search Help based on pa0021 i am using only 2 files PERNR and FAVOR and i want this SEARCH HELP to show only the names of the people who belong to the pernr i chosed

i am using this SEARCH HELP at a selection screen in my reprt

thanks

1 ACCEPTED SOLUTION

faisal_altaf2
Active Contributor
0 Kudos

Hi, Ami

Please Test the following Sample Report hope will solve out your problem,

REPORT zfsl_sdn_test.

TABLES: pa0021.

PARAMETERS: pernr LIKE pa0021-pernr,
            favor LIKE pa0021-favor.

** Search Help for Pernr
AT SELECTION-SCREEN ON VALUE-REQUEST FOR pernr.

  TYPES: BEGIN OF ty_pernr,
    pernr LIKE pa0021-pernr,
    favor LIKE pa0021-favor,
  END OF ty_pernr.

  DATA: it_pernr TYPE STANDARD TABLE OF ty_pernr WITH HEADER LINE.
  SELECT pernr favor FROM pa0021
    INTO CORRESPONDING FIELDS OF TABLE it_pernr
    WHERE endda = '99991231'.

  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      retfield    = 'PERNR'
      dynpprog    = sy-repid
      dynpnr      = sy-dynnr
      dynprofield = 'PERNR'
      value_org   = 'S'
    TABLES
      value_tab   = it_pernr.

** Search Help for Favor
AT SELECTION-SCREEN ON VALUE-REQUEST FOR favor.

  TYPES: BEGIN OF ty_favor,
    pernr LIKE pa0021-pernr,
    favor LIKE pa0021-favor,
  END OF ty_favor.

  DATA: it_favor TYPE STANDARD TABLE OF ty_favor WITH HEADER LINE.
  SELECT pernr favor FROM pa0021
    INTO CORRESPONDING FIELDS OF TABLE it_favor
    WHERE endda = '99991231'.

  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      retfield    = 'FAVOR'
      dynpprog    = sy-repid
      dynpnr      = sy-dynnr
      dynprofield = 'FAVOR'
      value_org   = 'S'
    TABLES
      value_tab   = it_favor.

Kind Regards,

Faisal

1 REPLY 1

faisal_altaf2
Active Contributor
0 Kudos

Hi, Ami

Please Test the following Sample Report hope will solve out your problem,

REPORT zfsl_sdn_test.

TABLES: pa0021.

PARAMETERS: pernr LIKE pa0021-pernr,
            favor LIKE pa0021-favor.

** Search Help for Pernr
AT SELECTION-SCREEN ON VALUE-REQUEST FOR pernr.

  TYPES: BEGIN OF ty_pernr,
    pernr LIKE pa0021-pernr,
    favor LIKE pa0021-favor,
  END OF ty_pernr.

  DATA: it_pernr TYPE STANDARD TABLE OF ty_pernr WITH HEADER LINE.
  SELECT pernr favor FROM pa0021
    INTO CORRESPONDING FIELDS OF TABLE it_pernr
    WHERE endda = '99991231'.

  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      retfield    = 'PERNR'
      dynpprog    = sy-repid
      dynpnr      = sy-dynnr
      dynprofield = 'PERNR'
      value_org   = 'S'
    TABLES
      value_tab   = it_pernr.

** Search Help for Favor
AT SELECTION-SCREEN ON VALUE-REQUEST FOR favor.

  TYPES: BEGIN OF ty_favor,
    pernr LIKE pa0021-pernr,
    favor LIKE pa0021-favor,
  END OF ty_favor.

  DATA: it_favor TYPE STANDARD TABLE OF ty_favor WITH HEADER LINE.
  SELECT pernr favor FROM pa0021
    INTO CORRESPONDING FIELDS OF TABLE it_favor
    WHERE endda = '99991231'.

  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      retfield    = 'FAVOR'
      dynpprog    = sy-repid
      dynpnr      = sy-dynnr
      dynprofield = 'FAVOR'
      value_org   = 'S'
    TABLES
      value_tab   = it_favor.

Kind Regards,

Faisal