SAP Reporting Syntax for SET and Full Form

SAP reporting has a programming language called ABAP and here in this post we are going to explore the keyword SET complete usage in the syntax.

SET BLANK LINES ON.
SET BLANKS LINES OFF.

Effect

These statements allow you to specify whether you want to output blank lines or not. Use SET BLANK LINES ON to output blank lines or SET BLANK LINES OFF to suppress them. The default setting is SET BLANK LINES OFF .

Example

When outputting texts, include blank lines:

DATA: BEGIN OF TEXTTAB OCCURS 100,
LINE(72),
END OF TEXTTAB.
SET BLANK LINES ON.
LOOP AT TEXTTAB.
WRITE / TEXTTAB-LINE.
ENDLOOP.
Suppress blank lines again with the statement:
SET BLANK LINES OFF.

SET COUNTRY f.

Effect

Displays the decimal point and date in all subsequent output ( WRITE ) according to the settings specified in the table T005X for the country ID f .The return code value is set as follows:

SY-SUBRC = 0 The statement was successful.
SY_SUBRC = 4 The country ID was not found in table T005X .

The country must exist in table T005X . Otherwise, the formats used are "." for the decimal point and "MM/DD/YYYY" for the date.The special form SET COUNTRY SPACE (or f contains SPACE ) resets the decimal point and date display formats to the setting contained in the current user's master record. In this case, table T005X is not read and the return code value is always 0. The effect of SET COUNTRY is not restricted to the current program, but applies at once to all programs in the current roll area.

Example

When outputting documents, display the decimal point and date in the format specified for the country of the recipient:

DATA: RECEIVER_COUNTRY LIKE T005X-LAND,
DATE LIKE SY-DATUM,
AMOUNT TYPE P DECIMALS 2.
...
SET COUNTRY RECEIVER_COUNTRY.
IF SY-SUBRC = 4.
WRITE: / RECEIVER COUNTRY, ' is unknown'.
ENDIF.
WRITE: / DATE, AMOUNT.

Then, you can say SET COUNTRY SPACE. to display the decimal point and date according to the
specification for the user again.

SET EXTENDED CHECK OFF.
SET EXTENDED CHECK ON.

Effect

You use these statements tot switch the extended syntax check off or on. If the extended syntax check (Transaction SLIN ) reports errors which you do not consider to be errors, and you want to suppress them in future, you can insert the above statements at the appropriate places in the program. A " SET EXTENDED CHECK OFF. " should be followed as soon as possible by a " SET EXTENDED CHECK ON. ", so that the check is only switched off for a short time.

These statements are not interpreted at runtime. You use them only to mark the source code. During the extended syntax check, you can ignore these statements by using the additional function Include suppressed fields.

SET LANGUAGE lg.

Effect

Initializes all text elements TEXT-nnn and all languagespecific text literals 'abcd.....'(nnn) ( nnn = text number) in the specified language. If the text pool does not exist in the desired language, searches in the system language. If the text pool does not exist in the system language either, searches in the secondary language.

SET PARAMETER ID pid FIELD f.

Effect

Writes the contents of the field f to the global SAP memory under the key pid . If the key already contains a value, it is overwritten.The key pid must consist of three characters. You can find a list of the keys (parameters) used in the SAP system description or in the ABAP/4 Development Workbench. The global SAP memory remains available to the user during the entire terminal session. This means that set values are retained when you leave a program. You should not use the SAP memory for temporary storage of values because other modes use the same global memory. If you need a new key (parameter), you can create this in the ABAP/4 Development Workbench.


DATA: REPID(8) VALUE 'RFSCHU01'.
SET PARAMETER ID 'RID' FIELD REPID.

Sets the program name, e.g. for transfer to another program.

Related Posts:



abap sales order management business process


Billing and payment process in erp sap abap

No comments:

Post a Comment