‎2007 Feb 03 9:59 AM
'
In desing a screen with 2 fields
those fields are crhd-arbpl and crhd-werks.
i created search help for field and i assigned that search help also through attributes of field but it not working.
i desinned a serch help with 2 columns arbpl and werks bot are import and export parameters only.
whenever i select arbpl field 2nd field werks also filled using search help but its not working properly thts why i used the funtion module
F4IF_INT_TABLE_VALUE_REQUEST
using this how to do it will give any instructions
can any body help
regards,
Chaitanya.
‎2007 Feb 03 5:07 PM
HI,
for screen field...
<b>PROCESS ON VALUE-REQUEST.
FIELD DBTABLE-ARBPL MODULE D1010_VALREQ_ARBPL.</b>
In Module arbpl value request.
<b>DATA: BEGIN OF I_SH_TABLE OCCURS 0,
ARBPL LIKE CRHD-ARBPL,
WERKS LIKE CRHD-WERKS,
END OF I_SH__TABLE.
DATA: return like ddshretval occurs 0 with header line.
SELECT arbpl werks FROM CRHD INTO TABLE I_SH_TABLE.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'ARBPL'
dynprofield = 'CRHD-ARBPL'
dynpprog = sy-REPID
dynpnr = sy-dynnr
value_org = 'S'
TABLES
value_tab = I_SH_TABLE
return_tab = return.</b>
lOOK AT THIS... TO FILL SECOND FIELD DYNAMICALLY...
<b>TABLES: mara, makt.
DATA mat LIKE mara-matnr.
DATA: BEGIN OF itab OCCURS 0,
matnr LIKE mara-matnr,
END OF itab.
DATA : BEGIN OF btab OCCURS 0,
maktx LIKE makt-maktx,
END OF btab.
DATA mak LIKE makt-maktx.
DATA : return LIKE ddshretval OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF dynpfields OCCURS 3.
INCLUDE STRUCTURE dynpread.
DATA: END OF dynpfields.
PARAMETERS: p_matnr LIKE mara-matnr,
p_maktx LIKE makt-maktx.
INITIALIZATION.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_matnr.
REFRESH itab.
SELECT matnr FROM mara INTO TABLE itab.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'MATNR '
dynprofield = 'P_MATNR '
dynpprog = sy-repid
dynpnr = sy-dynnr
value_org = 'S'
TABLES
value_tab = itab
return_tab = return.
mat = return-fieldval.
UNPACK mat TO mat.
SELECT SINGLE maktx FROM makt INTO mak WHERE matnr = mat AND spras =
sy-langu.
p_matnr = return-fieldval.
REFRESH return.
CLEAR return.
MOVE 'P_MAKTX' TO dynpfields-fieldname.
MOVE mak TO dynpfields-fieldvalue.
APPEND dynpfields.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = 'SY-REPID'
dynumb = '1000'
TABLES
dynpfields = dynpfields.
REFRESH return.
CLEAR return.</b>
Pls close the thread if the problem is solved and reward to all helpful answers.
Regards
SAB
‎2007 Feb 05 8:49 AM
Hi,
Just check Search Help 'C_SPART'. This is used in VA01 transaction when you choose F4 on division field. Just check this and try this using your search help.
You should be able to do it.
Regards
Nishant