15.2.11

SAP Note 22323 - Include document text in document extract

Symptom:

In form F140_DOCU_EXC_01, the attempt was made to include the texts for the document defined using Extras with an Include. This works if you specify the text name as literal for testing purposes. If you try the same thing with variable names, this does not work although the variables are filled correctly. INCLUDE syntax:
INCLUDE OBJECT BELEG ID 0001

Cause and prerequisites

This was not yet programmed.

Solution
Modification for the output of document texts for document extracts:

Solution for Release 2.2 and previous:

Report RFKORI00:

DATA: HLINE LIKE TLINE-TDLINE. "<-NEW

Report RFKORI35:

FORM AUSGABE_BELEGAUSZUG.
.
.
.
PERFORM FORM_START_BA.
IF XSTART = 'J'.

MOVE-CORRESPONDING HBKPF TO BKPF.
PERFORM FILL_BLTXT. "<-NEW

Report RFKORI92:

*---------------------------------------------------------"<-NEW
* FORM FILL_BLTXT "<-NEW
*---------------------------------------------------------"<-NEW FORM FILL_BLTXT. "<-NEW
CLEAR HLINE. "<-NEW
HLINE = 'DEFINE &BLTXT& =''$§%'' '. "<-NEW
REPLACE '$' WITH BKPF-BUKRS INTO HLINE. "<-NEW
REPLACE '§' WITH BKPF-BELNR INTO HLINE. "<-NEW
REPLACE '%' WITH BKPF-GJAHR INTO HLINE. "<-NEW
"<-NEW
CALL FUNCTION 'CONTROL_FORM' "<-NEW
EXPORTING COMMAND = HLINE. "<-NEW
"<-NEW
ENDFORM. "<-NEW

Copy form F140_DOCU_EXC_01, for example, to ZF140_DOCU_EXC_1.

In the main window, insert the following line for those text elements for which the output of the document long texts is wanted:
/: INCLUDE &BLTXT& OBJECT BELEG ID 0001 LANGUAGE &RF140-SPRAS& "<-NEW

For each ID which is used for the document texts, you can insert a corresponding line if the text is to be output.

The text IDs are defined within Customizing via Accounting transactions -> Base parameters -> Texts -> Define text ID for documents.

Solution for Rel. 3.0 and above:

No program changes.

Copy form F140_DOCU_EXC_01 to ZF140_DOCU_EXC_1, for example.

In the main window, insert the following line for those text elements
for which the output of the document long texts is wanted:
/: DEFINE &BLTXT& := '&BKPF-BUKRS&&BKPF-BELNR&&BKPF-GJAHR&' "<-NEW
/: INCLUDE &BLTXT& OBJECT BELEG ID 0001 LANGUAGE &RF140-SPRAS& "<-NEW
For each ID which is used for the document texts, you can insert a
corresponding line if the text is to be output.

The text IDs are defined within Customizing via Accounting transactions -> Base parameters -> Texts -> Define text ID for documents.

Additional key words

RFKORD50

No comments:

Post a Comment