Application Development and Automation 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: 
Read only

smartform XML output in HTTP.

Former Member
0 Likes
534

Hi everyone, plz help me to solve this issue, I am converting my XML output in HTTP. but its showing only layout not output, which is coming in form of XML. actually My requirement to transmitt invoice in form of XML when i am doing this thing my XML output is creating spool and save their when i copy that spool and try to change in any another format, i am getting only smartform layout not output data. please tell me how i can get my output in form of http. , pdf, or any another readable form.

Thanks & Regards,

Vimarsh B.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
500

If u r able to create a apool from S form,

U can use this code to create a PDF from that sppol

CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'

EXPORTING

RQIDENT = GS_OTF_SPOOLS-RQIDENT

TABLES

BUFFER = GT_TEMP_TABLE

EXCEPTIONS

NO_SUCH_JOB = 1

JOB_CONTAINS_NO_DATA = 2

SELECTION_EMPTY = 3

NO_PERMISSION = 4

CAN_NOT_ACCESS = 5

READ_ERROR = 6

TYPE_NO_MATCH = 7.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

CALL FUNCTION 'CONVERT_OTF_2_PDF'

EXPORTING

USE_OTF_MC_CMD = 'X'

IMPORTING

BIN_FILESIZE = SIZE

TABLES

OTF = GT_OTF_TABLE

DOCTAB_ARCHIVE = DOC

LINES = GT_PDF

EXCEPTIONS

ERR_CONV_NOT_POSSIBLE = 1

ERR_OTF_MC_NOENDMARKER = 2

OTHERS = 3.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

3 REPLIES 3
Read only

Former Member
0 Likes
501

If u r able to create a apool from S form,

U can use this code to create a PDF from that sppol

CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'

EXPORTING

RQIDENT = GS_OTF_SPOOLS-RQIDENT

TABLES

BUFFER = GT_TEMP_TABLE

EXCEPTIONS

NO_SUCH_JOB = 1

JOB_CONTAINS_NO_DATA = 2

SELECTION_EMPTY = 3

NO_PERMISSION = 4

CAN_NOT_ACCESS = 5

READ_ERROR = 6

TYPE_NO_MATCH = 7.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

CALL FUNCTION 'CONVERT_OTF_2_PDF'

EXPORTING

USE_OTF_MC_CMD = 'X'

IMPORTING

BIN_FILESIZE = SIZE

TABLES

OTF = GT_OTF_TABLE

DOCTAB_ARCHIVE = DOC

LINES = GT_PDF

EXCEPTIONS

ERR_CONV_NOT_POSSIBLE = 1

ERR_OTF_MC_NOENDMARKER = 2

OTHERS = 3.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

Read only

0 Likes
500

after the above code, u have to use GUI download to download the pdf on to the desktop

Read only

0 Likes
500

Hi Narendra,

Thanks for your answer one more thing i want to ask if i want to convert my spool xml directly to http, what i have to do. because some time i am getting data duplication. how to stop duplication of data and get my xml in particular format because in pdf also its not coming in particular format.

Thanks & Regards,

Vimarsh B.