2008 Aug 11 6:06 AM
Hi all,
I hv a requirement.
I am working on report.
i have two parameters one which takes all tables name frm dd03l
and other takes filed names of the corresponding selected table.
so can any bosy plz tell me how to implement searcg help for the fieldname parameter so tht it shows field names correponding to the selected table.
2008 Aug 11 6:13 AM
Hi,
while creating the search help for the field names, try to give the data element name.
then the search help give the table names in which the data elements used.
hope this way you can work......
Hi all,
I hv a requirement.
I am working on report.
i have two parameters one which takes all tables name frm dd03l
and other takes filed names of the corresponding selected table.
so can any bosy plz tell me how to implement searcg help for the fieldname parameter so tht it shows field names correponding to the selected table.
2008 Aug 11 6:13 AM
Hi,
while creating the search help for the field names, try to give the data element name.
then the search help give the table names in which the data elements used.
hope this way you can work......
2008 Aug 11 6:17 AM
Hi,
On the selection screen you can achieve this by using the
Event AT Selection-Screen on Value Request FOR the second field and using the Function Module "F4IF_INT_TABLE_VALUE_REQUEST".
Hope this helps.
Murthy
2008 Aug 11 6:19 AM
Hi ,
Use the FM F4IF_INT_TABLE_VALUE_REQUEST.
Select TABNAME from dd03l into table itab. Pass the internal table to the above Fm.Then for second paramter
select fieldname from dd03l into table itab1 where tabname = p_tabname. Use the DYNP_VALUES_READ then again use F4IF_INT_TABLE_VALUE_REQUEST . this code should be written in at selection-screen on value-request event.
2008 Aug 11 6:20 AM
hi,
AT SELECTION-SCREEN ON VALUE-REQUEST FOR fieldname.
DESCRIBE TABLE CTRY LINES CNUMLINES.
field_value-fieldname = 'tablename'.
APPEND field_value TO dynpro_values.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = SY-REPID
dynumb = SY-DYNNR
translate_to_upper = 'X'
TABLES
dynpfields = dynpro_valueS
EXCEPTIONS
INVALID_ABAPWORKAREA = 1
INVALID_DYNPROFIELD = 2
INVALID_DYNPRONAME = 3
INVALID_DYNPRONUMMER = 4
INVALID_REQUEST = 5
NO_FIELDDESCRIPTION = 6
INVALID_PARAMETER = 7
UNDEFIND_ERROR = 8
DOUBLE_CONVERSION = 9
STEPL_NOT_FOUND = 10
OTHERS = 11
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
SORT dynpro_values BY FIELDVALUE.
DELETE ADJACENT duplicates FROM dynpro_values COMPARING FIELDVALUE.
IF CNUMLINES IS INITIAL.
LOOP AT dynpro_values INTO FIELD_VALUE.
WAC-SIGN = 'I'.
WAC-OPTION = 'EQ'.
WAC-LOW = FIELD_VALUE-FIELDVALUE.
INSERT WAC INTO CTRY INDEX 1 .
CLEAR FIELD_VALUE.
ENDLOOP.
ENDIF.
CLEAR FIELD_VALUE.
READ TABLE dynpro_values INDEX 1 INTO field_value.
IF field_value-fieldvalue = ' '.
SELECT BU~PARTNER
BU~MC_NAME1
INTO CORRESPONDING FIELDS OF TABLE IT_LOC
FROM BUT100 AS BT INNER JOIN M_BUPAA AS BU
ON BTPARTNER = BUPARTNER
WHERE BT~RLTYP = 'ZUP004'.
ELSE.
SELECT BU~PARTNER
BU~MC_NAME1
INTO CORRESPONDING FIELDS OF TABLE IT_LOC
FROM BUT100 AS BT INNER JOIN M_BUPAA AS BU
ON BTPARTNER = BUPARTNER
FOR ALL ENTRIES IN CTRY
WHERE BT~RLTYP = 'ZUP004'
AND COUNTRY = CTRY-LOW.
ENDIF.
CLEAR : CNUMLINES.
DESCRIBE TABLE CTRY LINES CNUMLINES.
if CNUMLINES = '1'.
DELETE CTRY WHERE SIGN = 'I'.
endif.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'PARTNER'
DYNPPROG = SY-REPID
DYNPNR = sy-dynnr
DYNPROFIELD = 'LOC'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = it_loc.
Regards ,
sabari
2008 Aug 11 6:29 AM
Hi kartik,
Follow like this in the code,
AT SELECTION-SCRREN ON VALUE-REQUEST FOR FIELD fieldname( TABLE FIELD).
first you read the value of first parameter by using FUNCTIN Module
DYNP_VALUES_READ
after this you will get the value or name of table which they have entered in the first parameter here it is table name in one variable,
according to that select the field names and pass to one internal table and paa this internal table to the follwoing function module
F4IF_INT_TABLE_VALUE_REQUEST
Hope this will solve your issue,
Regards,
KP
2008 Aug 11 6:54 AM
Hii Dear,
If u working on Dialog prog then u sud go "ABAPDOCU" and check the prog for F4 help in screen section.
else check this report DEMO_SELECTION_SCREEN_F4.
Thanks,
jaten
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |