‎2007 Feb 24 9:50 AM
dear all ,
i am using the code .
data : begin of i_bidst OCCURS 0,
bidstd(10) type c , ( DEFINED BY ME)
bidst like zvesim-bidst, ( DATA DICTIONARY FIELD)
end of i_bidst.
i_bidst-bidst = 'A'.
i_bidst-bidstd = 'APPROVED'.
append i_bidst.
i_bidst-bidst = 'R'.
i_bidst-bidstd = 'REJECTED'.
append i_bidst.
i_bidst-bidst = 'S'.
i_bidst-bidstd = 'SUBMITTED'.
append i_bidst.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_BIDST.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'BIDST'
DYNPROFIELD = 'P_BIDST'
DYNPPROG = SY-CPROG
DYNPNR = SY-DYNNR
VALUE_ORG = 'S'
TABLES
VALUE_TAB = I_BIDST.
the internal table consists of data what i had appended.
I want to know how display both the fields on value request but the selection field is DICTONARY field only For Description only I am using the user defined field.
regards,
balaji.
‎2007 Feb 24 9:51 AM
parameters: p_bukrs(4) type c,
p_butxt(50) type c.
data: dynfields type table of dynpread with header line.
data: return type table of ddshretval with header line.
at selection-screen on value-request for p_bukrs.
call function 'F4IF_FIELD_VALUE_REQUEST'
exporting
tabname = 'T001'
fieldname = 'BUKRS'
dynpprog = sy-cprog
dynpnr = sy-dynnr
dynprofield = 'P_BUKRS'
tables
return_tab = return
exceptions
field_not_found = 1
no_help_for_field = 2
inconsistent_help = 3
no_values_found = 4
others = 5.
read table return with key fieldname = 'P_BUKRS'.
* Add it back to the dynpro.
dynfields-fieldname = return-retfield.
dynfields-fieldvalue = return-fieldval.
append dynfields.
* Get the company code from db and add to dynpro
dynfields-fieldname = 'P_BUTXT'.
select single butxt into dynfields-fieldvalue
from t001
where bukrs = return-fieldval.
append dynfields.
* Update the dynpro values.
call function 'DYNP_VALUES_UPDATE'
exporting
dyname = sy-cprog
dynumb = sy-dynnr
tables
dynpfields = dynfields
exceptions
others = 8.
start-of-selection.
Refer this too
F4IF_INT_TABLE_VALUE_REQUEST
This FM is used to dsiplay values stored in an internal table as input
help.This FM is used to program our own custom help if no such input help
exists in ABAP dictionary for a particular field. The parameter VALUE_TAB is used to pass the internal table containing input values.The parameter RETFIELD
is used to specify the internal table field whose value will be returned to the screen field or RETURN_TAB.
If DYNPNR,DYNPPROG and DYNPROFIELD are specified than the user selection is passed to the screen field specified in the DYNPROFIELD. If RETURN_TAB is specified the selectionis returned in a table.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = field from int table whose value will be returned
DYNPPROG = SY-CPROG
DYNPNR = SY-DYNNR
DYNPROFIELD = 'screen field'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = internal table whose values will be shown.
RETURN_TAB = internal table of type DDSHRETVAL
EXCEPTIONS
parameter_error = 1
no_values_found = 2
others = 3.
Refer if this helsp.
‎2007 Feb 24 9:51 AM
parameters: p_bukrs(4) type c,
p_butxt(50) type c.
data: dynfields type table of dynpread with header line.
data: return type table of ddshretval with header line.
at selection-screen on value-request for p_bukrs.
call function 'F4IF_FIELD_VALUE_REQUEST'
exporting
tabname = 'T001'
fieldname = 'BUKRS'
dynpprog = sy-cprog
dynpnr = sy-dynnr
dynprofield = 'P_BUKRS'
tables
return_tab = return
exceptions
field_not_found = 1
no_help_for_field = 2
inconsistent_help = 3
no_values_found = 4
others = 5.
read table return with key fieldname = 'P_BUKRS'.
* Add it back to the dynpro.
dynfields-fieldname = return-retfield.
dynfields-fieldvalue = return-fieldval.
append dynfields.
* Get the company code from db and add to dynpro
dynfields-fieldname = 'P_BUTXT'.
select single butxt into dynfields-fieldvalue
from t001
where bukrs = return-fieldval.
append dynfields.
* Update the dynpro values.
call function 'DYNP_VALUES_UPDATE'
exporting
dyname = sy-cprog
dynumb = sy-dynnr
tables
dynpfields = dynfields
exceptions
others = 8.
start-of-selection.
Refer this too
F4IF_INT_TABLE_VALUE_REQUEST
This FM is used to dsiplay values stored in an internal table as input
help.This FM is used to program our own custom help if no such input help
exists in ABAP dictionary for a particular field. The parameter VALUE_TAB is used to pass the internal table containing input values.The parameter RETFIELD
is used to specify the internal table field whose value will be returned to the screen field or RETURN_TAB.
If DYNPNR,DYNPPROG and DYNPROFIELD are specified than the user selection is passed to the screen field specified in the DYNPROFIELD. If RETURN_TAB is specified the selectionis returned in a table.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = field from int table whose value will be returned
DYNPPROG = SY-CPROG
DYNPNR = SY-DYNNR
DYNPROFIELD = 'screen field'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = internal table whose values will be shown.
RETURN_TAB = internal table of type DDSHRETVAL
EXCEPTIONS
parameter_error = 1
no_values_found = 2
others = 3.
Refer if this helsp.
‎2007 Feb 24 10:06 AM
hi,
chk this sample 1.
tables: mara, makt.
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 0.
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.
select single maktx from makt into mak where matnr = return-fieldval.
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-cprog
dynumb = sy-dynnr
TABLES
dynpfields = dynpfields
EXCEPTIONS
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
undefind_error = 7
OTHERS = 8.
.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
refresh return.
clear return.Regards
Anver
‎2007 Feb 24 10:06 AM
data : begin of i_bidst OCCURS 0,
bidstd(10) type c , ( DEFINED BY ME)
bidst like zvesim-bidst, ( DATA DICTIONARY FIELD)
end of i_bidst.
<b>initialization.</b>
i_bidst-bidst = 'A'.
i_bidst-bidstd = 'APPROVED'.
append i_bidst.
i_bidst-bidst = 'R'.
i_bidst-bidstd = 'REJECTED'.
append i_bidst.
i_bidst-bidst = 'S'.
i_bidst-bidstd = 'SUBMITTED'.
append i_bidst.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_BIDST.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'BIDST'
DYNPROFIELD = 'P_BIDST'
DYNPPROG = SY-CPROG
DYNPNR = SY-DYNNR
VALUE_ORG = 'S'
TABLES
VALUE_TAB = I_BIDST.