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: 

BADI Help !

Former Member
0 Kudos

BADI IF_EX_NETW_USER_FIELDS_F4, is used to allow possible F4 values on set of feilds on the PS Network Userfields screen.

I implmeneted the BADI by ZNETW_USER_FIELDS_F4. It has a method 'AT_F4'.

The parameters for this method arebelow:

I_CAUFVD Structure for order header

I_AFVGD Structure for order operation

I_USER_FIELD Field name

E_VALUE field value

E_VALUE is an exporting parameter (single value). But i need to have my User field 'USR1' to show a list of possible values and also along with their descriptions.

How to accomplish this, can i modify E_VALUE or need create new parameters ? How to do this?

Appreciate the HELP.

Thanks

Ram

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

First of all please do reward points to the usefull answers. As seen from your previous posts.. you have not rewarded points to anyone... please reward people for their efforts to solve your queries...

Now to answer your Question......

First create a search help for the USR01 field, then in the method AT_F4 use the Function Module F4IF_FIELD_VALUE_REQUEST

Code is as below:


  IF I_USER_FIELD EQ 'AFVGD-USR02'. "F4 help field name
       DATA: STRU TYPE TABLE OF DDSHRETVAL,
             WA TYPE DDSHRETVAL.

            CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
              EXPORTING
                TABNAME                   = SPACE
                FIELDNAME                 = SPACE
                SEARCHHELP                = 'ZT_ZPS_NW_ACTIVITY'
*               SHLPPARAM                 = ' '
*               DYNPPROG                  = ' '
*               DYNPNR                    = ' '
*               DYNPROFIELD               = ' '
*               STEPL                     = 0
*               VALUE                     = ' '
*               MULTIPLE_CHOICE           = ' '
*               DISPLAY                   = ' '
*               SUPPRESS_RECORDLIST       = ' '
*               CALLBACK_PROGRAM          = ' '
*               CALLBACK_FORM             = ' '
*               SELECTION_SCREEN          = ' '
*             IMPORTING
*               USER_RESET                =
             TABLES
               RETURN_TAB                = STRU
             EXCEPTIONS
               FIELD_NOT_FOUND           = 1
               NO_HELP_FOR_FIELD         = 2
               INCONSISTENT_HELP         = 3
               NO_VALUES_FOUND           = 4
               OTHERS                    = 5.

        READ TABLE STRU INTO WA INDEX 1.
             IF SY-SUBRC = 0.
                E_VALUE = WA-FIELDVAL.
             ENDIF.
  ENDIF.

This will work...

Lokesh

pls. reward appropriate points

Message was edited by: Lokesh Aggarwal

2 REPLIES 2

Former Member
0 Kudos

Hi Ram,

It will be better if you create new parameter for the user field 'USR1'.

This will be enhancement which will be accomplished by your BADI.

You can attatch the possible values to this new parameter.

You can read this document for further details . In this a screen enhancement has been made in whihc two new fields have been added to the original screen and uploaded with the possible values .

<b>http://help.sap.com/saphelp_47x200/helpdata/en/9d/12233a0edd7978e10000000a11402f/content.htm</b>

Thanks and Regards,

Kunal.

Former Member
0 Kudos

Hi,

First of all please do reward points to the usefull answers. As seen from your previous posts.. you have not rewarded points to anyone... please reward people for their efforts to solve your queries...

Now to answer your Question......

First create a search help for the USR01 field, then in the method AT_F4 use the Function Module F4IF_FIELD_VALUE_REQUEST

Code is as below:


  IF I_USER_FIELD EQ 'AFVGD-USR02'. "F4 help field name
       DATA: STRU TYPE TABLE OF DDSHRETVAL,
             WA TYPE DDSHRETVAL.

            CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
              EXPORTING
                TABNAME                   = SPACE
                FIELDNAME                 = SPACE
                SEARCHHELP                = 'ZT_ZPS_NW_ACTIVITY'
*               SHLPPARAM                 = ' '
*               DYNPPROG                  = ' '
*               DYNPNR                    = ' '
*               DYNPROFIELD               = ' '
*               STEPL                     = 0
*               VALUE                     = ' '
*               MULTIPLE_CHOICE           = ' '
*               DISPLAY                   = ' '
*               SUPPRESS_RECORDLIST       = ' '
*               CALLBACK_PROGRAM          = ' '
*               CALLBACK_FORM             = ' '
*               SELECTION_SCREEN          = ' '
*             IMPORTING
*               USER_RESET                =
             TABLES
               RETURN_TAB                = STRU
             EXCEPTIONS
               FIELD_NOT_FOUND           = 1
               NO_HELP_FOR_FIELD         = 2
               INCONSISTENT_HELP         = 3
               NO_VALUES_FOUND           = 4
               OTHERS                    = 5.

        READ TABLE STRU INTO WA INDEX 1.
             IF SY-SUBRC = 0.
                E_VALUE = WA-FIELDVAL.
             ENDIF.
  ENDIF.

This will work...

Lokesh

pls. reward appropriate points

Message was edited by: Lokesh Aggarwal