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

Default value in search help parameter

Former Member
0 Likes
2,310

Hi All,

I had table control. In table control ,I had three parameters in the screen. Based on two parameters I need to call material serach help S_MAT1. I extended standard material serach help S_MAT1 so i have desird resuit.

Problem is I want those two variables in default search screen.

I thought I can set set get parameters to get desired result but in table control we can not get this work.

Is there any function module to call search help?

Thanks

Abhishek Purwar

3 REPLIES 3
Read only

RaymondGiuseppi
Active Contributor
0 Likes
973

You may use FM [F4IF_FIELD_VALUE_REQUEST|http://forums.sdn.sap.com/search.jspa?threadID=&q=F4IF_FIELD_VALUE_REQUEST&objID=c42&dateRange=all&numResults=30&rankBy=10001] with the standard search help, to change standard behaviour of the search help, fill parameters callback_program and callback_form where you will be able to change the transmitted parameters. A little sample :

  CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
       EXPORTING
            tabname          = 'BSID'
            fieldname        = 'UMSKZ'
            multiple_choice  = 'X'  
            callback_program = gv_repid
            callback_form    = 'CGS_DEBITOR'  
       TABLES
            return_tab       = return_tab
       EXCEPTIONS
            OTHERS           = 1.
*...
*&---------------------------------------------------------------------*
*&      Form  cgs_debitor
*&---------------------------------------------------------------------*
FORM cgs_debitor TABLES   record_tab STRUCTURE seahlpres
                 CHANGING shlp TYPE shlp_descr_t
                          callcontrol LIKE ddshf4ctrl.
* Local declaration
  DATA: ddshiface TYPE ddshiface,
        worklist LIKE lumskz,
        dynpfields TYPE TABLE OF dynpread WITH HEADER LINE.
* Filter D-ebitor
  LOOP AT shlp-interface INTO ddshiface WHERE shlpfield = 'KOART'.
    ddshiface-valtabname = 'BSID'.
    ddshiface-valfield   = 'KOART'.
    ddshiface-value      = 'D'.
    MODIFY shlp-interface FROM ddshiface.
  ENDLOOP.

ENDFORM.

To get current value of the screen, use FM [DYNP_GET_STEPL|http://forums.sdn.sap.com/search.jspa?threadID=&q=DYNP_GET_STEPL&objID=c42&dateRange=all&numResults=30&rankBy=10001] (for table control line) and [DYNP_VALUES_READ|http://forums.sdn.sap.com/search.jspa?threadID=&q=DYNP_VALUES_READ&objID=c42&dateRange=all&numResults=30&rankBy=10001] in the POV.

Regards,

Raymond

Read only

0 Likes
973

Hi Raymond,

Thanks for your help.

I am not able to figure out. Do u have any example or any program or sample code?

Thanks,

Abhishek

Read only

0 Likes
973

Read this sample, it contains most functions to use in the POV part of the dynpro :

[DYNAMIC F4 HELP FOR A FIELD IN TABLE CONTROL |http://wiki.sdn.sap.com/wiki/display/sandbox/DYNAMICF4HELPFORAFIELDINTABLECONTROL]

Then in the module/form

- Add the DYNP_VALUES_READ for the other two fields

- Add the 2 parameters for callback form to the F4 FM

- Implement the form adding the two selections fields

Regards,

Raymond