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

Generic object services (GOS) - in Background

Former Member
0 Likes
487

I have gone thru RM Tiwari blog regarding this..

My requirement is like ..

I have a SAPScript and I want to attach this script to GOS in background(in pdf format).

I know how to attach when we have a file on presentation server but donno how to do when we have sapscript.

Below is code :

OPEN_FORM

--

CLOSE_FORM

--

FM - CONVERT_OTFSPOOLJOB_2_PDF

  • -- BELOW CODE TO ATTACH A DOC(pdf in my case) TO GOS.

  • Include for BO macros

INCLUDE : <cntn01>.

-


DATA : LT_DOC_CONTENT type standard table of SOLI-LINE

with header line.

---

OPEN DATASET P_FNAME FOR INPUT IN BINARY MODE.

IF SY-subrc EQ 0.

DO.

READ DATASET P_FNAME INTO LT_DOC_CONTENT.

IF SY-subrc EQ 0.

append LT_DOC_CONTENT.

ELSE.

EXIT.

ENDIF.

ENDDO.

CLOSE DATASET P_FNAME.

ENDIF.

-


-


end----


This code I have seen from R M Tiwari blog. Here the P_FNAME is a file on presentation server. But my case is different. I have sapscript.

My target is to put sapscript data in LT_DOC_CONTENT.

Please suggest...

Thanks..

I have gone thru RM Tiwari blog regarding this..

My requirement is like ..

I have a SAPScript and I want to attach this script to GOS in background(in pdf format).

I know how to attach when we have a file on presentation server but donno how to do when we have sapscript.

Below is code :

OPEN_FORM

--

CLOSE_FORM

--

FM - CONVERT_OTFSPOOLJOB_2_PDF

  • -- BELOW CODE TO ATTACH A DOC(pdf in my case) TO GOS.

  • Include for BO macros

INCLUDE : <cntn01>.

-


DATA : LT_DOC_CONTENT type standard table of SOLI-LINE

with header line.

---

OPEN DATASET P_FNAME FOR INPUT IN BINARY MODE.

IF SY-subrc EQ 0.

DO.

READ DATASET P_FNAME INTO LT_DOC_CONTENT.

IF SY-subrc EQ 0.

append LT_DOC_CONTENT.

ELSE.

EXIT.

ENDIF.

ENDDO.

CLOSE DATASET P_FNAME.

ENDIF.

-


-


end----


This code I have seen from R M Tiwari blog. Here the P_FNAME is a file on presentation server. But my case is different. I have sapscript.

My target is to put sapscript data in LT_DOC_CONTENT.

Please suggest...

Thanks..

1 REPLY 1
Read only

Former Member
0 Likes
351

HI Gaurav,

We need to attach SAPscript to GOS services as PDF. i saw your blog you had same query.

could you please suggest me some solutions.

Thanks

Vinay Varma