Ansicht
Dokumentation

ABENASSIGN_INCREMENT_ABEXA - ASSIGN INCREMENT ABEXA

ABENASSIGN_INCREMENT_ABEXA - ASSIGN INCREMENT ABEXA

rdisp/max_wprun_time - Maximum work process run time   General Material Data  
This documentation is copyright by SAP AG.
SAP E-Book

Field Symbols, ASSIGN INCREMENT

The examples shows how the statement ASSIGN behaves when the addition INCREMENT is used.

Source Code

Execute

Description

This example shows why the addition INCREMENT in the statement ASSIGN should be used only to access sequences of similar memory areas and that the typing of the field symbol must match the specification in casting_spec. Inappropriate access as shown in the example can produce the following behavior:

  • The first ASSIGN statement returns the value 0 in sy-subrc. word> is assigned the contiguous memory area of struc-int1 and struc-int2 and this is cast to the type c.
  • The second ASSIGN statement terminates with a runtime error because the data type of struc-word does not match the typing of int>.
  • The third ASSIGN statement terminates with a runtime error because the system tries to assign the component struc-stri to word>, but it is deep and the typing of word> is flat, which means that no casting is possible.
  • The fourth ASSIGN statement terminates with a runtime error because the system tries to assign the component struc-stri to int>, but it is deep and the typing of int> is flat, which means that no casting is possible.
  • The fifth and the sixth ASSIGN statements both return the value 4 in sy-subrc because the system tries to assign memory area outside the structure struc specified after RANGE.





RFUMSV00 - Advance Return for Tax on Sales/Purchases   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.

Length: 1935 Date: 20240427 Time: 032015     sap01-206 ( 22 ms )