10-26-2006 6:49 PM
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.
10-26-2006 6:50 PM
10-26-2006 6:52 PM
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
10-26-2006 7:28 PM
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
10-26-2006 7:48 PM
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.