Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Text from .XML in VF02

Former Member
0 Kudos

Hi!

I need upload data from .XML file and put it data in header text of VF02 transaction.

HAve something to do this?

Thanks Bty.

4 REPLIES 4

Former Member
0 Kudos

Check the FM <b>TEXT_CONVERT_XML_TO_SAP</b>.

Regards,

Prakash.

venkata_ramisetti
Active Contributor
0 Kudos

Hi,

you have to use SAVE_TEXT function module.

Check the code in the program LV70TFS3 (line no 25).

This is the function module that is being called when you save in the header text in the billing document.

You can check this by putting break-point in the debugging here.

Thanks,

Ramakrishna

Message was edited by: Ramakrishna Prasad Ramisetti

0 Kudos

Ok! but i can´t type the data, it have to load when i execute a report.

For example: with a batch input, FM or other thing.

Message was edited by: Beatriz Romero

0 Kudos

Hi,

YOu have to write the logic in your report.

Though your program is batch input, you have to include the below code to add header texts to billing documents.

You just call the bewlo subroutine in your program and pass the billing document number and also change the soubroutine to add header texts.

PERFORM SAVE_TEXT USING V_VBELN.

form save_text USING P_VBELN LIKE VBRK-VBELN.

DATA: LS_XTHEAD LIKE THEADVB.

DATA: BEGIN OF TLINETAB OCCURS 10. "Zeilen Langtext

INCLUDE STRUCTURE TLINE.

DATA: END OF TLINETAB.

LS_XTHEAD-TDOBJECT = 'VBBK'.

LS_XTHEAD-TDSPRAS = 'E'. "SY-LANGU

LS_XTHEAD-TDNAME = P_VBELN.

LS_XTHEAD-TDID = '0002'.

LS_XTHEAD-UPDKZ = 'I'.

LS_XTHEAD-TDLINESIZE = 72.

*Assume that internal table ITAB_HEADER_TEXTS contains header texts

LOOP AT ITAB_HEADER_TEXTS.

TLINETAB-TDFORMAT = '/:'.

TLINETAB-TDLINE = ITAB_HEADER_TEXTS-LINE.

APPEND TLINETAB.

ENDLOOP.

CALL FUNCTION 'SAVE_TEXT'

EXPORTING

HEADER = LS_THEAD

IMPORTING

NEWHEADER = LS_THEAD

TABLES

LINES = TLINETAB

EXCEPTIONS

ID = 1

LANGUAGE = 2

NAME = 3

OBJECT = 4

OTHERS = 5.

IF SY-SUBRC = 0.

ENDIF.

ENDFORM.