‎2007 Oct 11 12:42 PM
DATA : BEGIN OF IT OCCURS 0,
VKBUR LIKE TVKBT-VKBUR, "sales office
BEZEI LIKE TVKBT-BEZEI, "Description of sales office
END OF IT.
SELECT-OPTIONS: P_VKBUR FOR KNVV-VKBUR
NO INTERVALS VISIBLE LENGTH 15.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_VKBUR-LOW.
REFRESH IT.
CLEAR IT.
SELECT VKBUR BEZEI FROM TVKBT
INTO TABLE IT
WHERE VKBUR LIKE 'A%'.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
RETFIELD = 'IT-VKBUR'
PVALKEY = ' '
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'P_VKBUR-LOW'
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'S'
PVALKEY = 'X'
MULTIPLE_CHOICE = 'X'
DISPLAY = 'X'
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
VALUE_TAB = IT.
the problem is when the list is comming and i'm choosing a value suppose A10(it-vkbur)
but the field P_vkbur having the value description of that code(it-bezei) only 4 letters but i need the vkbur field on P_vkbur not the description.what will be the solution?
‎2007 Oct 11 12:50 PM
HI,
change the highlighted part.
DATA : BEGIN OF IT OCCURS 0,
VKBUR LIKE TVKBT-VKBUR, "sales office
BEZEI LIKE TVKBT-BEZEI, "Description of sales office
END OF IT.
SELECT-OPTIONS: P_VKBUR FOR KNVV-VKBUR
NO INTERVALS VISIBLE LENGTH 15.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_VKBUR-LOW.
REFRESH IT.
CLEAR IT.
SELECT VKBUR BEZEI FROM TVKBT
INTO TABLE IT
WHERE VKBUR LIKE 'A%'.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
<b>RETFIELD = 'VKBUR'</b>
PVALKEY = ' '
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'P_VKBUR-LOW'
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'S'
PVALKEY = 'X'
MULTIPLE_CHOICE = 'X'
DISPLAY = 'X'
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
VALUE_TAB = IT.
rgds,
bharat.
‎2007 Oct 11 12:50 PM
HI,
change the highlighted part.
DATA : BEGIN OF IT OCCURS 0,
VKBUR LIKE TVKBT-VKBUR, "sales office
BEZEI LIKE TVKBT-BEZEI, "Description of sales office
END OF IT.
SELECT-OPTIONS: P_VKBUR FOR KNVV-VKBUR
NO INTERVALS VISIBLE LENGTH 15.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_VKBUR-LOW.
REFRESH IT.
CLEAR IT.
SELECT VKBUR BEZEI FROM TVKBT
INTO TABLE IT
WHERE VKBUR LIKE 'A%'.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
<b>RETFIELD = 'VKBUR'</b>
PVALKEY = ' '
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'P_VKBUR-LOW'
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'S'
PVALKEY = 'X'
MULTIPLE_CHOICE = 'X'
DISPLAY = 'X'
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
VALUE_TAB = IT.
rgds,
bharat.
‎2007 Oct 11 12:53 PM
‎2007 Oct 11 12:55 PM
hi sarkar,
its a very simple problem..... change the line which i have bolded
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
<b>RETFIELD = 'VKBUR'
"Instead of IT-VKBUR</b>
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'P_VKBUR-LOW'
VALUE_ORG = 'S'
PVALKEY = 'X'
TABLES
VALUE_TAB = IT.
reward me if it is useful............
with regards...
‎2007 Oct 11 12:57 PM
Make use of the RETFIELD as "VKBUR" in the exporting parameters and also make use of RETURN table.
Return table will contain the contents of the field that user has selected.
You can read this table and store the field value to the select-option and then use function module "DYNP_UPDATE'.
‎2007 Oct 11 1:11 PM
write
You should always give the Filed name in RETFIELD not internal table feild name make the small change in your code is
<b>RETFIELD = 'VKBUR'</b>instaed of RETFIELD = 'IT-VKBUR'
<b>Reward if helpful.</b>
Regards,
Vijay