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 read the content of a buffer

Former Member
0 Kudos

Hi experts,

I have a requirement for getting the content of a buffer when run a FM "RSPO_RETURN_ABAP_SPOOLJOB".

I don't know how to declare a variable to get a buffer, and how to retrieve the content of a buffer.

Any suggestions and information will be appreciated!

Best regards,

Alger Tsai

Edited by: Ying-Chieh Tsai on Apr 1, 2009 4:04 AM

1 ACCEPTED SOLUTION

former_member305388
Active Contributor
0 Kudos

Hi,

The output from the FM will be some data that is put ina box like structure. You can declare an internal table which has single variable with some 300 or 400chars like:

DATA: BEGIN OF tb_input OCCURS 0,

data(300),

END OF tb_input.

And then call the FM.. as:

CALL FUNCTION 'RSPO_RETURN_ABAP_SPOOLJOB'

EXPORTING

rqident = lv_rqident

tables

buffer = tb_input.

After getting the data into tb_input, if you check, it will have first and last entries as ULINE which is helpful forthe box, so you can delete those. And all the entries are preceeded by '|' which is again for box. So, you can delete that one also.. and then supress the preceeding spaces...

Hope you got it...

2 REPLIES 2

former_member305388
Active Contributor
0 Kudos

Hi,

The output from the FM will be some data that is put ina box like structure. You can declare an internal table which has single variable with some 300 or 400chars like:

DATA: BEGIN OF tb_input OCCURS 0,

data(300),

END OF tb_input.

And then call the FM.. as:

CALL FUNCTION 'RSPO_RETURN_ABAP_SPOOLJOB'

EXPORTING

rqident = lv_rqident

tables

buffer = tb_input.

After getting the data into tb_input, if you check, it will have first and last entries as ULINE which is helpful forthe box, so you can delete those. And all the entries are preceeded by '|' which is again for box. So, you can delete that one also.. and then supress the preceeding spaces...

Hope you got it...

0 Kudos

Srinivas Kalluri,

I got it and test it successfully. Thanks a lot.