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: 

How to retrieve PO text into form sapscript

Former Member
0 Kudos
202

I need to add "saleperson" of po header text and "info record note" of po item text information into PO print out, which table should i use? i know that the print program is SAPFM06P, i need to modify this program to fullfill those requriement? Thanks!

3 REPLIES 3

Former Member
0 Kudos
109

for purchase order text you have to use READ_TEXT fm.

just click on the text it will show the screen . in menu goto-->header you can see the object name object id text all those information which you have to pass in read_text fm.

regards

shiba dutta

Former Member
0 Kudos
109

Sorry, i am not familiar with SAPScript, could you explain more? Thanks!

Former Member
0 Kudos
109

no you have to use the fn module in your print program . and pass the value to sap script.

data : itab like tline occurs 0 with header line.

CALL FUNCTION 'READ_TEXT'

EXPORTING

CLIENT = SY-MANDT

ID = 'F01'

LANGUAGE = sy-langu

NAME = '4500005937'

OBJECT = 'EKKO'

  • ARCHIVE_HANDLE = 0

  • LOCAL_CAT = ' '

  • IMPORTING

  • HEADER =

TABLES

LINES = itab

  • EXCEPTIONS

  • ID = 1

  • LANGUAGE = 2

  • NAME = 3

  • NOT_FOUND = 4

  • OBJECT = 5

  • REFERENCE_CHECK = 6

  • WRONG_ACCESS_TO_ARCHIVE = 7

  • OTHERS = 8

.

IF SY-SUBRC <> 0.

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

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

ENDIF.

loop at itab.

<pas itab-tdline to script via WRITE_FORM>

endloop.

just check and change the exporting paarameters value as per your po no.

regards

shiba dutta