ABAVN-> Multiply assets doesn’t update ANLN2 | FM ‘AMDP_TABLE_CONTROL_FOR_POSTING’

Hi,experts how to fill ANLN2 field at ABAVN t-code.

I found an FM ‘ AMDP_TABLE_CONTROL_FOR_POSTING’. 
Here  LT_FIAA_BUS1022_WF – is a displayed table and i need to change ANLN2 field to ‘0000’ if it’s initial.
In code i found this condition, but this field  not mentioned at MODIFY statement lately.
How to add it. Or mb it’s possible to change it at another block.

 USER_COMMAND_0110 .

 

 

IF U_FCODE = GC_FCSAVE OR
U_FCODE = GC_FCSHWI OR
U_FCODE = GC_FCSHWD OR
U_FCODE = GC_FCRTRN OR
U_FCODE = SPACE.

CALL FUNCTION ‘STC1_GET_DATA’
EXPORTING TAB_HANDLE = GD_HANDL_TC1
TABLES TABLE = LT_FIAA_BUS1022_WF.
ENDIF.

* Bezeichnungen der Anlagen besorgen
IF U_FCODE = SPACE.
CALL FUNCTION ‘AMSP_ASSET_READ_FROM_BUFFER’
TABLES T_ANTS = LT_ANTS.

LOOP AT LT_FIAA_BUS1022_WF.
* IF LT_FIAA_BUS1022_WF-TXT50 IS INITIAL. < 1241474
IF LT_FIAA_BUS1022_WF-BUKRS IS INITIAL.
LT_FIAA_BUS1022_WF-BUKRS = RAIFP2-BUKRS.
ENDIF.
IF LT_FIAA_BUS1022_WF-ANLN2 IS INITIAL.
LT_FIAA_BUS1022_WF-ANLN2 = ‘0000’.
ENDIF.
READ TABLE LT_ANTS
WITH KEY BUKRS = LT_FIAA_BUS1022_WF-BUKRS
ANLN1 = LT_FIAA_BUS1022_WF-ANLN1
ANLN2 = LT_FIAA_BUS1022_WF-ANLN2.
IF SY-SUBRC = 0.
LT_FIAA_BUS1022_WF-TXT50 = LT_ANTS-TXT50.
ENDIF.
* ENDIF. < 1241474

IF LT_FIAA_BUS1022_WF-PANL1 <> SPACE AND
LT_FIAA_BUS1022_WF-PATXT IS INITIAL.
LT_FIAA_BUS1022_WF-PBUKR = RAIFP3-BUKRS.
IF LT_FIAA_BUS1022_WF-PANL2 IS INITIAL.
LT_FIAA_BUS1022_WF-PANL2 = ‘0000’.
ENDIF.
READ TABLE LT_ANTS
WITH KEY BUKRS = LT_FIAA_BUS1022_WF-PBUKR
ANLN1 = LT_FIAA_BUS1022_WF-PANL1
ANLN2 = LT_FIAA_BUS1022_WF-PANL2.
IF SY-SUBRC = 0.
LT_FIAA_BUS1022_WF-PATXT = LT_ANTS-TXT50.
ENDIF.
ENDIF.
MODIFY LT_FIAA_BUS1022_WF TRANSPORTING TXT50 PATXT.
ENDLOOP.

CALL FUNCTION ‘STC1_PUT_DATA’
EXPORTING HANDLE = GD_HANDL_TC1
TABLES TABLE = LT_FIAA_BUS1022_WF.
ENDIF.

 

 

 

Scroll to Top