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 create an spool request

Former Member
0 Kudos

Hi guys,

can any one tel me how to write an table content into an spool.

points wil be rewarded

ravi

null

4 REPLIES 4

Clemenss
Active Contributor
0 Kudos

Hi ravi,


parameters:
  p_table type tabname,
data:
  gr_table type ref to data.
field-symbols
  <table> type table.
create object gr_table type table of (p_table).
assign gr_table->* to <table>.
select * into <table> from p_table.
  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      I_STRUCTURE_NAME         = p_table
    TABLES
     t_outtab                             = <table>
    EXCEPTIONS
     program_error                        = 1
    OTHERS                                = 2
        .
  IF sy-subrc                             <> 0.
    MESSAGE ID sy-msgid                   TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.
  gr_tabref                               = lr_tabref.
ENDFORM.                    " alV_display

Start this program in background (F9) and find the table in the spool.

If you want it OO as the subject " how to use method ", you can do do.

Regards,

Clemens

Former Member
0 Kudos

hi Clemens ,

i don't want to use oops i just need to write some internal table contents into an spool from an ordinary report.

ravi

Former Member
0 Kudos

Written by Anon.

Friday, 26 January 2007

Comprehensive list of function modules and descriptions of what they do.....

ABAP_DOCU_DOWNLOAD

Download ABAP documentation in HTML format.

APPL_LOG_DELETE

With this function module you delete logs in the database according to specified selection conditions

APPL_LOG_DISPLAY

With this function module you can analyze logs in the database.

APPL_LOG_DISPLAY_INTERN

With this function module you can analyze logs in local memory, e.g. when you have only collected log records at runtime and do not want to write to the database.

APPL_LOG_INIT

This function module checks whether the specified object or sub-object exists and deletes all existing associated data in local memory.

APPL_LOG_READ_DB

With this function module you read the log data in the database for an object or sub-object according to specified selection conditions.

APPL_LOG_READ_INTERN

With this function module you read all log data whose log class has at least the specified value, from local memory, for the specified object or sub-object.

APPL_LOG_SET_OBJECT

With this function module, you create a new object or sub-object for writing in local memory. With a flag you can control whether the APPL_LOG_WRITE_... messages are written in local memory or are output on the screen.

APPL_LOG_WRITE_DB

With this function module you write all data for the specified object or sub-object in local memory to the database. If the log for the object or sub-object in question is new, the log number is returned to the calling program.

APPL_LOG_WRITE_HEADER

With this function module, you write the log header data in local memory.

APPL_LOG_WRITE_LOG_PARAMETERS

With this function module, you write the name of the log parameters and the associated values for the specified object or sub-object in local memory. If this function module is called repeatedly for the same object or sub-object, the existing parameters are updated accordingly. If you do not specify an object or sub-object with the call, the most recently used is assumed.

APPL_LOG_WRITE_MESSAGE_PARAMS

With this function module you write a single message, with parameters, in local memory. Otherwise the function module works like APPL_LOG_WRITE_SINGLE_MESSAGE.

APPL_LOG_WRITE_MESSAGES

With this function module you write one or more messages, without parameters, in local memory.

APPL_LOG_WRITE_SINGLE_MESSAGE

With this function module you write a single message, without parameters, in local memory. If no header entry has yet been written for the object or sub-object, it is created. If you do not specify an object or sub-object with the call, the most recently used is assumed.

ARFC_GET_TID

will return the IP address of the terminal in hex.

BAL_CNTL_CREATE

Create Control for log display

BAL_CNTL_FREE

Release Control

BAL_CNTL_REFRESH

Put new data in log display

BAL_DB_DELETE

Delete logs from the database

BAL_DB_DEQUEUE

Unlock log

BAL_DB_ENQUEUE

Lock log

BAL_DB_LOAD

Load logs from the database

BAL_DB_LOAD

Load log(s)

BAL_DB_SAVE

Save logs in the database

BAL_DB_SAVE

Save log(s)

BAL_DB_SAVE_PREPARE

Prepare save

BAL_DB_SEARCH

Find logs in the database

BAL_DSP_LOG_DISPLAY

Display messages in memory

BAL_DSP_LOG_DISPLAY

Display Log

BAL_DSP_LOG_PARAMETERS

Either output extended long text or call a callback routine (based on the data in BAL_S_LOG-PARAMS)

BAL_DSP_LOG_TECHNICAL_DATA

Output all log header data

BAL_DSP_MSG_LONGTEXT

Display message long text

BAL_DSP_MSG_PARAMETERS

Either output extended long text or call a callback routine (based on the data in BAL_S_MSG-PARAMS)

BAL_DSP_MSG_TECHNICAL_DATA

Output technical data of a message such as work area, error number, etc.

BAL_DSP_OUTPUT_FREE

End output

BAL_DSP_OUTPUT_INIT

Initialize output

BAL_DSP_OUTPUT_SET_DATA

Set dataset to be displayed

BAL_DSP_PROFILE_DETLEVEL_GET

Message hierarchy in DETLEVEL

BAL_DSP_PROFILE_NO_TREE_GET

Display without tree (fullscreen)

BAL_DSP_PROFILE_POPUP_GET

Display without tree (popup)

BAL_DSP_PROFILE_SINGLE_LOG_GET

Standard profile (SLG1) for one log

BAL_DSP_PROFILE_STANDARD_GET

Standard profile (SLG1) for a lot of logs

BAL_GLB_AUTHORIZATION_GET

Assign authorization

BAL_GLB_AUTHORIZATION_RESET

Reset authorization

BAL_GLB_CONFIG_GET

Read configuration

BAL_GLB_CONFIG_SET

Set configuration

BAL_GLB_MEMORY_EXPORT

Put function group memory in ABAP-MEMORY

BAL_GLB_MEMORY_IMPORT

Get function group memory from ABAP-MEMORY

BAL_GLB_MEMORY_REFRESH

(Partially) reset global memory

BAL_GLB_MEMORY_REFRESH

(Partially) initialize memory

BAL_GLB_MSG_CURRENT_HANDLE_GET

Get current message handle

BAL_GLB_MSG_DEFAULTS_GET

Get message defaults

BAL_GLB_SEARCH_LOG

Find logs in memory

BAL_GLB_SEARCH_MSG

Find messages in memory

BAL_LOG_CREATE

Create log with header data

BAL_LOG_CREATE

Create log with header data

BAL_LOG_DELETE

Delete log (from database also at Save)

BAL_LOG_EXIST

Check existence of a log in memory

BAL_LOG_HDR_CHANGE

Change log header

BAL_LOG_HDR_CHECK

Check log header data for consistency

BAL_LOG_HDR_READ

Read log header and other data

BAL_LOG_MSG_ADD

Put message in log

BAL_LOG_MSG_ADD

Put message in log

BAL_LOG_MSG_CHANGE

Change message

BAL_LOG_MSG_CHANGE

Change message

BAL_LOG_MSG_CHECK

Check message data for consistency

BAL_LOG_MSG_CUMULATE

Add message cumulated

BAL_LOG_MSG_DELETE

Delete message

BAL_LOG_MSG_DELETE

Delete message

BAL_LOG_MSG_EXIST

Check existence of a message in memory

BAL_LOG_MSG_READ

Read message and other data

BAL_LOG_MSG_REPLACE

Replace last message

BAL_LOG_REFRESH

Delete log from memory

BAL_LOG_REFRESH

Delete log from memory

BAL_MSG_DISPLAY_ABAP

Output message as ABAP-MESSAGE

BAL_OBJECT_SELECT

Read Application Log objects table record

BAL_OBJECT_SUBOBJECT

Check whether object and subobject exist and the combination is allowed

BAL_SUBOBJECT_SELECT

Read subobject table record

BP_EVENT_RAISE

Trigger an event from ABAP/4 program

BP_JOBLOG_READ

Fetch job log executions

CHANGEDOCUMENT_READ_HEADERS

Get the change document header for a sales document, and put the results in an internal table.

Example:

CALL FUNCTION 'CHANGEDOCUMENT_READ_HEADERS'

EXPORTING

objectclass = 'EINKBELEG'

objectid = l_objectid

username = space

TABLES

i_cdhdr = lt_cdhdr.

LOOP AT lt_cdhdr WHERE udate IN s_aedat.

CALL FUNCTION 'CHANGEDOCUMENT_READ_POSITIONS'

EXPORTING

changenumber = lt_cdhdr-changenr

TABLES

editpos = lt_editpos.

LOOP AT lt_editpos WHERE fname = 'LOEKZ'

AND f_new = 'L'.

p_desc = text-r01. " Cancel Contract

ENDLOOP.

ENDLOOP.

CHANGEDOCUMENT_READ_POSITIONS

Get the details of a change document, and store them in an internal table. This will tell you whether a field was changed, deleted, or updated.

Example:

CALL FUNCTION 'CHANGEDOCUMENT_READ_HEADERS'

EXPORTING

objectclass = 'EINKBELEG'

objectid = l_objectid

username = space

TABLES

i_cdhdr = lt_cdhdr.

LOOP AT lt_cdhdr WHERE udate IN s_aedat.

CALL FUNCTION 'CHANGEDOCUMENT_READ_POSITIONS'

EXPORTING

changenumber = lt_cdhdr-changenr

TABLES

editpos = lt_editpos.

LOOP AT lt_editpos WHERE fname = 'LOEKZ'

AND f_new = 'L'.

p_desc = text-r01. " Cancel Contract

ENDLOOP.

ENDLOOP.

CLAF_CLASSIFICATION_OF_OBJECTS

Return all of the characteristics for a material

CLOI_PUT_SIGN_IN_FRONT

Move the negative sign from the left hand side of a number, to the right hand side of the number. Note that The result will be left justified (like all character fields), not right justifed as numbers normally are.

CLPB_EXPORT

Export a text table to the clipboard (on presentation server)

CLPB_IMPORT

Import a Text Table from the Clipboard (on presentation server)

COMMIT_TEXT

To load long text into SAP

CONVERSION_EXIT_ALPHA_INPUT

converts any number into a string fill with zeroes, with the number at the extreme right

Example:

input = 123

output = 0000000000000...000000000000123

CONVERSION_EXIT_ALPHA_OUTPUT

converts any number with zeroes right into a simple integer

Example:

input = 00000000000123

output = 123

CONVERT_ABAPSPOOLJOB_2_PDF

convert abap spool output to PDF

CONVERT_OTF

Convert SAP documents (SAPScript) to other types.

Example:

CALL FUNCTION "CONVERT_OTF"

EXPORTING FORMAT = "PDF"

IMPORTING BIN_FILESIZE = FILE_LEN

TABLES OTF = OTFDATA

LINES = PDFDATA

EXCEPTIONS ERR_MAX_LINEWIDTH = 1

ERR_FORMAT = 2

ERR_CONV_NOT_POSSIBLE = 3

OTHERS = 4.

CONVERT_OTFSPOOLJOB_2_PDF

converts a OTF spool to PDF (i.e. Sapscript document)

http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dba5ef35c111d1829f0000e829fbfe/content.htm

Former Member
0 Kudos

Hi,

Just submit the job to the background...that would great a spool request.

Regards,

Himanshu