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: 

AT SELECTION-SCREEN ON VALUE-REQUEST

Former Member
0 Kudos

I have programmed a search help into a 'Z' program using the ON VALUE REQUEST command and attached it to a material number parameter as follows:

PARAMETERS p_matnr TYPE mara-matnr OBLIGATORY.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_matnr.

PERFORM matnr_help.

The subroutine matnr_help works well. The drop down help works perfectly well in both our development and quality assurance systems. However, when the change is transported to our production system the drop down help is the default help which is attached to mara-matnr. The ON VALUE_REQUEST event is not actioned. Does anyone have any idea why this may be so? Is there a system setting of some kind I should be looking at?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Friend,

My suggestion would be if ur going to give ur own F4 help then don't refer MARA-MATNR instead

declare p_matnr type char18.

6 REPLIES 6

Former Member
0 Kudos

Hi Friend,

My suggestion would be if ur going to give ur own F4 help then don't refer MARA-MATNR instead

declare p_matnr type char18.

0 Kudos

Thanks Nivetha, but I have already tried that. The help worked perfectly well in our development and quality assurance systems but when it reached our production system the message "No drop down help exists" was displayed. It is indicative of the ON VALUE REQUEST even being ignored, but why this is so I do not know.

Hi Kevin,

This is really starange...Have you used the event AT Selection on value request right after the selection screen declarations?

For ex :

*&----------------------------------------------------&
*& SELECTION-SCREEN DECLARATIONS
*&----------------------------------------------------&

SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-101.
SELECT-OPTIONS :        "Added Serach help Z_SH FOR NBR SCHEME
         S_STCTS FOR G_STCTS OBLIGATORY MATCHCODE OBJECT Z_SH, "+ DG1K902168 "NUMBER SCHEME
         S_AT20A FOR G_ATTR20A, " MATCHCODE OBJECT Z_AT,          "+DG1K902218  "SUBSTANCE ID
         S_ATR5C FOR G_ATTR05C,           " SPEC BUS + DG1K902190
         S_PRVSY FOR G_PRVSY,              "R3 MATERIAL NUMBER
         S_ATR5A   FOR G_ATTR05A,          "R3 MATERIAL NUMBER " + DG1K902168
         S_GRVSY FOR G_GRVSY,              "LOGICAL SYS GROUP
         S_QSTA FOR G_QSTA,                "PRODUCT STATUS
*        S_CRTSP FOR G_CRTSP,              "PRODUCT CREATED ON  - DG1K902110
*        S_CHTSP FOR G_CHTSP.              "PRODUCT CHANGED ON
         S_DATE FOR G_CRTSP,                "PRODUCT CREATED ON  "+ DG1K902110
         S_CRTSP FOR /SAPSLL/PR-CRTSP no-display,
         S_DATE1 FOR G_CHTSP,              "PRODUCT CHANGED ON
         S_CHTSP FOR /SAPSLL/PR-CRTSP no-display.
*End of changes



SELECTION-SCREEN END OF BLOCK B1.

*-----------------------------------------------------+ DG1K902218
AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_AT20A-LOW.
PERFORM SHELP.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_AT20A-HIGH.
PERFORM SHELP1.


*&---------------------------------------------------------------------*
*&      Form  SHELP
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
FORM SHELP .

REFRESH T_SH.  " +  DG1K902198
CLEAR WA_SH.
REFRESH T_SH1.
CLEAR WA_SH1.
REFRESH T_FINAL_SH.

SELECT ATTRV20
       INTO TABLE T_SH
       FROM /SAPSLL/TCOATV20.

SELECT ATTRV20
       TEXT1
       FROM
       /SAPSLL/TCOATT20
       INTO TABLE T_SH1.

 LOOP AT T_SH INTO WA_SH.

     IF SY-SUBRC = 0.
        WA_FINAL_SH-ATTRV20 = WA_SH-ATTRV20.
     ENDIF.

 READ TABLE T_SH1 INTO WA_SH1 WITH KEY ATTRV20 = WA_SH-ATTRV20.

     IF SY-SUBRC = 0.
        WA_FINAL_SH-TEXT1 = WA_SH1-TEXT1.
     ENDIF.

 APPEND WA_FINAL_SH TO T_FINAL_SH.
 CLEAR WA_FINAL_SH.
 ENDLOOP.

SORT T_FINAL_SH BY ATTRV20.
DELETE ADJACENT DUPLICATES FROM T_FINAL_SH COMPARING ATTRV20.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
  EXPORTING
    RETFIELD              = 'ATTRV20'
   VALUE_ORG              = 'S'
  TABLES
    VALUE_TAB             = T_FINAL_SH
   RETURN_TAB             = IT_RETURN1
 EXCEPTIONS
   PARAMETER_ERROR        = 1
   NO_VALUES_FOUND        = 2
   OTHERS                 = 3.

    S_AT20A-LOW  = IT_RETURN1-FIELDVAL.

REFRESH IT_RETURN1.

ENDFORM.                    " SHELP

Please let me know if you did in the same manner...

Regards,

Kittu

0 Kudos

Hi Kittu,

You are right, it is very strange. the event is programmed directly after the selection-screen declaration and it is extremely puzzling why it should work in one client and not the other.

Rajesh,

Thanks for you suggestion, I have to go out for a while but will try your suggestion when I return and let you know the outcome.

0 Kudos

Hi Kev,

I think you just need to activate the selection screen in RPU!

Jan

Former Member
0 Kudos

Hi

Hope this will help

In Initialization, write the select statement by extracting the data needed for the dropdown

SELECT ZLSCH TEXT1 FROM T042Z INTO TABLE IT_TEMP1

WHERE LAND1 = CL_COUNTRY.

then

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

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = 'ZLSCH'

DYNPROFIELD = 'S_ZWELS'

DYNPPROG = SY-CPROG

DYNPNR = SY-DYNNR

VALUE_ORG = 'S'

TABLES

VALUE_TAB = IT_TEMP1.

Thanks

Rajesh