|
<< Click to Display Table of Contents >> Navigation: All About ABAP Technique > English > ABAP Tutorial > ABAP Workbench Tools > Enhancement > Business Add-Ins (BADI) > Business Add-Ins (BADI) Examples > ZSHP_DELIVERY_PROC > CHANGE_FIELD_ATTRIBUTES |
method IF_EX_LE_SHP_DELIVERY_PROC~CHANGE_FIELD_ATTRIBUTES .
*****************>> Sample Codes <<********************************
* data: ls_field_attributes type shp_screen_attributes,
* ls_xvbup type vbupvb.
*
** Example 1: The field 'Actual goods-movement date' should not be
** changed by the user
* ls_field_attributes-name = 'LIKP-WADAT_IST'.
* ls_field_attributes-input = 0.
* append ls_field_attributes to ct_field_attributes.
*
** Example 2: The material description should not be changed for a
** certain group of materials after completion of the picking process
* if is_lips-matnr cs 'ZZ'.
* read table it_xvbup into ls_xvbup with key mandt = is_lips-mandt
* vbeln = is_lips-vbeln
* posnr = is_lips-posnr
* binary search.
* if ls_xvbup-kosta eq 'C'.
* ls_field_attributes-name = 'LIKP-WADAT_IST'.
* ls_field_attributes-input = 0.
* append ls_field_attributes to ct_field_attributes.
* endif.
* endif.
****************>> End of Sample Codes <<******************************
data: ls_field_attributes type shp_screen_attributes,
ls_xvbup type vbupvb.
read table it_xvbup into ls_xvbup with key mandt = is_lips-mandt
vbeln = is_lips-vbeln
posnr = is_lips-posnr
binary search.
if sy-tcode ne 'VL03N'.
if ls_xvbup-wbsta ne 'C'.
ls_field_attributes-name = 'LIPS-VRKME'.
ls_field_attributes-input = 1.
append ls_field_attributes to ct_field_attributes.
endif.
endif.
endmethod.