ABAP ALV

ALV , , - F4IF_FIELD_VALUE_REQUEST. , , .

F4IF_FIELD_VALUE_REQUEST

. :

  • tabname - , . .

  • fieldname - tabname, .

  • searchhelp - .

  • multiple_choice - .

.

, fieldval . , ALV, , , , . , . ALV.
ABAP :

DATA:
ls_kunnr    TYPEts_kunnr,
lt_kunnr_retTYPESTANDARDTABLEOFddshretval,
 lr_kunnr    TYPEREFTOddshretval.

CASEe_ucomm.
WHEN'CREATE'.

CALLFUNCTION'F4IF_FIELD_VALUE_REQUEST'
EXPORTING
tabname='ZSD_KUNNR_RS'
fieldname='KUNNR'
searchhelp='ZSD_KUNNR'
multiple_choice=abap_true
TABLES
return_tab=lt_kunnr_ret
EXCEPTIONS
OTHERS=5.

LOOPATlt_kunnr_retREFERENCEINTOlr_kunnr_ret.

READTABLEmt_kunnrTRANSPORTINGNOFIELDS
WITHKEYkunnr=lr_kunnr_ret->fieldval.
IFsy-subrc=0.
CONTINUE.
ENDIF.

ls_kunnr-kunnr=lr_kunnr->fieldval.
ls_kunnr-updkz='I'.

APPENDls_kunnrTOmt_kunnr.

ENDLOOP.
WHENOTHERS.
RETURN.
ENDCASE.

mcl_alv->refresh().