cancel
Showing results for 
Search instead for 
Did you mean: 

SAVE_TEXT problem

Former Member
0 Kudos

Hi,

I am trying to make a BDC for SAVE_TEXT for transaction code VF02.I used the following code:

LOOP AT IT INTO WA.

IF SY-SUBRC <> 0. EXIT. ENDIF.

PERFORM BDC_DYNPRO USING 'SAPMV60A' '0101'.

PERFORM BDC_FIELD USING 'BDC_CURSOR'

'VBRK-VBELN'.

PERFORM BDC_FIELD USING 'BDC_OKCODE'

'/00'.

PERFORM BDC_FIELD USING 'VBRK-VBELN'

WA-VBELN_001.

PERFORM BDC_DYNPRO USING 'SAPMV60A' '0104'.

PERFORM BDC_FIELD USING 'BDC_CURSOR'

'VBRK-FKART'.

PERFORM BDC_FIELD USING 'BDC_OKCODE'

'=KFDE'.

PERFORM BDC_DYNPRO USING 'SAPMV60A' '6001'.

PERFORM BDC_FIELD USING 'BDC_OKCODE'

'=KFTE'.

PERFORM BDC_DYNPRO USING 'SAPMV60A' '6001'.

PERFORM BDC_FIELD USING 'BDC_OKCODE'

'=SICH'.

PERFORM BDC_FIELD USING 'LV70T-SPRAS'

'E'.

  • initial data.

THEAD-TDOBJECT = 'VBBK'.

THEAD-TDID = '0002'.

THEAD-TDSPRAS = SY-LANGU.

THEAD-TDNAME = '90000080'.

  • Lines

TLINE-TDFORMAT = '*'.

TLINE-TDLINE = 'Test data'.

APPEND TLINE.

CALL FUNCTION 'SAVE_TEXT'

EXPORTING

HEADER = THEAD

SAVEMODE_DIRECT = 'X'

TABLES

LINES = TLINE

EXCEPTIONS

ID = 1

LANGUAGE = 2

NAME = 3

OBJECT = 4

OTHERS = 5.

IF SY-SUBRC = 0.

WRITE: / 'Successful'.

COMMIT WORK.

ENDIF.

PERFORM BDC_TRANSACTION USING 'VF02'.

ENDLOOP.

PERFORM CLOSE_GROUP.

After doing this,data is getting saved in tables STXH and STXL but when i tried to see the saved text in transaction code VF02.I am unable to see the saved text.

Please help me out.

Regards,

Praveen

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

if you are trying to create a new billing document.. once the document is saved get the document number in the MESSEage tab and inside the success loop use the save_text function module by passing the document details in the function module...

Thanks

Krishna Dussa

Answers (2)

Answers (2)

Former Member
0 Kudos

Answered

Sandra_Rossi
Active Contributor
0 Kudos

We usually (*) don't need to use SAVE_TEXT along with a BDC.

Could you tell us why you are talking about them at the same time, and what are you trying to achieve with the BDC?

(*) but that happens sometimes that both are required, depending on the transaction