‎2009 Jul 31 7:17 AM
Dear Experts,
I hv following scenario.
I hv taken a PARAMETER : p_swerk type iloa-swerk.
everything is going fine except when when I click on list option, it display a dialog box with options.
this dialog box should display only two option ( as we ha defined two Maintenance Plant 1004, 3000), but it displays other plants also which are not in iloa table but exist in t001w.
it should plants existing in t399i table.
Thanks in advance.
Regards
‎2009 Jul 31 7:26 AM
the data element SWERK is assigned to the domain WERKS
for the domain werks in the value table table T001W is assigned.. so it will display all the plants in SWERKS.
define a custom data element with only those two plants in the value range.
this will solve your problem
even in table T399I, the data elemnt IWERK is assigned to domain T001W , which in turn has value table as T001W.
so better create a custom dataelemt
Edited by: jeevitha krishnaraj on Jul 31, 2009 8:27 AM
‎2009 Jul 31 7:26 AM
the data element SWERK is assigned to the domain WERKS
for the domain werks in the value table table T001W is assigned.. so it will display all the plants in SWERKS.
define a custom data element with only those two plants in the value range.
this will solve your problem
even in table T399I, the data elemnt IWERK is assigned to domain T001W , which in turn has value table as T001W.
so better create a custom dataelemt
Edited by: jeevitha krishnaraj on Jul 31, 2009 8:27 AM
‎2009 Jul 31 7:35 AM
Thanks for ur reply
but what if I add another Maitenance Plant in future. Will the given range restrict it with value range.
Do I need to redefine the range in that case.
Regards
‎2009 Jul 31 8:25 AM
Hi,
Try this way.
Thanks
Venkat.O
REPORT ztest_notepad.
DATA: it_t399i TYPE t399i OCCURS 0.
DATA: it_return_tab TYPE ddshretval OCCURS 0,
wa_return LIKE LINE OF it_return_tab.
PARAMETER : p_swerk TYPE iloa-swerk.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_swerk.
IF it_t399i[] IS INITIAL.
SELECT * FROM t399i INTO TABLE it_t399i.
ENDIF.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'IWERK'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'P_SWERK'
value_org = 'S'
TABLES
value_tab = it_t399i
return_tab = it_return_tab.
READ TABLE it_return_tab INTO wa_return INDEX 1.
p_swerk = wa_return-fieldval.
‎2009 Jul 31 10:54 AM
Dear Venkat.O
Thanks alot.
ur reply resolved my problem upto 99 %.
I need to display the Text /Name of the plant also.
Pls suggest someting for this also.
Regards
Maverick