‎2009 Jun 19 8:03 AM
Hi Experts,
Any suggestions on how to deal with this kind of requirement?
Value of matnr: AAAA-00-01
Using FM F4IF_INT_TABLE_VALUE_REQUEST, i want to populate in my selection-screen only the first 4 character of MATNR, (AAAA) to be use in my selection-screen using select-option as shown below:
ITEM: From - AAAA To -DDDD
Will anybody share some code for me to be able to this?
Is the FM F4IF_INT_TABLE_VALUE_REQUEST suitable for this?
Thanks,
Yu
‎2009 Jun 19 8:05 AM
Hi,
before sendin the data to the FM 'F4IF_INT_TABLE_VALUE_REQUEST ' convert it into the format you want and send that table to the FM... This will solve your problem..
First pass the data to the fm :
C147_STRING_SPLIT_AT_POSITION.. It will split your data at the required postion..
then pass this internal table to the FM...
LOOP AT itab INTO wa_itab.
CALL FUNCTION 'C147_STRING_SPLIT_AT_POSITION'
EXPORTING
i_string = wa_itab
i_position = 4
IMPORTING
e_head = wa_itab2.
APPEND wa_itab2 TO itab2.
ENDLOOP.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'WA_ITAB2-field1'
dynpprog = sy_repid
dynpnr = sy-dynnr
window_title = text-002
value_org = 'S'
TABLES
value_tab = ITAB2
return_tab = gt_matnr_returned.
‎2009 Jun 19 8:05 AM
Hi,
before sendin the data to the FM 'F4IF_INT_TABLE_VALUE_REQUEST ' convert it into the format you want and send that table to the FM... This will solve your problem..
First pass the data to the fm :
C147_STRING_SPLIT_AT_POSITION.. It will split your data at the required postion..
then pass this internal table to the FM...
LOOP AT itab INTO wa_itab.
CALL FUNCTION 'C147_STRING_SPLIT_AT_POSITION'
EXPORTING
i_string = wa_itab
i_position = 4
IMPORTING
e_head = wa_itab2.
APPEND wa_itab2 TO itab2.
ENDLOOP.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'WA_ITAB2-field1'
dynpprog = sy_repid
dynpnr = sy-dynnr
window_title = text-002
value_org = 'S'
TABLES
value_tab = ITAB2
return_tab = gt_matnr_returned.
‎2009 Jun 19 8:35 AM
‎2009 Jun 19 10:54 AM
‎2009 Jun 19 8:11 AM
call this FM in AT slection-screen output event.
Populate the internal table from matnr(4) from whatever table u r referring for select options.
And pass this internsl table to ur FM.