Copying abap programs
Dear Pals,
I need some tips from you pals.
My question is we have a development sytem there one transactions is running, I just wanted to copy the program, screens etc for that transaction to disk and move to some other company as it is for support. I had tried but i could not copy the screen painter forms etc.. How can i do it as it is very important.
Your help will be appreciated.
Regards
Omer.
Hi Mohamed,
Here is a program given by someone last week in the forum.
PROGRAM zdown.
*=======================================================================
*=================================
Direct Download Enterprise version 1.2.
THIS SOFTWARE IS FOR PERSONAL USE ONLY.
THIS PROGRAM IS FREEWARE AND IS PROVIDED ON AN AS-IS BASIS WITHOUT
*WARRANTY OF ANY KIND.
THE PROVIDER SPECIFICALLY DISCLAIMS ANY OTHER WARRANTY, EXPRESS OR
*IMPLIED, INCLUDING ANY WARRANTY OF
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
IN NO EVENT SHALL PROVIDER BE LIABLE FOR ANY CONSEQUENTIAL,
PROGRAM DESCRIPTION & USE
Allows a user to download programs, Functions, DD definitions, etc
*to the presentation server. This
version searches recursively for nested includes and function
*modules, and allows you to download
the resulting code as standard text or HTML web pages within a
*suitable directory structure.
You can either search by object name, using wildcards if you wish,
*or a combination of Author and
object name. If you want all objects returned for a particular
*author then select the author name
and choose the most suitable radiobutton. All objects will be
*returned if the fields to the right
hand side of the radiobutton are left completely blank.
Compatible with R/3 Enterprise only, for older versions of SAP you
*will need Direct Download version 5.xx.
This version removes the programming limitations imposed by
*developing across SAP releases 3 to 4.6.
This program is intended to allow a person to keep a visual
*representation of a program for backup
purposes only as has not been designed to allow programs to be
*uploaded to SAP systems.
AUTHOR : E.G.Mellodew
PROGRAM CONTACT : [email protected]
www.dalestech.com
Types
text element structure
TYPES: ttexttable LIKE textpool.
GUI titles
TYPES: tguititle LIKE d347t.
Message classes
TYPES: BEGIN OF tmessage,
arbgb LIKE t100-arbgb,
stext LIKE t100a-stext,
msgnr LIKE t100-msgnr,
text LIKE t100-text,
END OF tmessage.
Screen flow.
TYPES: BEGIN OF tscreenflow,
screen LIKE d020s-dnum,
code LIKE d022s-line,
END OF tscreenflow.
Holds a table\structure definition
TYPES: BEGIN OF tdicttablestructure,
fieldname LIKE dd03l-fieldname,
position LIKE dd03l-position,
keyflag LIKE dd03l-keyflag,
rollname LIKE dd03l-rollname,
domname LIKE dd03l-domname,
datatype LIKE dd03l-datatype,
leng LIKE dd03l-leng,
ddtext LIKE dd04t-ddtext,
END OF tdicttablestructure.
Holds a tables attributes + its definition
TYPES: BEGIN OF tdicttable,
tablename LIKE dd03l-tabname,
tabletitle LIKE dd02t-ddtext,
istructure TYPE tdicttablestructure OCCURS 0,
END OF tdicttable.
Include program names
TYPES: BEGIN OF tinclude,
includename LIKE trdir-name,
includetitle LIKE tftit-stext,
END OF tinclude.
Method
TYPES: BEGIN OF tmethod,
cmpname LIKE vseomethod-cmpname,
descript LIKE vseomethod-descript,
exposure LIKE vseomethod-exposure,
methodkey TYPE string,
END OF tmethod.
Class
TYPES: BEGIN OF tclass,
scanned(1),
clsname LIKE vseoclass-clsname,
descript LIKE vseoclass-descript,
msg_id LIKE vseoclass-msg_id,
exposure LIKE vseoclass-exposure,
state LIKE vseoclass-state,
clsfinal LIKE vseoclass-clsfinal,
r3release LIKE vseoclass-r3release,
imethods TYPE tmethod OCCURS 0,
idictstruct TYPE tdicttable OCCURS 0,
itextelements TYPE ttexttable OCCURS 0,
imessages TYPE tmessage OCCURS 0,
textelementkey TYPE string,
publicclasskey TYPE string,
privateclasskey TYPE string,
protectedclasskey TYPE string,
typesclasskey TYPE string,
exceptionclass TYPE i,
END OF tclass.
function modules
TYPES: BEGIN OF tfunction,
functionname LIKE tfdir-funcname,
functiongroup LIKE enlfdir-area,
includenumber LIKE tfdir-include,
functionmaininclude LIKE tfdir-funcname,
functiontitle LIKE tftit-stext,
topincludename LIKE tfdir-funcname,
progname LIKE tfdir-pname,
programlinkname LIKE tfdir-pname,
messageclass LIKE t100-arbgb,
itextelements TYPE ttexttable OCCURS 0,
iselectiontexts TYPE ttexttable OCCURS 0,
imessages TYPE tmessage OCCURS 0,
iincludes TYPE tinclude OCCURS 0,
idictstruct TYPE tdicttable OCCURS 0,
iguititle TYPE tguititle OCCURS 0,
iscreenflow TYPE tscreenflow OCCURS 0,
END OF tfunction.
TYPES: BEGIN OF tprogram,
progname LIKE trdir-name,
programtitle LIKE tftit-stext,
subc LIKE trdir-subc,
messageclass LIKE t100-arbgb,
imessages TYPE tmessage OCCURS 0,
itextelements TYPE ttexttable OCCURS 0,
iselectiontexts TYPE ttexttable OCCURS 0,
iguititle TYPE tguititle OCCURS 0,
iscreenflow TYPE tscreenflow OCCURS 0,
iincludes TYPE tinclude OCCURS 0,
idictstruct TYPE tdicttable OCCURS 0,
END OF tprogram.
Internal tables
Dictionary object
DATA: idictionary TYPE STANDARD TABLE OF tdicttable WITH HEADER LINE.
Function modules.
DATA: ifunctions TYPE STANDARD TABLE OF tfunction WITH HEADER LINE.
Tree display structure.
DATA: itreedisplay TYPE STANDARD TABLE OF snodetext WITH HEADER LINE.
Message class data
DATA: imessages TYPE STANDARD TABLE OF tmessage WITH HEADER LINE.
Holds a single message class an all of its messages
DATA: isinglemessageclass TYPE STANDARD TABLE OF tmessage WITH HEADER
LINE.
Holds program related data
DATA: iprograms TYPE STANDARD TABLE OF tprogram WITH HEADER LINE.
Classes
DATA: iclasses TYPE STANDARD TABLE OF tclass WITH HEADER LINE.
Table prototypes
DATA: dumidictstructure TYPE STANDARD TABLE OF tdicttablestructure.
DATA: dumitexttab TYPE STANDARD TABLE OF ttexttable.
DATA: dumiincludes TYPE STANDARD TABLE OF tinclude.
DATA: dumihtml TYPE STANDARD TABLE OF string.
DATA: dumiheader TYPE STANDARD TABLE OF string .
DATA: dumiscreen TYPE STANDARD TABLE OF tscreenflow .
DATA: dumiguititle TYPE STANDARD TABLE OF tguititle.
DATA: dumimethods TYPE STANDARD TABLE OF tmethod.
Global objects
DATA: objfile TYPE REF TO cl_gui_frontend_services.
DATA: objruntimeerror TYPE REF TO cx_root.
Constants
CONSTANTS: versionno TYPE string VALUE '1.2'.
CONSTANTS: tables TYPE string VALUE 'TABLES'.
CONSTANTS: like TYPE string VALUE 'LIKE'.
CONSTANTS: type TYPE string VALUE 'TYPE'.
CONSTANTS: typerefto TYPE string VALUE 'TYPE REF TO'.
CONSTANTS: structure TYPE string VALUE 'STRUCTURE'.
CONSTANTS: lowstructure TYPE string VALUE 'structure'.
CONSTANTS: occurs TYPE string VALUE 'OCCURS'.
CONSTANTS: function TYPE string VALUE 'FUNCTION'.
CONSTANTS: callfunction TYPE string VALUE ' CALL FUNCTION'.
CONSTANTS: message TYPE string VALUE 'MESSAGE'.
CONSTANTS: include TYPE string VALUE 'INCLUDE'.
CONSTANTS: lowinclude TYPE string VALUE 'include'.
CONSTANTS: destination TYPE string VALUE 'DESTINATION'.
CONSTANTS: is_table TYPE string VALUE 'T'.
CONSTANTS: is_program TYPE string VALUE 'P'.
CONSTANTS: is_screen TYPE string VALUE 'S'.
CONSTANTS: is_guititle TYPE string VALUE 'G'.
CONSTANTS: is_documentation TYPE string VALUE 'D'.
CONSTANTS: is_messageclass TYPE string VALUE 'MC'.
CONSTANTS: is_function TYPE string VALUE 'F'.
CONSTANTS: is_class TYPE string VALUE 'C'.
CONSTANTS: is_method TYPE string VALUE 'M'.
CONSTANTS: asterix TYPE string VALUE '*'.
CONSTANTS: comma TYPE string VALUE ','.
CONSTANTS: period TYPE string VALUE '.'.
CONSTANTS: dash TYPE string VALUE '-'.
CONSTANTS: true TYPE i VALUE 1.
CONSTANTS: false TYPE i VALUE 0.
CONSTANTS: lt TYPE string VALUE '<'.
CONSTANTS: gt TYPE string VALUE '>'.
CONSTANTS: unix TYPE string VALUE 'UNIX'.
CONSTANTS: non_unix TYPE string VALUE 'not UNIX'.
CONSTANTS: background_colour TYPE string VALUE '#FFFFE0'.
CONSTANTS: colour_white TYPE string VALUE '#FFFFFF'.
CONSTANTS: colour_black TYPE string VALUE '#000000'.
CONSTANTS: colour_yellow TYPE string VALUE '#FFFF00'.
CONSTANTS: comment_colour TYPE string VALUE '#0000FF'.
CONSTANTS: htmlextension TYPE string VALUE 'html'.
CONSTANTS: textextension TYPE string VALUE 'txt'.
Global variables
DATA: statusbarmessage(100).
DATA: forcedexit TYPE i VALUE 0.
DATA: starttime LIKE sy-uzeit.
DATA: runtime LIKE sy-uzeit.
DATA: downloadfileextension TYPE string.
DATA: downloadfolder TYPE string.
DATA: slashseparator TYPE string.
DATA: frontendopsystem TYPE string.
DATA: customernamespace TYPE string.
RANGES: soprogramname FOR trdir-name.
RANGES: soauthor FOR usr02-bname.
RANGES: sotable FOR dd02l-tabname.
RANGES: sofunctionname FOR tfdir-funcname.
RANGES: soclassname FOR vseoclass-clsname.
RANGES: sofunctiongroup FOR enlfdir-area.
FIELD-SYMBOLS: <wadictstruct> TYPE tdicttable.
Selection screen declaration
Author
SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE tblock1.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 5(23) tauth.
PARAMETERS: pauth LIKE usr02-bname MEMORY ID mauth.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 5(36) tpmod.
PARAMETERS: pmod AS CHECKBOX.
SELECTION-SCREEN END OF LINE.
*--- Local objects
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 5(36) t$tmp.
PARAMETERS: p$tmp AS CHECKBOX DEFAULT ''.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN: END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE tblock2.
Tables
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: rtable RADIOBUTTON GROUP r1.
SELECTION-SCREEN COMMENT 5(20) trtable.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 10(18) tptable.
PARAMETERS: ptable LIKE dd02l-tabname MEMORY ID mtable.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 10(79) ttnote.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 10(79) ttnote1.
SELECTION-SCREEN END OF LINE.
Message classes
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: rmess RADIOBUTTON GROUP r1.
SELECTION-SCREEN COMMENT 5(18) tpmes.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 10(18) tmname.
PARAMETERS: pmname LIKE t100-arbgb MEMORY ID mmname.
SELECTION-SCREEN END OF LINE.
Function modules
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: rfunc RADIOBUTTON GROUP r1.
SELECTION-SCREEN COMMENT 5(30) trfunc.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 10(18) tpfname.
PARAMETERS: pfname LIKE tfdir-funcname MEMORY ID mfname.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 10(18) tfgroup.
PARAMETERS: pfgroup LIKE enlfdir-area MEMORY ID mfgroup.
SELECTION-SCREEN END OF LINE.
Classes
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: rclass RADIOBUTTON GROUP r1.
SELECTION-SCREEN COMMENT 5(30) trclass.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 10(18) tpcname.
PARAMETERS: pclname LIKE seoclass-clsname MEMORY ID mcname.
SELECTION-SCREEN END OF LINE.
Programs / includes
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: rprog RADIOBUTTON GROUP r1 DEFAULT 'X'.
SELECTION-SCREEN COMMENT 5(18) tprog.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 10(18) trpname.
PARAMETERS: pprog LIKE trdir-name MEMORY ID mprog.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN SKIP.
Language
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(18) tmlang.
PARAMETERS: pmlang LIKE t100-sprsl DEFAULT 'EN'.
SELECTION-SCREEN END OF LINE.
Package
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(18) tpack.
PARAMETERS: ppack LIKE tadiv-devclass MEMORY ID mpack.
SELECTION-SCREEN END OF LINE.
Customer objects
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(27) tcust.
PARAMETERS: pcust AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN COMMENT 32(25) tnrange.
PARAMETERS: pcname TYPE namespace MEMORY ID mnamespace.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN: END OF BLOCK b2.
Additional things to download.
SELECTION-SCREEN: BEGIN OF BLOCK b3 WITH FRAME TITLE tblock3.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(33) tptext.
PARAMETERS: ptext AS CHECKBOX DEFAULT 'X' MEMORY ID mtext.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(33) tmess.
PARAMETERS: pmess AS CHECKBOX DEFAULT 'X' MEMORY ID mmess.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(33) tpinc.
PARAMETERS: pinc AS CHECKBOX DEFAULT 'X' MEMORY ID minc.
SELECTION-SCREEN COMMENT 40(20) trecc.
PARAMETERS: preci AS CHECKBOX DEFAULT 'X' MEMORY ID mreci.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(33) tpfunc.
PARAMETERS: pfunc AS CHECKBOX DEFAULT 'X' MEMORY ID mfunc.
SELECTION-SCREEN COMMENT 40(20) trecf.
PARAMETERS: precf AS CHECKBOX DEFAULT 'X' MEMORY ID mrecf.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(33) tdoc.
PARAMETERS: pdoc AS CHECKBOX DEFAULT 'X' MEMORY ID mdoc.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(33) tpscr.
PARAMETERS: pscr AS CHECKBOX DEFAULT 'X' MEMORY ID mscr.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(33) tpdict.
PARAMETERS: pdict AS CHECKBOX DEFAULT 'X' MEMORY ID mdict.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(33) tsortt.
PARAMETERS: psortt AS CHECKBOX DEFAULT ' ' MEMORY ID msortt.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN: END OF BLOCK b3.
File details
SELECTION-SCREEN: BEGIN OF BLOCK b4 WITH FRAME TITLE tblock4.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(20) tphtml.
PARAMETERS: phtml RADIOBUTTON GROUP g1 DEFAULT 'X'.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 5(25) tcomm.
PARAMETERS: pcomm AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 5(25) tback.
PARAMETERS: pback AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(20) tptxt.
PARAMETERS: ptxt RADIOBUTTON GROUP g1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(20) tppath.
PARAMETERS: pfolder LIKE rlgrap-filename OBLIGATORY MEMORY ID
mfolder.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN: END OF BLOCK b4.
Display a directory picker window
AT SELECTION-SCREEN ON VALUE-REQUEST FOR pfolder.
DATA: objfile TYPE REF TO cl_gui_frontend_services.
DATA: pickedfolder TYPE string.
DATA: initialfolder TYPE string.
CREATE OBJECT objfile.
IF NOT pfolder IS INITIAL.
initialfolder = pfolder.
ELSE.
objfile->get_temp_directory( CHANGING temp_dir = initialfolder
EXCEPTIONS cntl_error = 1
error_no_gui = 2
not_supported_by_gui = 3 ).
ENDIF.
objfile->directory_browse( EXPORTING initial_folder = initialfolder
CHANGING selected_folder = pickedfolder
EXCEPTIONS cntl_error = 1
error_no_gui = 2
not_supported_by_gui = 3 ).
IF sy-subrc = 0.
pfolder = pickedfolder.
ELSE.
WRITE: / 'An error has occured picking a folder'.
ENDIF.
initialisation
INITIALIZATION.
Parameter screen texts.
tblock1 = 'Author (Optional)'.
t$tmp = 'Programs only: include local objects'.
tblock2 = 'Objects to download'.
tblock3 = 'Additional downloads for progs, func modules and classes'.
tblock4 = 'Download parameters'.
tauth = 'Author name'.
tpmod = 'Include programs modified by author'.
tcust = 'Only customer objects'.
tnrange = 'Alt customer name range'.
trtable = 'Tables / Structures'.
tptable = 'Table name'.
ttnote = 'Please note: tables are stored under the username of the'.
ttnote1 = 'last person who modified them.'.
trfunc = 'Function modules'.
tpfname = 'Function name'.
tfgroup = 'Function group'.
trclass = 'Classes'.
tpcname = 'Class name'.
tmess = 'Message class'.
tmname = 'Class name'.
tmlang = 'Language'.
tprog = 'Programs'.
trpname = 'Program name'.
tpack = 'Package'.
tptxt = 'Text document'.
tphtml = 'HTML document'.
tcomm = 'Highlight comments'.
tback = 'Include background colour'.
tptext = 'Text elements'.
tpinc = 'Include programs'.
trecc = 'Recursive search'.
tppath = 'File path'.
tpmes = 'Message classes'.
tpfunc = 'Function modules'.
tdoc = 'Function module documentation'.
trecf = 'Recursive search'.
tpscr = 'Screens'.
tpdict = 'Dictionary structures'.
tsortt = 'Sort table fields alphabetically'.
Determine the frontend operating system type.
PERFORM determinefrontendopsystem USING slashseparator.
start-of-selection.
START-OF-SELECTION.
PERFORM checkcomboboxes.
PERFORM fillselectionranges.
downloadfolder = pfolder.
starttime = sy-uzeit.
Fool the HTML routines to stop them hyperlinking anything with a space
*in them
IF pcname IS INITIAL.
customernamespace = '^'.
ELSE.
customernamespace = pcname.
ENDIF.
Main program flow.
CASE 'X'.
Select tables
WHEN rtable.
PERFORM retrievetables USING idictionary[]
sotable[]
soauthor[].
Select message classes tables
WHEN rmess.
PERFORM retrievemessageclass USING imessages[]
soauthor[] "Author
pmname "Message classname
pmlang "Message classanguage
pmod. "Modified by author
Select function modules
WHEN rfunc.
IF pfname+0(1) CA asterix.
Restrict the search to customer objects only.
pcust = 'X'.
ENDIF.
IF pfgroup+0(1) CA asterix.
Restrict the search to customer objects only.
pcust = 'X'.
ENDIF.
PERFORM retrievefunctions USING sofunctionname[] "Function name
sofunctiongroup[] "Function group
ifunctions[] "Foundfunctions
pauth "Author
ptext "Get textelements
pscr "Get screens
pcust "Customer data only
customernamespace. "Customer name range
LOOP AT ifunctions.
Find Dict structures, messages, functions, includes etc.
PERFORM scanforadditionalfuncstuff USING ifunctions[]
preci
"Search for includes recursively
precf
"Search for functions recursively
pinc
"Search for includes
pfunc
"Search for functions
pdict
"search for dictionary objects
pmess
"Search for messages
pcust
"Customer data only
customernamespace.
"Customer name range
ENDLOOP.
Select Classes
WHEN rclass.
IF pclname+0(1) CA asterix.
Restrict the search to customer objects only.
pcust = 'X'.
ENDIF.
PERFORM retrieveclasses USING iclasses[]
ifunctions[]
soclassname[] "Class name
soauthor[] "Author
customernamespace "Customer namerange
pmod "Also modifiedby author
pcust "Customer objectonly
pmess "Find messages
ptext "Text Elements
pdict "Dictionarystructures
pfunc "Get functions
pinc "Get includes
precf "Searchrecursively for functions
preci "Searchrecursively for includes
'X' "Searchrecursively for classes
pmlang. "Language
LOOP AT ifunctions.
Find Dict structures, messages, functions, includes etc.
PERFORM scanforadditionalfuncstuff USING ifunctions[]
preci
"Search for includes recursively
precf
"Search for functions recursively
pinc
"Search for includes
pfunc
"Search for functions
pdict
"search for dictionary objects
pmess
"Search for messages
pcust
"Customer data only
customernamespace.
"Customer name range
ENDLOOP.
Select programs
WHEN rprog.
IF pprog+0(1) CA asterix.
Restrict the search to customer objects only.
pcust = 'X'.
ENDIF.
PERFORM retrieveprograms USING iprograms[]
ifunctions[]
soprogramname[] "Program name
soauthor[] "Author
customernamespace "Customer nam range
pmod "Also modifiedby author
pcust "Customer object only
pmess "Find messages
ptext "Text Elements
pdict "Dictionaystructures
pfunc "Get functions
pinc "Get includes
pscr "Get screens
precf "Search recursively for functions
preci "Searchrecursively for includes
p$tmp "local objects
ppack. "Package
ENDCASE.
end-of-selection
END-OF-SELECTION.
IF forcedexit = 0.
Set the file extension and output type of the file
IF ptxt IS INITIAL.
downloadfileextension = htmlextension.
ELSE.
downloadfileextension = textextension.
ENDIF.
Decide what to download
CASE 'X'.
Download tables
WHEN rtable.
IF NOT ( idictionary[] IS INITIAL ).
PERFORM downloadddstructures USING idictionary[]
pfolder
htmlextension
space
psortt.
Free up any memory used for caching HTML versions of tables
LOOP AT idictionary.
FREE MEMORY ID idictionary-tablename.
ENDLOOP.
GET TIME.
runtime = sy-uzeit - starttime.
PERFORM filltreenodetables USING idictionary[]
itreedisplay[]
runtime.
CLEAR idictionary[].
ENDIF.
Download message class
WHEN rmess.
IF NOT ( imessages[] IS INITIAL ).
SORT imessages ASCENDING BY arbgb msgnr.
LOOP AT imessages.
APPEND imessages TO isinglemessageclass.
AT END OF arbgb.
PERFORM downloadmessageclass USING isinglemessageclass[]
imessages-arbgb
pfolder
downloadfileextension
phtml
space
pcomm
customernamespace
pinc
pdict
pmess.
CLEAR isinglemessageclass[].
ENDAT.
ENDLOOP.
GET TIME.
runtime = sy-uzeit - starttime.
PERFORM filltreenodemessages USING imessages[]
itreedisplay[]
runtime.
CLEAR imessages[].
ENDIF.
Download functions
WHEN rfunc.
IF NOT ( ifunctions[] IS INITIAL ).
PERFORM downloadfunctions USING ifunctions[]
pfolder
downloadfileextension
space
pdoc
phtml
pcomm
customernamespace
pinc
pdict
textextension
htmlextension
psortt.
Free up any memory used for caching HTML versions of tables
LOOP AT ifunctions.
LOOP AT ifunctions-idictstruct ASSIGNING <wadictstruct>.
FREE MEMORY ID <wadictstruct>-tablename.
ENDLOOP.
ENDLOOP.
GET TIME.
runtime = sy-uzeit - starttime.
PERFORM filltreenodefunctions USING ifunctions[]
itreedisplay[]
runtime.
CLEAR ifunctions[].
ENDIF.
Download Classes
WHEN rclass.
IF NOT ( iclasses[] IS INITIAL ).
PERFORM downloadclasses USING iclasses[]
ifunctions[]
pfolder
downloadfileextension
htmlextension
textextension
phtml
pcomm
customernamespace
pinc
pdict
pdoc
psortt.
Free up any memory used for caching HTML versions of tables
LOOP AT ifunctions.
LOOP AT ifunctions-idictstruct ASSIGNING <wadictstruct>..
FREE MEMORY ID <wadictstruct>-tablename.
ENDLOOP.
ENDLOOP.
Free up any memory used for caching HTML versions of tables
LOOP AT iprograms.
LOOP AT iprograms-idictstruct ASSIGNING <wadictstruct>..
FREE MEMORY ID <wadictstruct>-tablename.
ENDLOOP.
ENDLOOP.
GET TIME.
runtime = sy-uzeit - starttime.
PERFORM filltreenodeclasses USING iclasses[]
ifunctions[]
itreedisplay[]
runtime.
CLEAR iclasses[].
CLEAR ifunctions[].
ENDIF.
Download programs
WHEN rprog.
IF NOT ( iprograms[] IS INITIAL ).
PERFORM downloadprograms USING iprograms[]
ifunctions[]
pfolder
downloadfileextension
htmlextension
textextension
phtml
pcomm
customernamespace
pinc
pdict
pdoc
psortt.
Free up any memory used for caching HTML versions of tables
LOOP AT ifunctions.
LOOP AT ifunctions-idictstruct ASSIGNING <wadictstruct>..
FREE MEMORY ID <wadictstruct>-tablename.
ENDLOOP.
ENDLOOP.
Free up any memory used for caching HTML versions of tables
LOOP AT iprograms.
LOOP AT iprograms-idictstruct ASSIGNING <wadictstruct>..
FREE MEMORY ID <wadictstruct>-tablename.
ENDLOOP.
ENDLOOP.
GET TIME.
runtime = sy-uzeit - starttime.
PERFORM filltreenodeprograms USING iprograms[]
ifunctions[]
itreedisplay[]
runtime.
CLEAR iprograms[].
CLEAR ifunctions[].
ENDIF.
ENDCASE.
IF NOT ( itreedisplay[] IS INITIAL ).
PERFORM displaytree USING itreedisplay[].
ELSE.
statusbarmessage = 'No items found matching selection criteria'.
PERFORM displaystatus USING statusbarmessage 1.
ENDIF.
ENDIF.
*--- Memory IDs
User name
SET PARAMETER ID 'MAUTH' FIELD pauth.
Table name
SET PARAMETER ID 'MTABLE' FIELD ptable.
Message class
SET PARAMETER ID 'MMNAME' FIELD pmname.
Function
SET PARAMETER ID 'MFNAME' FIELD pfname.
Function group
SET PARAMETER ID 'MFGROUP' FIELD pfgroup.
Class
SET PARAMETER ID 'MCNAME' FIELD pclname.
Program
SET PARAMETER ID 'MPROG' FIELD pprog.
Customer namespace
SET PARAMETER ID 'MNAMESPACE' FIELD pcname.
Folder
SET PARAMETER ID 'MFOLDER' FIELD pfolder.
Package
SET PARAMETER ID 'MPACK' FIELD ppack.
Text element checkbox
SET PARAMETER ID 'MTEXT' FIELD ptext.
Messages checkbox
SET PARAMETER ID 'MMESS' FIELD pmess.
Includes checkbox
SET PARAMETER ID 'MINC' FIELD pinc.
Recursive includes checkbox.
SET PARAMETER ID 'MRECI' FIELD preci.
Functions checkbox
SET PARAMETER ID 'MFUNC' FIELD pfunc.
Recursive functions checkbox
SET PARAMETER ID 'MRECF' FIELD precf.
Function module documntation checkbox
SET PARAMETER ID 'MDOC' FIELD pdoc.
Screens checkbox
SET PARAMETER ID 'MSCR' FIELD pscr.
Dictionary checkbox
SET PARAMETER ID 'MDICT' FIELD pdict.
Sort table ascending checkBox
SET PARAMETER ID 'MSORTT' FIELD psortt.
****************************************SUBROUTINES*******************
checkComboBoxes... Check input parameters
FORM checkcomboboxes.
IF pauth IS INITIAL.
CASE 'X'.
WHEN rtable.
IF ptable IS INITIAL.
statusbarmessage = 'You must enter either a table name or author.'.
ENDIF.
WHEN rfunc.
IF ( pfname IS INITIAL ) AND ( pfgroup IS INITIAL ).
IF pfname IS INITIAL.
statusbarmessage = 'You must enter either a function name or author.'.
ELSE.
IF pfgroup IS INITIAL.
statusbarmessage = 'Must enter either a func gp, or an author name.'.
ENDIF.
ENDIF.
ENDIF.
WHEN rprog.
IF pprog IS INITIAL.
statusbarmessage = 'You must enter either a program name or
author name.'.
ENDIF.
ENDCASE.
Check the user name of the person objects are to be downloaded for
ELSE.
IF pauth = 'SAP*' OR pauth = 'SAP'.
statusbarmessage = 'Sorry cannot download all objects for SAP
standard user'.
ENDIF.
ENDIF.
IF NOT statusbarmessage IS INITIAL.
PERFORM displaystatus USING statusbarmessage 3.
forcedexit = 1.
STOP.
ENDIF.
ENDFORM. "
"checkComboBoxes
fillSelectionRanges... for selection routines
FORM fillselectionranges.
DATA: valuetofind TYPE string.
IF NOT pauth IS INITIAL.
soauthor-sign = 'I'.
soauthor-option = 'EQ'.
soauthor-low = pauth.
APPEND soauthor.
ENDIF.
IF NOT ptable IS INITIAL.
IF NOT pcname IS INITIAL AND NOT ptable+0(1) = '/'.
CONCATENATE pcname ptable INTO valuetofind.
ELSE.
valuetofind = ptable.
ENDIF.
sotable-sign = 'I'.
sotable-option = 'EQ'.
sotable-low = valuetofind.
APPEND sotable.
ENDIF.
IF NOT pfname IS INITIAL.
IF NOT pcname IS INITIAL AND NOT pfname+0(1) = '/'.
CONCATENATE pcname pfname INTO valuetofind.
ELSE.
valuetofind = pfname.
ENDIF.
sofunctionname-sign = 'I'.
PERFORM addoption USING valuetofind sofunctionname-option.
sofunctionname-low = valuetofind.
APPEND sofunctionname.
ENDIF.
IF NOT pfgroup IS INITIAL.
IF NOT pcname IS INITIAL AND NOT pfgroup+0(1) = '/'.
CONCATENATE pcname pfgroup INTO valuetofind.
ELSE.
valuetofind = pfgroup.
ENDIF.
sofunctiongroup-sign = 'I'.
PERFORM addoption USING valuetofind sofunctiongroup-option.
sofunctiongroup-low = valuetofind.
APPEND sofunctiongroup.
ENDIF.
IF NOT pclname IS INITIAL.
IF NOT pcname IS INITIAL AND NOT pclname+0(1) = '/'.
CONCATENATE pcname pclname INTO valuetofind.
ELSE.
valuetofind = pclname.
ENDIF.
soclassname-sign = 'I'.
PERFORM addoption USING valuetofind soclassname-option.
soclassname-low = valuetofind.
APPEND soclassname.
ENDIF.
IF NOT pprog IS INITIAL.
IF NOT pcname IS INITIAL AND NOT pprog+0(1) = '/'.
CONCATENATE pcname pprog INTO valuetofind.
ELSE.
valuetofind = pprog.
ENDIF.
soprogramname-sign = 'I'.
PERFORM addoption USING valuetofind soprogramname-option.
soprogramname-low = valuetofind.
APPEND soprogramname.
ENDIF.
ENDFORM. "
" fillSelectionRanges
addOption... fills the option value of ranges
FORM addoption USING value(valuetofind)
option.
IF valuetofind CA asterix.
option = 'CP'.
ELSE.
option = 'EQ'.
ENDIF.
ENDFORM. "
"addOption
retrieveTables...
Similar Messages
-
How to copy/download all ABAP programs in a text with a single report ?
How to copy/download all ABAP programs in a text format with a single report/TC ?
How to copy/download ABAP source code with all include programs ?....
we need to search & copy all include programs everytime....Hi,
check this link
downloading programs
Regards -
Any abap program for copying transformation in bi 7.0
Hi guys
Could you please let us know is there any abap program to copy transformation in BI 7.0 as we used to have copying update rule in Bw 3.5 or is there any other way ! It is for same datasource , ODS but different source system...
Advance thanksHi,
It is there in support packs. we use to have similar kind of problem but we applied and it works pretty neat.
i think the support pack is sp17 or sp16.
thanks
syed -
Copy Attachement in CV03N via ABAP program
I would like to copy an attachment in CV03N to my C: drive. I can do this by right clicking on the file and selecting Copy To. I need to do this via an ABAP program. Is this possible?
Thanks GaryFound the answer....
CALL FUNCTION 'CVAPI_DOC_VIEW' copies attachment from CV03N to my PC -
Hi everyone!
Is there a way in ABAP to output XML files? Pls. send code/ function module if any.
From ABAP programs, we are sure that we can output TEXT files, but how about XML files?
The significance of this question is related
Currently we are using XI to interface SAP and AMS, this question for ABAP to produce XML file arose, if for example, the XI server is down and we have to still send data from one system to another. IDocs can also produce XML files, pls confirm. Earlier however, we have preferred XI rather than IDocs to do this. Anyway, any idea regarding this scenario will be greatly appreciated.
Thanks and God bless!
CelesteHi,
Please check this sample codes from other thread.
1. itab --- > xml
xml ---> itab.
2. This program will do both.
(just copy paste in new program)
3.
REPORT abc.
*-------------- DATA
DATA : t001 LIKE TABLE OF t001 WITH HEADER LINE.
DATA : BEGIN OF itab OCCURS 0,
a(100) TYPE c,
END OF itab.
DATA: xml_out TYPE string .
DATA : BEGIN OF upl OCCURS 0,
f(255) TYPE c,
END OF upl.
DATA: xmlupl TYPE string .
******************************* FIRST PHASE
******************************* FIRST PHASE
******************************* FIRST PHASE
*------------------ Fetch Data
SELECT * FROM t001 INTO TABLE t001.
*------------------- XML
CALL TRANSFORMATION ('ID')
SOURCE tab = t001[]
RESULT XML xml_out.
CALL FUNCTION 'SCMS_STRING_TO_FTEXT'
EXPORTING
TEXT = xml_out
* IMPORTING
* LENGTH =
TABLES
FTEXT_TAB = itab.
*-------------- Download
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filetype = 'BIN'
filename = 'd:xx.xml'
TABLES
data_tab = itab.
******************************* SECOND PHASE
******************************* SECOND PHASE
******************************* SECOND PHASE
BREAK-POINT.
REFRESH t001.
CLEAR t001.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = 'D:XX.XML'
filetype = 'BIN'
TABLES
data_tab = upl.
LOOP AT upl.
CONCATENATE xmlupl upl-f INTO xmlupl.
ENDLOOP.
*------------------- XML
CALL TRANSFORMATION ('ID')
SOURCE XML xmlupl
RESULT tab = t001[]
BREAK-POINT.
Regards,
Ferry Lianto -
Termination occurred in the ABAP program "RK2APA00_POST" - in
Hi everybody...I have a cancelled job when run only in applications servers , I see a dump "message typeX" , but when job run in Central Instance not cancelled and finish ok.
The name Job is Zcupon and attach to continue dump info , sorry for extended but I want send all information possible.
know if you can add a file with the abstract and not have to paste the text of the dump, thanks for the help they can deliver.
Regards....Freddy Solar....
Errores tiempo ejec. MESSAGE_TYPE_X
Fecha y hora 18.11.2008 06:35:30
Texto breve
The current application triggered a termination with a short dump.
¿Qué ha sucedido?
The current application program detected a situation which really
should not occur. Therefore, a termination with a short dump was
triggered on purpose by the key word MESSAGE (type X).
Anál.errores
Short text of error message:
RFC_ERROR 4 Conversation 93690218 not found / CPIC-CALL: 'ThSA
Technical information about the message:
Message classe...... "KE"
Number.............. 628
Variable 1.......... "RFC_ERROR"
Variable 2.......... 4
Variable 3.......... "Conversation 93690218 not found / CPIC-CALL: 'ThSA"
Variable 4.......... " "
Last error logged in SAP kernel
Component............ "SAP-Gateway"
Place................ "SAP-Gateway on host SCPAPP1 / sapgw03"
Version.............. 2
Error code........... 728
Error text........... "Conversation 93690218 not found"
Description.......... " "
System call.......... " "
Module............... "gwxxrd.c"
Line................. 6156
The error reported by the operating system is:
Error number..... " "
Error text....... " "
Notas para corregir errores
Probably the only way to eliminate the error is to correct the program.
You may able to find an interim solution to the problem
in the SAP note system. If you have access to the note system yourself,
please use the following search criteria:
"RK2APA00_POST" "MESSAGE_TYPE_X"
If you cannot solve the problem yourself, please send the
following documents to SAP:
1. A hard copy print describing the problem.
To obtain this, select the "Print" function on the current screen.
2. A suitable hardcopy prinout of the system log.
To obtain this, call the system log with Transaction SM21
and select the "Print" function to print out the relevant
part.
3. If the programs are your own programs or modified SAP programs,
supply the source code.
To do this, you can either use the "PRINT" command in the editor or
print the programs using the report RSINCL00.
4. Details regarding the conditions under which the error occurred
or which actions and input led to the error.
Entorno sistema
SAP-Release 700
Application server... "SCPAPP1"
Network address...... "10.1.40.130"
Operating system..... "Windows NT"
Release.............. "5.2"
Hardware type........ "4x AMD64 Level"
Character length.... 16 Bits
Pointer length....... 64 Bits
Work process number.. 3
Shortdump setting.... "full"
Database server... "BALTICO"
Database type..... "DB400"
Database name..... "SCP"
Database user ID.. "R3SCPDATA"
Char.set.... "C"
SAP kernel....... 700
created (date)... "Jun 30 2008 00:10:07"
create on........ "NT 5.2 3790 Service Pack 1 x86 MS VC++ 14.00"
Database version. "DB4_53"
Patch level. 167
Patch text.. " "
Database............. "V5R3, V5R4, V6R1"
SAP database version. 700
Operating system..... "Windows NT 5.0, Windows NT 5.1, Windows NT 5.2, Windows
NT 6.0"
Memory consumption
Roll.... 16192
EM...... 159213920
Heap.... 0
Page.... 5660672
MM Used. 145143664
MM Free. 5680112
Usuario y transacción
Client.............. 400
User................ "ZUSRTARJETAS"
Language key........ "S"
Transaction......... " "
Program............. "RK2APA00_POST"
Screen.............. "SAPMSSY0 1000"
Screen line......... 6
Info posición de cancelación
Termination occurred in the ABAP program "RK2APA00_POST" - in
"INSERT_CE4_FLUSH_BUFFERS".
The main program was "ZVI_CUPON ".
In the source code you have the termination point in line 100
of the (Include) program "RKEVRK2A_POST_COMMIT__FIX".
The program "RK2APA00_POST" was started as a background job.
Job Name....... "ZCUPON"
Job Initiator.. "ZUSRTARJETAS"
Job Number..... 02044200
Detalle código fuente
Lín.
Txt.fte.
70
subrc = sy-subrc.
71
CLEAR: g_t_ce4a_dbbuf[], g_t_ce4_dbbuf[].
72
73
case subrc.
74
when 1.
75
Records were to be inserted into the acct.ref. table CE4xxxx_ACCT
76
but the acct. reference numbers were already occupied. Most likely
77
This problem is due to a explicit or implicit change to the
78
number range COPA_OBJ (subobject is the operating concern)
79
e.g. caused by illegally transporting the contents of CO-PA
80
transaction data table contents (CE4xxxx / CE4xxxx_ACCT).
81
Please check OSS for notes with keywords RKEVRK2A_POST, KF216
82
and CE4XXXX_ACCT. If you do not find any applicable notes please
83
log an OSS message.
84
MESSAGE x216(kf) WITH gc_ce4acct_name.
85
86
when 2.
87
Records were to be inserted into the segment table CE4xxxx
88
but the segment numbers were already occupied. Most likely
89
This problem is due to a explicit or implicit change to the
90
number range COPA_OBJ (subobject is the operating concern)
91
e.g. caused by illegally transporting the contents of CO-PA
92
transaction data table contents (CE4xxxx).
93
Please check OSS for notes with keywords RKEVRK2A_POST, KF203
94
and CE4XXXX. If you do not find any applicable notes please
95
log an OSS message.
96
MESSAGE x203(kf).
97
98
when 3 or 4.
99
Communication error in RFC-Call
>>>>>
message x628(ke) with 'RFC_ERROR' subrc msg_text.
101
102
endcase.
103
104
ENDFORM.
105
Edited by: freddy solar on Jan 2, 2009 8:39 PMHi,
it looks like you have some problem with RFC. It stopped on the following line:
* Communication error in RFC-Call
message x628(ke) with 'RFC_ERROR' subrc msg_text.
Ask your basis guy to check it. The job on application server tried to connect to the central instance and it failed. The job run on central instance does not need to make any RFC call. Hence there is no problem in this case.
Regards -
Hi,
I am getting the exception READ_REPORT_LINE_TOO_LONG in my abap program.Given below is the full analysis of the exception and then the program code :-
Error Analysis :-
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_READ_SRC_LINE_TOO_LONG', was
not caught in
procedure "K_KKB_FIELDCAT_MERGE" "(FUNCTION)", nor was it propagated by a
RAISING clause.
Since the caller of the procedure could not have anticipated that the
exception would occur, the current program is terminated.
The reason for the exception is:
There was an attempt to read program "ZANI_TEST_INTERACTIVE_ALV" from the
database.
The READ REPORT statement allows you to copy a program text into an
internal table. The occupied line length in the program text must not
exceed the width of the internal table.
The internal table "\FUNCTION=K_KKB_FIELDCAT_MERGE\DATA=L_ABAP_SOURCE[]" is 72
characters wide. The program line is
91 characters wide.
Program Code :-
*& Report ZANI_TEST_INTERACTIVE_ALV
REPORT ZANI_TEST_INTERACTIVE_ALV.
TABLES: LFA1.
TYPE-POOLS: slis.
DATA: it_lfa1 TYPE TABLE OF lfa1,
wa_lfa1 TYPE lfa1,
it_fieldcat TYPE slis_t_fieldcat_alv.
SELECTION-SCREEN BEGIN OF BLOCK input WITH FRAME TITLE input.
SELECT-OPTIONS: acc_no FOR LFA1-LIFNR.
SELECTION-SCREEN END OF BLOCK input.
START-OF-SELECTION.
IF NOT acc_no IS INITIAL.
SELECT * FROM LFA1
INTO CORRESPONDING FIELDS OF TABLE it_lfa1
WHERE LIFNR IN acc_no.
ELSE.
SELECT * FROM LFA1
INTO CORRESPONDING FIELDS OF TABLE it_lfa1.
ENDIF.
PERFORM form_build_fieldcatalog USING 'IT_LFA1' CHANGING it_fieldcat.
PERFORM form_display_alv USING it_lfa1 it_fieldcat.
*& Form form_build_fieldcatalog
text
-->P_0058 text
<--P_IT_FIELDCAT text
form form_build_fieldcatalog using p_it_tabname TYPE slis_tabname
changing p_it_fieldcat TYPE slis_t_fieldcat_alv.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = sy-repid
I_INTERNAL_TABNAME = p_it_tabname
I_STRUCTURE_NAME =
I_CLIENT_NEVER_DISPLAY = 'X'
I_INCLNAME = sy-repid
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE =
CHANGING
ct_fieldcat = p_it_fieldcat
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 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.
endform. " form_build_fieldcatalog
*& Form form_display_alv
text
-->P_IT_LFA1 text
form form_display_alv using p_it_lfa1 LIKE it_lfa1 p_it_fieldcat TYPE slis_t_fieldcat_alv.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = sy-repid
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT =
IT_FIELDCAT = P_it_fieldcat
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
I_HTML_HEIGHT_TOP = 0
I_HTML_HEIGHT_END = 0
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
IR_SALV_FULLSCREEN_ADAPTER =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = p_it_lfa1
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.
endform. " form_display_alv
Please suggest a solution for this problem.. Thanks in advance.hi,
it is getting because of fieldcat hear ur internal table is having all fields in lfa1, lfa1 is having more fileds alv cont display that much fields at a time . for that u are getting that messgae . u can solve this problem by filling fieldcat table manuvally insted of by FM 'fieldcat_merge'. fill filedcat table some fields which are need to display by manuvally.
thanq,
rajesh.k -
RRi for query using ABAP program
For a report, we are using RRI (jump to target) functionality to see invoices in R/3 system using an ABAP program. I do not have much idea on R/3 systems how invoices are setup in R/3 Dev, test and prod. The ABAP report is done by a backend person. I need to place that in RSBBS. Here, my doubt is that do we need to follow the same procedure for this to move it to production system i.e, first create that RRI and ABAP in respective dev systems and transport both to test and then to Prod? Could anyone please explain me the steps on how this will work in real-time?
Points will be assigned.
ThanksHi,
I am not able to find how the two reports are conncted.
You can check in RSBBS t-code. RRI will be defined here to jump from One Query yo another and many more options.
My work is to copy the parent query a nd do some modification to it. Please let me know how to check and achieve that.
You can do this BEx Query Designer itself.
Regards,
Suman -
Getting run time errors while executing the copied SAP programs
Hi folks,
i want to copy an sap program.after coping i need to change some coding there.then i have to create a new transaction for that.
i am just copying the sap program RQEEAL10(transaction-QA32) to Z_RQEEAL10. it has 4 include programs.i am copying them to z programs like
RQ00MF10 copied to z_RQ00MF10
RQALVF14 copied to z_RQALVF14
RQALVF16 copied to z_RQALVF16
RQALVTOP copied to z_RQALVTOP.
now i am executing that program Z_RQEEAL10.but i am getting run time errors as given below.
<b>runtime error---</b>
The termination occurred in the ABAP program "Z_RQEEAL10" in
"SELECT_FIELDS_MANIP2_F16".
The main program was "Z_RQEEAL10 ".
The termination occurred in line 257 of the source code of the (Include)
program "RQALVF16"
of the source code of program "RQALVF16" (when calling the editor 2570).
--Error in ABAP statement when processing an internal table.
--When changing or deleting one or more lines of the internal table
"\PROGRAM=Z_RQEEAL10\DATA=SELECT_FIELDS" or when inserting in the table
"\PROGRAM=Z_RQEEAL10\DATA=SELECT_FIELDS", 0 was used as
the line index. An index less than or equal to zero is not
allowed.
The error can occur when using the following options:
1. "INDEX idx" for specifying the line number in the table
"\PROGRAM=Z_RQEEAL10\DATA=SELECT_FIELDS"
where you want to change, insert or delete.
2. "FROM idx" for specifying the start index when deleting a line
area from or inserting a line area into the table
"\PROGRAM=Z_RQEEAL10\DATA=SELECT_FIELDS".
3. "TO idx" for specifying the end index when deleting a line
area from or inserting a line area into the table
"\PROGRAM=Z_RQEEAL10\DATA=SELECT_FIELDS".
When the program terminated, the table had 2 lines.
these r the runtime errors what i am getting.where is the problem?i have activated all interface & includes.plz advice.
Thanks & regardsHi Madhu,
I will give you one more check point where you have to give your concentration while copying the standard programs....
Call Customer-Function (Function Exists) if any in the Program when copied will not get executed. Instead you need to call the FM Directly.
one more is also here
You are likely to have some problems with the text-elements and translation that may have been maintained for the original report.
~~Guduri -
Problem in triggering abap program in process chain
i m running a infopackage in a process chain .
this infopackage creates the request in the DSO .
after infopackage i m including the abap program to delete the same request in the process chain .
but the abap program is not getting triggered .i have maintained the variant correctly for the program in the process chain .
what can be done so that the program gets triggered .Hi,
You can trigger you ABASP program from
1. SM64 : copy the ABAP program's Afer event and parambeter and give it there and execute
2.or go to
SE37 >>Program : BP_EVENT_RAISE >> say test execute
and give the same after event and parameter ..and execute
this might trigger your program
Hope this helps you,
Regrads,
shikha -
Client export for ABAP programs, repository objects cross client objects
Hello,
Let me first explain the scenario here. Our Development system crashed we are rebuilding the development system from a client export of the production. Client does not want migration etc so the only way we want to do it is through client export.
Now the question is whether cross client objects can really be imported through client export KT, KO, KX requests?
I thought it was possible but after successfully importinng the client export (which was taken using profile SAP_EXPC) of the Production client all the customizing has been imported but non of the ABAP programs have been imported.
Can anyone explain how this is done and if it is possible?
Steps I performed:
1] Exported Production client with profile SAP_EXPC
2] Imported the 3 requests KT, KO, KX using command line
tp import <KT req> <SID> U2 client=<my client> pf=<profile path>
tp import <KX req> <SID> U2 client=<my client> pf=<profile path>
tp import <KO req> <SID> U2 client=<my client> pf=<profile path>
3] After successful import ran scc7 which finished successfully
Thank youYou can transport client independent customizing, read sap note [24853 - CC-INFO: Client copy, functionality|https://service.sap.com/sap/support/notes/24853].
But you cannot transport abap repository objects (abap programs) with a client copy.
Can you explain what you mean by "Our Development system crashed". If you still can happily do client copies to that system, then i really wonder what you mean by crashed...
Cheers Michael -
Abap program to list the status of BW infocubes
Hi experts,
I am an SAP BW consultant. My BW environment has around 20 cubes and dataloads are carried out every 2 hours. I need to write an ABAP program which when run anytime returns the list of all BW cubes which are reportable at that point in time.Similarly it should also list which cubes are not reportable.
Could you please tell me how I should approach the solution to this requirement.
Thanks AnkitHi ,
Copy paste below mentioed Code and try .
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e0b4bd31-7771-2910-41b4-ff762238a857
Salil.... -
ABAP Program in a Process Chain
Hi!
I create a program in ABAP/4. The program modify an attribute of a Z table I have previously created.
I want to add that program in a process chain of BW which load a cube. The problem is that when I am in in the process chain, the program I have created doesn´t appear in the available programs to select and associate to the process chain.
What I have to do to have the ABAP program available to select and associate to the process chain?
Thanks in advance.Hello Nicolas, there are a few options you can try.
1. Instead of an ABAP program, would you think of incorporating your logic into a function module and then create a generic datasource in R/3 to extract the data from your Z table using the function module. There is a function module in R/3 called <b>RSAX_BIW_GET_DATA_SIMPLE</b> that you can copy and use as a template for your function module. Refer to the following blog:
<a href="/people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module:///people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module
You can also search this forum for RSAX_BIW_GET_DATA_SIMPLE for other ideas.
2. If you really want to use your ABAP program in R/3, then your best solution would be to create a job in R/3 that is triggered by an event. This job will have two steps in it.
Step 1: execute your ABAP program to fill your Z table
Step 2: execute program to notify process chain in BW that ABAP process is complete (sample source below)
In your process chain in BW, your ABAP process should be set up to be
Called From: (RFC destination of your R/3 system)
Scheduled Program: Event (event name in R/3)
You may get a help message about "Requirements for asynchronous processes". This is an informational message telling you that if you call an ABAP program from a remote system, there is no way for BW to monitor it, so you will have to execute a function module (RSPC_ABAP_FINISH) in the R/3 system to inform the process chain when the ABAP program finishes. You can create your own program in R/3 to use this function module:
*& Report Z_RSPC_END_PROCESS *
* Trigger end of an ABAP process in BW process chain.
REPORT z_rspc_end_process.
*"*"Lokale Schnittstelle: Detination BW
*" IMPORTING
*" VALUE(I_VARIANT) TYPE RSPC_VARIANT
*" EXCEPTIONS
*" ALREADY_FINISHED
PARAMETER: p_rfc LIKE rfcdes-rfcdest,
p_var(30) TYPE c.
CALL FUNCTION 'RSPC_ABAP_FINISH'
DESTINATION p_rfc
EXPORTING
I_VARIANT = p_var
EXCEPTIONS
ALREADY_FINISHED = 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.
This program in R/3 will inform your process chain in BW that the ABAP process is finished and BW will continue to next process in the process chain.
Note:
p_rfc would be the RFC destination of your BW system
p_var would be the name of the ABAP process in your process chain
Hope this helps. -
Is there any way through which I can stop download of my ABAP programs???
Dear all,
I want to know is there any way through which I can stop download of my ABAP programs so that no one can download or copy my programs without my permission.
Thanks in Advance
Sachin GautamHi again,
1. In that case we cannot do much.
2. However,
we can use
the exit
SEUED001
(fm is EXIT_SAPLS38E_001)
to restrict the program
in edit mode,display mode
etc etc.
depending upon the PROGRAM NAME.
I hope that serves your purpose.
regards,
amit m. -
Change Name of the ABAP program.
Hi
I need to change the name of an ABAP program,example from zXyyy to ZYxxx. How can i do it with out actually copying to another report.
Thanks,
Ravi.Hi ravi,
go to se80.
you can see object name. i.e your programe name <b>zXyyy</b>
click right button on your prog name and say <b>rename</b>.
give the name what you want and click button rename.
hope this helps you..
reward points for helpfull answers and close the thread if your question is sovled.
regards,
venu.
Maybe you are looking for
-
Creation of new site failed with error
We are using SAP ME 5.2.4.3. Today I have tried to create a new site via Site * User ADMIN Password ***** using the following values: Site: 1301 Description: ODS Training Type: Production Site is Local: Checked Tiime Zone: Europe/Vienna I also set a
-
if zero or one check box is checked then item (NO S)is shown if more than one check box is checked then items will show (show S) <cfparam name="variables.morethanone" default="0"> <cfset count.morethanone= 0> <cfloop index="checkField" list="#form.1#
-
Working with after effects in photoshop?
I want to edit some contents of the after effects of videos like clearning up skin or removing objects in photoshop from after effects - how would this get done? both ar cs5 and both ar 64bit
-
Hello, I am using "SAMS Teach Yourself JAVA In 21 Days". I use one of the given examples (Progress Bar 2, Day 10, Page 278.) When i run it in a web browser in the status bar it says "Loading JAVA Applet Failed". I dont know what im doing wrong... Her
-
Aperture vs. Other...?
Hello people... Admittedly, funds are a bit low at the moment due to the purchase of my new iMac, but when funds allow, i'm considering purchasing Aperture. I just wondered what other people think of it, and whether it's a worthwhile transition or no