‎2011 May 27 2:02 PM
hi.....
I am using vendor F4 help in module pool screen...
Now if i am using the vendor field as dropdown than th f4 help disappear...
for that i had used " process on value-request" event and "F4IF_INT_TABLE_VALUE_REQUEST"..
But in this f4 in dropdown i want first column vendor name and second vendor code...
But always the vendor code is first shown even if i take first field vendorname and second vendor code in value tab in
"F4IF_INT_TABLE_VALUE_REQUEST" value tab....
So . , what i have to do to change the column position in f4 help ?..
I hope for your <removed by moderator> repply.......
Edited by: Thomas Zloch on May 27, 2011 3:07 PM
‎2011 May 27 2:27 PM
Have you tried defining a dictionary structure that contains the fields in the order you want them to be and passing an internal table with that structure?
‎2011 May 28 7:47 AM
hi...thnks for ur repply...
i tried using structure but it is not working....
also , i tried using database table and in it i had used elementary search hellp (name,vendor code) that i had made...
but even it is not working ...because the return field is vendor code so...it the FM for f4 takes veodor code ad 1s column default
‎2011 May 27 7:40 PM
Hi kartik dave,
I understand that you want to change a F4 search help into a dropdown listbox, and you'd like to display vendor name followed by code.
This isn't directly possiblel as you have seen: there are 2 built-in possibilities in SAP: display only the text and corresponding code is hidden, or display both with code first followed by text(this latter case is either forced in the listbox field attribute, or the user may choose to force codes to be displayed in his SAP GUI preferences). In the 2 cases, only the code corresponding to the line selected is returned to the application.
What you can do is to use the first possibility, where you setup the text by concatenating the text followed by the code. Of course, if the user has setup his SAPGUI preferences to display code + text, then you can't do anything.
BR
Sandra
‎2011 May 28 7:52 AM
thanks sandara .....u r right.....
but i want to use standard F4 help .......the logic u told is good but for that i have to do coding.....
‎2011 May 28 6:49 AM
Hi,
in that types declaration first you declare vendor name and then you declare vendor code. Hope its help full.
TYPES : BEGIN OF ty_lifnr,
NAME1 type NAME1_GP,
LIFNR TYPE LIFNR,
END OF ty_lifnr.
DATA : it_lifnr TYPE TABLE OF ty_lifnr.
*fetching the records
SELECT LIFNR NAME1 *INTO CORRESPONDING FIELDS OF TABLE* it_lifnr FROM lfa1."use into corresponding here
*pass the internal table it_lifnr into function module
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
Regards,
Dhina..
‎2011 May 28 7:49 AM
hi...thanks for ur repply....
i tried this code but it is also not working......
‎2011 May 28 8:10 AM
Hi,
I tried may way its working fine for me.
in that POV event right this code.
TYPES : BEGIN OF ty_lifnr,
NAME1 type NAME1_GP,"1st mention vendor name
LIFNR TYPE LIFNR," 2nd mention vendor code
END OF ty_lifnr.
DATA : it_lifnr TYPE TABLE OF ty_lifnr.
*fetching the records
SELECT lifnr name1 INTO CORRESPONDING FIELDS OF TABLE it_lifnr "mention corresponding fields
FROM lfa1.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
* DDIC_STRUCTURE = ' '
RETFIELD = 'LIFNR'
* PVALKEY = ' '
* DYNPPROG = ' '
* DYNPNR = ' '
DYNPROFIELD = 'LIFNR'" pass the dynpro field name here
* STEPL = 0
* WINDOW_TITLE =
* VALUE = ' '
VALUE_ORG = 'S'
* MULTIPLE_CHOICE = ' '
* DISPLAY = ' '
* CALLBACK_PROGRAM = ' '
* CALLBACK_FORM = ' '
* MARK_TAB =
* IMPORTING
* USER_RESET =
TABLES
VALUE_TAB = it_lifnr "Pass the internal table
* FIELD_TAB =
* RETURN_TAB =
* 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.
Regards,
Dhina..
Edited by: Dhina DMD on May 28, 2011 9:10 AM
‎2011 May 30 7:34 AM
hi...bro........
check ur code again....this us not workiang as i want
‎2011 May 30 8:35 AM
Hi,
Check below code...
parameters: p_ebeln type ekko-ebeln.
TYPES: BEGIN OF t_ekko,
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
statu TYPE ekpo-statu,
aedat TYPE ekpo-aedat,
matnr TYPE ekpo-matnr,
menge TYPE ekpo-menge,
meins TYPE ekpo-meins,
netpr TYPE ekpo-netpr,
peinh TYPE ekpo-peinh,
END OF t_ekko.
DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
wa_ekko TYPE t_ekko,
it_return type STANDARD TABLE OF DDSHRETVAL,
wa_return like line of it_return.
**************************************************************
*at selection-screen
at selection-screen on value-request for p_ebeln.
select *
up to 10 rows
from ekko
into CORRESPONDING FIELDS OF TABLE it_ekko.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = 'EKKO'
RETFIELD = 'EBELN'
PVALKEY = ' '
DYNPPROG = sy-repid
DYNPNR = sy-dynnr
DYNPROFIELD = 'EBELN'
STEPL = 0
WINDOW_TITLE = 'Ekko Records'
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = 'X' "allows you select multiple entries from the popup
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET = ld_ret
TABLES
VALUE_TAB = it_ekko
FIELD_TAB = lt_field
RETURN_TAB = it_return
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3.
READ TABLE it_return into wa_return index 1.
p_ebeln = wa_return-fieldval.
it will useful.
Ram.