10-17-2008 2:47 PM
HI,
I am writing the value request help for one field which is selection screen.
I am able to populate the Values in the help screen , i want the texts for values . I am writinf belwo.
it_loekz-loekz = 'S'.
append it_loekz.
clear it_loekz.
it_loekz-loekz = 'L'.
append it_loekz.
clear it_loekz.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'LOEKZ'
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = LW_FIELD_NAME
VALUE_ORG = 'S'
TABLES
VALUE_TAB = it_loekz.
I want the Vales like below
S Locked
L Deleted
regards,
Ajay reddy
10-17-2008 2:50 PM
try like this
it_loekz-loekz = 'S'.
it_loekz-text1 = 'locked'
append it_loekz.
clear it_loekz.
it_loekz-loekz = 'L'.
it_loekz-text2 = 'deleted'
append it_loekz.
clear it_loekz.
10-17-2008 2:50 PM
try like this
it_loekz-loekz = 'S'.
it_loekz-text1 = 'locked'
append it_loekz.
clear it_loekz.
it_loekz-loekz = 'L'.
it_loekz-text2 = 'deleted'
append it_loekz.
clear it_loekz.
10-17-2008 2:52 PM
10-17-2008 2:54 PM
Hi..,
Did you calling this function module in proper event i.e AT SELECTION_SCREEN ON VALUE REQUEST FOR <your field>?
Thanks,
Naveen.I
10-17-2008 2:55 PM
at selection-screen on value-request for s_loekz-low.
perform F4_value_loekz using 'LOW'.
at selection-screen on value-request for s_loekz-high.
perform F4_value_loekz using 'HIGH'.
10-17-2008 2:55 PM
there is a parameter called
DYNPFLD_MAPPING
pass the it_loekz to that
10-17-2008 3:25 PM
did u passed your internal table it_loekz to
tables parameter DYNPFLD_MAPPING
it might work
plese revert back
10-17-2008 3:32 PM
10-17-2008 3:35 PM
Hello AJay,
Can u please try this:
PARAMETERS : p_loekz TYPE loekz.
DATA : BEGIN OF it_loekz OCCURS 0 ,
loekz TYPE loekz,
text TYPE dd07v-ddtext,
END OF it_loekz.
DATA: lt_return TYPE TABLE OF ddshretval WITH HEADER LINE.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_loekz.
it_loekz-loekz = 'S'.
it_loekz-text = 'TEST'.
APPEND it_loekz.
CLEAR it_loekz.
it_loekz-loekz = 'L'.
it_loekz-text = 'NEW'.
APPEND it_loekz.
CLEAR it_loekz.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'LOEKZ'
value_org = 'S'
TABLES
value_tab = it_loekz
return_tab = lt_return
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
READ TABLE lt_return INDEX 1.
WRITE lt_return-fieldval TO p_loekz.
Hope this helps.
Regards,
Sandeep
10-17-2008 3:39 PM
Hi Reddy,
According to srinivasu bv code..
try like this
it_loekz-loekz = 'S'.
it_loekz-text1 = 'locked'
append it_loekz.
clear it_loekz.
it_loekz-loekz = 'L'.
it_loekz-text2 = 'deleted'
append it_loekz.
clear it_loekz.
Modify using only text rather text1 and text2.
it_loekz-loekz = 'S'.
it_loekz-text = 'locked'
append it_loekz.
clear it_loekz.
it_loekz-loekz = 'L'.
it_loekz-text = 'deleted'
append it_loekz.
clear it_loekz.
10-17-2008 3:41 PM
10-17-2008 3:46 PM
10-17-2008 2:56 PM
Hi Reddy,
You are clearing the records because of which values might not populate. Try using refresh keyword.
Cheers!!
10-17-2008 3:01 PM
10-17-2008 3:11 PM
Hi Ajay,
Are you working with any report or UI programming ?
You are saying like you need only 2 values in that case you can also use Dropdown box which makes your work more easy.
Revert me in which concept your are working so that i can help you with any sample codes for dropdown list.
Cheers!!
10-17-2008 3:21 PM
HI balu,
Thanks you interest on my requiremt.
it is report . On selection scree, I am able to populate the values , but we need desc of that value also.
S LOCKED
L DELETED.
regards,
Ajay
10-17-2008 3:43 PM
Hi,
not exactly the way you wanted by using the funtion , but I did it another way :
REPORT Z_F4_HELP .
parameter p_loekz(1) type c.
data : begin of it_loekz occurs 0,
l_loekz like ekpo-loekz,
text(10) type c,
end of it_loekz.
data : lw_field_name type DYNFNAM.
data gv_choice like sy-tabix.
at selection-screen on value-request for p_loekz.
LW_FIELD_NAME = 'P_LOEKZ'.
it_loekz-l_loekz = 'S'.
it_loekz-text = ' Locked'.
append it_loekz.
clear it_loekz.
it_loekz-l_loekz = 'L'.
it_loekz-text = ' Deleted'.
append it_loekz.
clear it_loekz.
CALL FUNCTION 'POPUP_WITH_TABLE_DISPLAY'
EXPORTING
endpos_col = 30
endpos_row = 5
startpos_col = 20
startpos_row = 5
titletext = 'Select a Deletion indicator'
IMPORTING
choise = gv_choice
TABLES
valuetab = it_loekz
EXCEPTIONS
break_off = 1
OTHERS = 2.
READ TABLE it_loekz INDEX gv_choice.
p_loekz = it_loekz-l_loekz.
regards,
Advait