‎2010 Mar 31 8:27 PM
Hi all,
I have developed a custom tab in std screen VL31N and VL32N.
Now I have added the std fields LIFNR and NAME1 form table LFA1 in this custom tab.I have also attached the search help for these fields.
Now when I select the values from the search help for this field(LFA1-LIFNR),the value for NAME1 should be automatically populated in the field NAME1.How do i do this?
‎2010 Mar 31 10:31 PM
‎2010 Apr 01 6:59 AM
‎2010 Apr 01 7:01 AM
HI Ram,
Check the following
" Implement your own search Help as below
PARAMETERS : carrid TYPE spfli-carrid,
connid TYPE spfli-connid,
fldate TYPE sflight-fldate.
DATA : itab TYPE TABLE OF sflight WITH HEADER LINE.
DATA : fmap TYPE TABLE OF dselc WITH HEADER LINE.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR carrid." If it is a selection Screen
else in PROCESS ON VALUE REQUEST
SELECT * FROM sflight INTO TABLE itab.
SORT itab BY carrid connid fldate.
DELETE ADJACENT DUPLICATES FROM itab
COMPARING carrid connid fldate.
fmap-fldname = 'CARRID'.
fmap-dyfldname = 'CARRID'.
APPEND fmap.
fmap-fldname = 'CONNID'.
fmap-dyfldname = 'CONNID'.
APPEND fmap.
fmap-fldname = 'FLDATE'.
fmap-dyfldname = 'FLDATE'.
APPEND fmap.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
ddic_structure = 'SFLIGHT'
retfield = 'CARIID'
* PVALKEY = ' '
dynpprog = sy-repid
dynpnr = sy-dynnr
DYNPROFIELD = 'CARRID'
* STEPL = 0
* WINDOW_TITLE =
* VALUE = ' '
value_org = 'S'
* MULTIPLE_CHOICE = ' '
* DISPLAY = ' '
* CALLBACK_PROGRAM = ' '
* CALLBACK_FORM = ' '
* MARK_TAB =
* IMPORTING
* USER_RESET =
TABLES
value_tab = itab
* FIELD_TAB =
* RETURN_TAB =
dynpfld_mapping = fmap
* EXCEPTIONS
* PARAMETER_ERROR = 1
* NO_VALUES_FOUND = 2
* OTHERS = 3
." Just Execute this pilot program and verify
IF sy-subrc 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.Cheerz
Ram
‎2010 Apr 01 3:49 PM
I dont want to write any additioal code for the NAME1 field.If I place these field directly inmy subscreen will the values be automatically poulated?
‎2010 Apr 05 4:37 PM