Ansicht
Dokumentation

ABENDATA_BIT_ABEXA - DATA BIT ABEXA

ABENDATA_BIT_ABEXA - DATA BIT ABEXA

rdisp/max_wprun_time - Maximum work process run time   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
This documentation is copyright by SAP AG.
SAP E-Book

- Bit Operations

This example demonstrates how bit operators are used.

Source Code

Execute

Description

The method main works with four hexadecimal fields of length 4, namely frankfurt, frisco, intersect, and union. These fields can represent sets with a maximum of 32 elements. Here, the basic set is supposed to be the set of all possible airlines from the database table SCARR. Each bit of the corresponding bit sequence represents an airline. To index the airlines, an internal table carrier is created and filled with the abbreviations for the airlines from SCARR. An airline is identified using the internal index of the table carrier.

Depending on the departure city, the SELECT loop across the database table SPFLI sets the bit at the position that matches the line number of the airline in the table carrier, in either in the frankfurt field or in the frisco field. For this purpose, the line number sy-tabix is determined using a READ statement, in which no other fields are transported.

Using the bit operations BIT-AND and BIT-OR, the intersection and union of frankfurt and frisco are created.

In the two DO loops, the bits from intersect and union are read and evaluated individually. For every set position, the airline abbreviations are read from the table carrier using a READ statement.






BAL Application Log Documentation   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.

Length: 1774 Date: 20240329 Time: 083231     sap01-206 ( 45 ms )