Local backup of ABAP Program
Hi all,
We have a sandbox that is refreshed monthly, I had an abap program which I forgot to backup from that sandox system, and it got refreshed. Is there a way to get the program back? Is there a local version stored locally in temp files?
I have searched a lot and did not find a solution to my problem.
I'll appreciate any help.
Thanks.
Thanks for the help I guess
Only the database has been refreshed but I have access to the server's file system, but I dont know which directory to look for the programs. Do you have any tips?
Similar Messages
-
How use a proxy consumer web service in ABAP Program with local interface
I generate a proxy class based on a WSDL file.
I want to use this class in an abap programm without a connection but using XML files in local.
I see with the class CL_PROXY_LOCAL_ADAPTER that it is possible to execute without connection but for use this, it's necessary to use the method REGISTER.
This method have two parameters : Class Name and Interface Name.
Class name is the name of my proxy class, but I don't know how to find the interface name.
I think that a local interface is needed to generate but I don't know how to generate in interface with entries in SPROXSIG table ?
Could you help me ?Check out the following links to see if it meets your needs.. Has examples to call a ABAP proxy (that consumes a webservice) from ABAP program...
http://help.sap.com/saphelp_nw04/helpdata/en/bf/d005244e9d1d4d92b2fe7935556b4c/frameset.htm (webservices ->webservices toolset -> examples)
http://help.sap.com/saphelp_dm40/helpdata/en/1a/b69d427cab0831e10000000a1550b0/frameset.htm -
ABAP Program for set local process chain failed
I would like to execute ABAP Program in local process chain. If the condition is in the pre-defined bussiness rule, local process chain is set to fail.
Currently I use ABAP and Raise Message Error = Message Type E for cancel program. After program is cancelled, local process chain don't know its status, wait for job SAP_CCMS_MONI_BATCH_DP to determine status of process chain and then further execute subsequent process.
I 'm not sure that our solution is right or not about set process chain to fail via ABAP. Please suggest us if there are other solution to set process chain as failed.Hi.
Plz see my answer to similar question in [this thread|Re: Manage a message at the end of process chain on Web planning Application].
Regards. -
Hi Everyone,
I need your help.
I am working on a tool that can backup the ABAP source codes and tables.
I am using the READ REPORT to get the source code and store the result in a text file,
my question is, if I want to give this tool to a client , what kind of authorization a user need to be able
to run the tool and backup all the ABAP programs of the SAP system ?
Can any ABAP developer use the "READ REPORT" and read the source code written by
other ABAP developer ?
ThanksREPORT zdownload.
TABLES: trdir.
SELECT-OPTIONS name FOR trdir-name NO INTERVALS.
PARAMETERS: path TYPE c LENGTH 50 DEFAULT 'C:\USERS\SCHWAB\PROGRAMS'.
START-OF-SELECTION.
LOOP AT name.
PERFORM download_program USING name-low.
ENDLOOP.
FORM download_program
FORM download_program USING value(i_name) LIKE trdir-name.
DATA: BEGIN OF lt_data_tab OCCURS 0,
line(72),
END OF lt_data_tab,
l_filename TYPE string.
CONCATENATE path '\' i_name '.TXT' INTO l_filename.
READ REPORT i_name INTO lt_data_tab.
IF lines( lt_data_tab ) = 0.
MESSAGE e001(uc) WITH TEXT-TK0.
ENDIF.
CALL METHOD cl_gui_frontend_services=>gui_download
EXPORTING
filename = l_filename
CHANGING
data_tab = lt_data_tab[]
EXCEPTIONS
OTHERS = 0.
IF sy-subrc <> 0.
MESSAGE e001(uc) WITH TEXT-K01.
ENDIF.
ENDFORM. "download_program
AT SELECTION-SCREEN ON name.
check name-low <> space.
SELECT SINGLE * FROM trdir WHERE name = name-low.
IF sy-subrc <> 0.
MESSAGE e001(uc) WITH TEXT-K02.
ENDIF. -
Download/Upload ABAP Programs, screens, texts, etc
Hi Experts,
Is there any standard program or any tool by which we can download/ upload ABAP programs, sapscripts, Screens, text-elements, Webdynpro for ABAP applications to a local file????
The Download to local server option in SE38 just gives a text copy of program without any screens, text eleemnts, etc which is not as per my requirement.
Points will be rewarded.
Regards,
Mansi.use This
REPORT ZDOWNLOAD.
*& Report ZDOWNLAOD
I N F O R M A T I O N *
Module :
FUNCTIONAL :
Developer :
Functional Spec# :
Date Of Creation :
Transport Request# :
Program NAME :
Transaction Code :
DEVELOPMENT CLASS :
DESCRIPTION :
Change History
FUNCTIONAL :
Developer :
Functional Spec# :
Date Of Change :
Transport Request# :
Change DESCRIPTION :
*======================================================================================================================
Direct Download Enterprise version 1.3.1.
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 THE PROVIDER BE LIABLE FOR ANY CONSEQUENTIAL, INDIRECT, SPECIAL OR INCIDENTAL DAMAGES, EVEN IF PROVIDER
HAS BEEN ADVISED BY CLIENT OF THE POSSIBILITY OF SUCH POTENTIAL LOSS OR DAMAGE.
CLIENT AGREES TO HOLD PROVIDER HARMLESS FROM AND AGAINST ANY AND ALL CLAIMS, LOSSES, LIABILITIES AND EXPENSES. BY
INSTALLING OR RUNNING THIS PROGRAM YOU ARE AGREEING TO THE TERMS AND CONDITONS STATED ABOVE.
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.
In order to be able to download files to the SAP server you must first set up a logical filepath within transaction
'FILE', or use an existing one. You must also create a external operating system command in SM69 called ZMKDIR. This
will then be used to create any directories needed on the SAP server
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 cont
SAP Tables
TABLES: TRDIR, SEOCLASS, TFDIR, ENLFDIR, DD02L.
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.
Exception class texts
TYPES: BEGIN OF TCONCEPT,
CONSTNAME TYPE STRING,
CONCEPT TYPE SOTR_CONC,
END OF TCONCEPT.
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,
ICONCEPTS TYPE TCONCEPT 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 of paths created on the SAP server
DATA: ISERVERPATHS TYPE STANDARD TABLE OF STRING 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.
DATA: DUMICONCEPTS TYPE STANDARD TABLE OF TCONCEPT.
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.3.1'.
CONSTANTS: TABLES TYPE STRING VALUE 'TABLES'.
CONSTANTS: TABLE TYPE STRING VALUE 'TABLE'.
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: SERVERSLASHSEPARATOR TYPE STRING.
DATA: FRONTENDSLASHSEPARATOR TYPE STRING.
DATA: SLASHSEPARATORTOUSE TYPE STRING.
DATA: SERVERFILESYSTEM TYPE FILESYS_D.
DATA: SERVERFOLDER TYPE STRING.
DATA: FRONTENDOPSYSTEM TYPE STRING.
DATA: SERVEROPSYSTEM TYPE STRING.
DATA: CUSTOMERNAMESPACE TYPE STRING.
RANGES: SOPROGRAMNAME FOR TRDIR-NAME.
RANGES: SOAUTHOR FOR USR02-BNAME.
RANGES: SOTABLENAMES 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(15) TRTABLE.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 10(15) TPTABLE.
SELECT-OPTIONS: SOTABLE FOR DD02L-TABNAME.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 10(79) TTNOTE.
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(15) TPFNAME.
SELECT-OPTIONS: SOFNAME FOR TFDIR-FUNCNAME.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 10(15) TFGROUP.
SELECT-OPTIONS: SOFGROUP FOR ENLFDIR-AREA.
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(15) TPCNAME.
SELECT-OPTIONS: SOCLASS FOR SEOCLASS-CLSNAME.
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(15) TRPNAME.
SELECT-OPTIONS: SOPROG FOR TRDIR-NAME.
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(29) TCOMM.
PARAMETERS: PCOMM AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 5(29) 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.
Download to SAP server
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(25) TSERV.
PARAMETERS: PSERV RADIOBUTTON GROUP G2.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 8(20) TSPATH.
PARAMETERS: PLOGICAL LIKE FILENAME-FILEINTERN MEMORY ID MLOGICAL.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN COMMENT /28(60) TSDPATH.
Download to PC
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(25) TPC.
PARAMETERS: PPC RADIOBUTTON GROUP G2 DEFAULT 'X'.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 8(20) TPPATH.
PARAMETERS: PFOLDER LIKE RLGRAP-FILENAME MEMORY ID MFOLDER.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN: END OF BLOCK B4.
Display options
SELECTION-SCREEN: BEGIN OF BLOCK B5 WITH FRAME TITLE TBLOCK5.
Display final report
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(33) TREP.
PARAMETERS: PREP AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN END OF LINE.
Display progress messages
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(33) TPROMESS.
PARAMETERS: PPROMESS AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN: END OF BLOCK B5.
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.
IF SY-BATCH IS INITIAL.
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.
ENDIF.
AT SELECTION-SCREEN.
CASE 'X'.
WHEN PPC.
IF PFOLDER IS INITIAL.
User must enter a path to save to
MESSAGE E000(OO) WITH 'You must enter a file path'.
ENDIF.
WHEN PSERV.
IF PLOGICAL IS INITIAL.
User must enter a logical path to save to
MESSAGE E000(OO) WITH 'You must enter a logical file name'.
ENDIF.
ENDCASE.
AT SELECTION-SCREEN ON PLOGICAL.
IF NOT PSERV IS INITIAL.
CALL FUNCTION 'FILE_GET_NAME'
EXPORTING
LOGICAL_FILENAME = PLOGICAL
IMPORTING
FILE_NAME = SERVERFOLDER
EXCEPTIONS
FILE_NOT_FOUND = 1
OTHERS = 2.
IF SY-SUBRC = 0.
IF SERVERFOLDER IS INITIAL.
MESSAGE E000(OO) WITH 'No file path returned from logical filename'.
ELSE.
Path to display on the selection screen
TSDPATH = SERVERFOLDER.
Remove the trailing slash off the path as the subroutine buildFilename will add an extra one
SHIFT SERVERFOLDER RIGHT DELETING TRAILING SERVERSLASHSEPARATOR.
SHIFT SERVERFOLDER LEFT DELETING LEADING SPACE.
ENDIF.
ELSE.
MESSAGE E000(OO) WITH 'Logical filename does not exist'.
ENDIF.
ENDIF.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR SOPROG-LOW.
CALL FUNCTION 'REPOSITORY_INFO_SYSTEM_F4'
EXPORTING
OBJECT_TYPE = 'PROG'
OBJECT_NAME = SOPROG-LOW
SUPPRESS_SELECTION = 'X'
USE_ALV_GRID = ''
WITHOUT_PERSONAL_LIST = ''
IMPORTING
OBJECT_NAME_SELECTED = SOPROG-LOW
EXCEPTIONS
CANCEL = 1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR SOPROG-HIGH.
CALL FUNCTION 'REPOSITORY_INFO_SYSTEM_F4'
EXPORTING
OBJECT_TYPE = 'PROG'
OBJECT_NAME = SOPROG-HIGH
SUPPRESS_SELECTION = 'X'
USE_ALV_GRID = ''
WITHOUT_PERSONAL_LIST = ''
IMPORTING
OBJECT_NAME_SELECTED = SOPROG-HIGH
EXCEPTIONS
CANCEL = 1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR SOCLASS-LOW.
CALL FUNCTION 'F4_DD_ALLTYPES'
EXPORTING
OBJECT = SOCLASS-LOW
SUPPRESS_SELECTION = 'X'
DISPLAY_ONLY = ''
ONLY_TYPES_FOR_CLIFS = 'X'
IMPORTING
RESULT = SOCLASS-LOW.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR SOCLASS-HIGH.
CALL FUNCTION 'F4_DD_ALLTYPES'
EXPORTING
OBJECT = SOCLASS-HIGH
SUPPRESS_SELECTION = 'X'
DISPLAY_ONLY = ''
ONLY_TYPES_FOR_CLIFS = 'X'
IMPORTING
RESULT = SOCLASS-HIGH.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR SOFNAME-LOW.
CALL FUNCTION 'REPOSITORY_INFO_SYSTEM_F4'
EXPORTING
OBJECT_TYPE = 'FUNC'
OBJECT_NAME = SOFNAME-LOW
SUPPRESS_SELECTION = 'X'
USE_ALV_GRID = ''
WITHOUT_PERSONAL_LIST = ''
IMPORTING
OBJECT_NAME_SELECTED = SOFNAME-LOW
EXCEPTIONS
CANCEL = 1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR SOFNAME-HIGH.
CALL FUNCTION 'REPOSITORY_INFO_SYSTEM_F4'
EXPORTING
OBJECT_TYPE = 'FUNC'
OBJECT_NAME = SOFNAME-HIGH
SUPPRESS_SELECTION = 'X'
USE_ALV_GRID = ''
WITHOUT_PERSONAL_LIST = ''
IMPORTING
OBJECT_NAME_SELECTED = SOFNAME-HIGH
EXCEPTIONS
CANCEL = 1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR SOFGROUP-LOW.
CALL FUNCTION 'REPOSITORY_INFO_SYSTEM_F4'
EXPORTING
OBJECT_TYPE = 'FUGR'
OBJECT_NAME = SOFGROUP-LOW
SUPPRESS_SELECTION = 'X'
USE_ALV_GRID = ''
WITHOUT_PERSONAL_LIST = ''
IMPORTING
OBJECT_NAME_SELECTED = SOFGROUP-LOW
EXCEPTIONS
CANCEL = 1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR SOFGROUP-HIGH.
CALL FUNCTION 'REPOSITORY_INFO_SYSTEM_F4'
EXPORTING
OBJECT_TYPE = 'FUGR'
OBJECT_NAME = SOFGROUP-HIGH
SUPPRESS_SELECTION = 'X'
USE_ALV_GRID = ''
WITHOUT_PERSONAL_LIST = ''
IMPORTING
OBJECT_NAME_SELECTED = SOFGROUP-HIGH
EXCEPTIONS
CANCEL = 1.
initialisation
INITIALIZATION.
Parameter screen texts.
TBLOCK1 = 'Author (Optional)'.
T$TMP = 'Programs only: include local objects'.
TBLOCK2 = 'Objects to download'.
TBLOCK3 = 'Additional downloads for programs, function modules and classes'.
TBLOCK4 = 'Download parameters'.
TBLOCK5 = 'Display options'.
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 = 'Note: tables are stored under the username of the 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'.
TSPATH = 'Logical file name'.
TPMES = 'Message classes'.
TPFUNC = 'Function modules'.
TDOC = 'Function module documentation'.
TRECF = 'Recursive search'.
TPSCR = 'Screens'.
TPDICT = 'Dictionary structures'.
TSORTT = 'Sort table fields alphabetically'.
TSERV = 'Download to server'.
TPC = 'Download to PC'.
TREP = 'Display download report'.
TPROMESS = 'Display progress messages'.
Determine the frontend operating system type.
IF SY-BATCH IS INITIAL.
PERFORM DETERMINEFRONTENDOPSYSTEM USING FRONTENDSLASHSEPARATOR FRONTENDOPSYSTEM.
ENDIF.
PERFORM DETERMINESERVEROPSYSTEM USING SERVERSLASHSEPARATOR SERVERFILESYSTEM SERVEROPSYSTEM.
Determine if the external command exists. If it doesn't then disable the server input field
PERFORM FINDEXTERNALCOMMAND.
start-of-selection.
START-OF-SELECTION.
PERFORM CHECKCOMBOBOXES.
PERFORM FILLSELECTIONRANGES.
STARTTIME = SY-UZEIT.
Don't display status messages if we are running in the background
IF NOT SY-BATCH IS INITIAL.
PPROMESS = ''.
ENDIF.
Fool the HTML routines to stop them hyperlinking anything with a space in them
IF PCNAME IS INITIAL.
CUSTOMERNAMESPACE = '^'.
ELSE.
CUSTOMERNAMESPACE = PCNAME.
ENDIF.
Determine which operating slash and download directory to use
CASE 'X'.
WHEN PPC.
SLASHSEPARATORTOUSE = FRONTENDSLASHSEPARATOR.
DOWNLOADFOLDER = PFOLDER.
WHEN PSERV.
SLASHSEPARATORTOUSE = SERVERSLASHSEPARATOR.
DOWNLOADFOLDER = SERVERFOLDER.
ENDCASE.
Main program flow.
CASE 'X'.
Select tables
WHEN RTABLE.
PERFORM RETRIEVETABLES USING IDICTIONARY[]
SOTABLENAMES[]
SOAUTHOR[].
Select message classes tables
WHEN RMESS.
PERFORM RETRIEVEMESSAGECLASS USING IMESSAGES[]
SOAUTHOR[] "Author
PMNAME "Message class name
PMLANG "Message class language
PMOD. "Modified by author
Select function modules
WHEN RFUNC.
PERFORM RETRIEVEFUNCTIONS USING SOFUNCTIONNAME[] "Function name
SOFUNCTIONGROUP[] "Function group
IFUNCTIONS[] "Found functions
SOAUTHOR[] "Author
PTEXT "Get text elements
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.
PERFORM RETRIEVECLASSES USING ICLASSES[]
IFUNCTIONS[]
SOCLASSNAME[] "Class name
SOAUTHOR[] "Author
CUSTOMERNAMESPACE "Customer name range
PMOD "Also modified by author
PCUST "Customer object only
PMESS "Find messages
PTEXT "Text Elements
PDICT "Dictionary structures
PFUNC "Get functions
PINC "Get includes
PRECF "Search recursively for functions
PRECI "Search recursively for includes
'X' "Search recursively 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.
PERFORM RETRIEVEPROGRAMS USING IPROGRAMS[]
IFUNCTIONS[]
SOPROGRAMNAME[] "Program name
SOAUTHOR[] "Author
CUSTOMERNAMESPACE "Customer name range
PMOD "Also modified by author
PCUST "Customer object only
PMESS "Find messages
PTEXT "Text Elements
PDICT "Dictionay structures
PFUNC "Get functions
PINC "Get includes
PSCR "Get screens
PRECF "Search recursively for functions
PRECI "Search recursively 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[]
DOWNLOADFOLDER
HTMLEXTENSION
SPACE
PSORTT
SLASHSEPARATORTOUSE
PSERV
PPROMESS.
Free up any memory used for caching HTML versions of tables
LOOP AT IDICTIONARY.
FREE MEMORY ID IDICTIONARY-TABLENAME.
ENDLOOP.
Display donwload report
IF NOT PREP IS INITIAL.
GET TIME.
RUNTIME = SY-UZEIT - STARTTIME.
PERFORM FILLTREENODETABLES USING IDICTIONARY[]
ITREEDISPLAY[]
RUNTIME.
ENDIF.
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
DOWNLOADFOLDER
DOWNLOADFILEEXTENSION
PHTML
SPACE
PCOMM
CUSTOMERNAMESPACE
PINC
PDICT
PMESS
SLASHSEPARATORTOUSE
PSERV
PPROMESS.
CLEAR ISINGLEMESSAGECLASS[].
ENDAT.
ENDLOOP.
Display download report
IF NOT PREP IS INITIAL.
GET TIME.
RUNTIME = SY-UZEIT - STARTTIME.
PERFORM FILLTREENODEMESSAGES USING IMESSAGES[]
ITREEDISPLAY[]
RUNTIME.
ENDIF.
CLEAR IMESSAGES[].
ENDIF.
Download functions
WHEN RFUNC.
IF NOT ( IFUNCTIONS[] IS INITIAL ).
PERFORM DOWNLOADFUNCTIONS USING IFUNCTIONS[]
DOWNLOADFOLDER
DOWNLOADFILEEXTENSION
SPACE
PDOC
PHTML
PCOMM
-
How to upload Excel file in BI using function module in abap program
How to upload Excel file in BI using function module in abap program?
Hi Anuj,
To upload the file , you can try a standard program "RSEPSFTP" .
while you execute the program , a selection screen appears in which the inputs should be give as
RFC destination - The target server name
FTP command- PUT
local file - your file name
local directory - path of your local file
remote file - your target file name
remote directory - where it has to be stored
Hope this is useful for you
Thanks & regards
Anju -
Error in executing ABAP program. Error occurred when creating dataset
hi,
when I use LKM SAP ERP to Oracle (SQLLDR) to extract data from SAP ERP server. I execute my interface, and it's stop at extract data step.
This is message:
java.lang.RuntimeException: Error occured in open tool execute method...Error in executing ABAP program...Error in executing ABAP program...Error occurred when creating dataset/abc/ZODI_13001_6001_GLOBAL.txt
I tried others path name, tried slash or backslash. This is content in code tab
OdiSAPAbapExecute "-UPLOAD=1" "-EXECUTE=1" "-EXECUTEBASE_RKM=0" "-ZRFC_RUN_INSTALL=1" "-ABAP_PROGRAM_NAME=ZODI_13001_6001" "-HOST=10.86.87.24" "-USER=sv_hoa" "-PASSWORD=<@=snpRef.getInfo("SRC_PASS") @>" "-SAP_CLIENT=800" "-SAP_LANGUAGE=EN" "-SAP_SYSTEM_NUMBER=02" "-SAP_FUNCTION_GROUP_NAME=ZODI_FGR_13001" "-CONNECTION_POOL_NAME=SAP_ODI_ERP_POOL_10.86.87.24" "-CONNECTION_POOL_SIZE=10" "-FILE_DELIMITER=<@=""+(char)8@>" "-FILE_NAME=ZODI_13001_6001_GLOBAL.txt" "-FTP_HOST=10.86.82.108" "-FTP_USER=anh" "-FTP_PASSWORD=<@=sFtpPassword@>" "-FTP_PASSIVE_MODE=1" "-FTP_TRANSFER_TIMEOUT=100000" "-ODI_VARIABLE_NAMES=" "-ODI_VARIABLE_VALUES=" "-USER_ABAP_PARAMETER_NAMES=IV_DELIMITER,CHAR3;IV_FILENAME,CHAR255;IV_USER,CHAR35;IV_PWD,CHAR35;IV_HOST,CHAR35;IV_HASHVALUE,CHAR35;IV_PATH,CHAR35;IV_MAX_ROW_CNT,SYTABIX;IV_FETCH_BATCH_SIZE,SYTABIX;" "-USER_ABAP_PARAMETER_VALUES=<Value>" "-USER_ABAP_PARAMETER_SEPARATOR=<Value>" "-ABAP_TABLE_PARAMETERS=RETURN,BAPIRETURN;ET_FILE_RETURN,BAPIRET2" "-ABAP_EXPORT_PARAMETERS=ERRORMESSAGE;SY-MSGV1" "-LOG_FILE_NAME=C:\Users\anh\AppData\Local\Temp\SapAbapExecuteOpenTool_13001.log" "-FTP_PATH=/abc/" "-DEV_CLASS=ZODI_DEVCLASS" "-MAX_ROW_COUNT=" "-FETCH_BATCH_SIZE=100000" "-HASH_VALUE_MARKER=HVM" "-ABAP_PROGRAM_BODY=
*Final Type declarations
TYPES : BEGIN OF ty_final,
Y03HOCSINH_HOCSINH_ID TYPE
Y03HOCSINH-HOCSINH_ID,
Y03HOCSINH_MA_HOC_SINH TYPE
Y03HOCSINH-MA_HOC_SINH,
Y03HOCSINH_TEN_HOC_SINH TYPE
Y03HOCSINH-TEN_HOC_SINH,
Y03HOCSINH_GIOI_TINH TYPE
Y03HOCSINH-GIOI_TINH,
Y03HOCSINH_DIA_CHI TYPE
Y03HOCSINH-DIA_CHI,
Y03HOCSINH_GHI_CHU TYPE
Y03HOCSINH-GHI_CHU,
END OF ty_final.
*Final Temp Type Declarations
TYPES : BEGIN OF ty_final_tmp,
Y03HOCSINH_HOCSINH_ID TYPE
Y03HOCSINH-HOCSINH_ID ,
Y03HOCSINH_MA_HOC_SINH TYPE
Y03HOCSINH-MA_HOC_SINH ,
Y03HOCSINH_TEN_HOC_SINH TYPE
Y03HOCSINH-TEN_HOC_SINH ,
Y03HOCSINH_GIOI_TINH TYPE
Y03HOCSINH-GIOI_TINH ,
Y03HOCSINH_DIA_CHI TYPE
Y03HOCSINH-DIA_CHI ,
Y03HOCSINH_GHI_CHU TYPE
Y03HOCSINH-GHI_CHU ,
END OF ty_final_tmp.
*Final Target Type Declarations
TYPES : BEGIN OF ty_final_target,
C0_Y03HOCSINH_HOCSINH_ID TYPE
Y03HOCSINH-HOCSINH_ID,
C1_Y03HOCSINH_MA_HOC_SINH TYPE
Y03HOCSINH-MA_HOC_SINH,
C2_Y03HOCSINH_TEN_HOC_SINH TYPE
Y03HOCSINH-TEN_HOC_SINH,
C3_Y03HOCSINH_GIOI_TINH TYPE
Y03HOCSINH-GIOI_TINH,
C4_Y03HOCSINH_DIA_CHI TYPE
Y03HOCSINH-DIA_CHI,
C5_Y03HOCSINH_GHI_CHU TYPE
Y03HOCSINH-GHI_CHU,
END OF ty_final_target.
* Table type for Y03HOCSINH
TYPES : BEGIN OF ty_Y03HOCSINH,
HOCSINH_ID TYPE
Y03HOCSINH-HOCSINH_ID,
MA_HOC_SINH TYPE
Y03HOCSINH-MA_HOC_SINH,
TEN_HOC_SINH TYPE
Y03HOCSINH-TEN_HOC_SINH,
GIOI_TINH TYPE
Y03HOCSINH-GIOI_TINH,
DIA_CHI TYPE
Y03HOCSINH-DIA_CHI,
GHI_CHU TYPE
Y03HOCSINH-GHI_CHU,
END OF ty_Y03HOCSINH.
TYPES: BEGIN OF gs_text,
line(843) TYPE c,
END OF gs_text.
*Structure Declarations
DATA: wa_final_string TYPE string,
wa_final TYPE ty_final,
wa_final_target TYPE ty_final_target,
wa_Y03HOCSINH TYPE ty_Y03HOCSINH,
*Table Declarations
tt_final TYPE STANDARD TABLE OF ty_final,
tt_Y03HOCSINH TYPE STANDARD TABLE OF ty_Y03HOCSINH,
tt_final_target TYPE STANDARD TABLE
OF ty_final_target,
tt_final_tmp TYPE STANDARD TABLE OF ty_final_tmp,
tt_final_tmp1 TYPE STANDARD TABLE OF ty_final,
gt_result TYPE STANDARD TABLE OF gs_text,
*Variable Declarations
lv_path TYPE string,
lv_flag TYPE char1,
C0_Y03HOCSINH_HOCSINH_ID TYPE
STRING,
C1_Y03HOCSINH_MA_HOC_SINH TYPE
STRING,
C2_Y03HOCSINH_TEN_HOC_SINH TYPE
STRING,
C3_Y03HOCSINH_GIOI_TINH TYPE
STRING,
C4_Y03HOCSINH_DIA_CHI TYPE
STRING,
C5_Y03HOCSINH_GHI_CHU TYPE
STRING,
wa_final_tmp TYPE ty_final_tmp,
lv_file TYPE string,
lv_datum TYPE sy-datum,
lv_date TYPE char10,
wa_result TYPE string,
lv_delimiter type string,
lv_cnt TYPE sytabix,
*-Cursor Declaration
lv_Y03HOCSINH_dbcur TYPE cursor,
lv_tabix_frm TYPE sy-tabix.
lv_delimiter = iv_delimiter.
IF iv_hashvalue = 'HVM'.
*Open/delete output file
CONCATENATE iv_path iv_filename INTO lv_path.
*Check for file existence, if found, delete it
OPEN DATASET lv_path FOR INPUT
IN TEXT MODE
ENCODING DEFAULT.
IF sy-subrc EQ 0.
DELETE DATASET lv_path.
ENDIF.
*Open/create output file
OPEN DATASET lv_path FOR APPENDING
IN TEXT MODE
ENCODING DEFAULT.
IF sy-subrc EQ 0.
*Batch Processing
OPEN CURSOR WITH HOLD lv_Y03HOCSINH_dbcur FOR
SELECT HOCSINH_ID
MA_HOC_SINH
TEN_HOC_SINH
GIOI_TINH
DIA_CHI
GHI_CHU
FROM Y03HOCSINH.
DO.
*Check for the counter, only for first batch
*process new line is required...
lv_cnt = lv_cnt + 1.
REFRESH tt_Y03HOCSINH.
FETCH NEXT CURSOR lv_Y03HOCSINH_dbcur
APPENDING TABLE tt_Y03HOCSINH
PACKAGE SIZE IV_FETCH_BATCH_SIZE.
IF NOT tt_Y03HOCSINH IS INITIAL.
ELSE.
EXIT.
ENDIF.
LOOP AT tt_Y03HOCSINH INTO wa_Y03HOCSINH.
MOVE wa_Y03HOCSINH-HOCSINH_ID
TO wa_final_tmp-Y03HOCSINH_HOCSINH_ID.
MOVE wa_Y03HOCSINH-MA_HOC_SINH
TO wa_final_tmp-Y03HOCSINH_MA_HOC_SINH.
MOVE wa_Y03HOCSINH-TEN_HOC_SINH
TO wa_final_tmp-Y03HOCSINH_TEN_HOC_SINH.
MOVE wa_Y03HOCSINH-GIOI_TINH
TO wa_final_tmp-Y03HOCSINH_GIOI_TINH.
MOVE wa_Y03HOCSINH-DIA_CHI
TO wa_final_tmp-Y03HOCSINH_DIA_CHI.
MOVE wa_Y03HOCSINH-GHI_CHU
TO wa_final_tmp-Y03HOCSINH_GHI_CHU.
APPEND wa_final_tmp TO tt_final_tmp.
ENDLOOP.
free : tt_Y03HOCSINH.
LOOP AT tt_final_tmp INTO wa_final_tmp.
MOVE wa_final_tmp-Y03HOCSINH_HOCSINH_ID
TO wa_final_target-C0_Y03HOCSINH_HOCSINH_ID.
MOVE wa_final_tmp-Y03HOCSINH_MA_HOC_SINH
TO wa_final_target-C1_Y03HOCSINH_MA_HOC_SINH.
MOVE wa_final_tmp-Y03HOCSINH_TEN_HOC_SINH
TO wa_final_target-C2_Y03HOCSINH_TEN_HOC_SINH.
MOVE wa_final_tmp-Y03HOCSINH_GIOI_TINH
TO wa_final_target-C3_Y03HOCSINH_GIOI_TINH.
MOVE wa_final_tmp-Y03HOCSINH_DIA_CHI
TO wa_final_target-C4_Y03HOCSINH_DIA_CHI.
MOVE wa_final_tmp-Y03HOCSINH_GHI_CHU
TO wa_final_target-C5_Y03HOCSINH_GHI_CHU.
Append wa_final_target to tt_final_target.
ENDLOOP.
free : tt_final_tmp.
Clear wa_final_target.
IF NOT iv_max_row_cnt IS INITIAL.
Loop at tt_final_target into
wa_final_target TO iv_max_row_cnt.
MOVE wa_final_target-C0_Y03HOCSINH_HOCSINH_ID
TO C0_Y03HOCSINH_HOCSINH_ID.
MOVE wa_final_target-C1_Y03HOCSINH_MA_HOC_SINH
TO C1_Y03HOCSINH_MA_HOC_SINH.
MOVE wa_final_target-C2_Y03HOCSINH_TEN_HOC_SINH
TO C2_Y03HOCSINH_TEN_HOC_SINH.
MOVE wa_final_target-C3_Y03HOCSINH_GIOI_TINH
TO C3_Y03HOCSINH_GIOI_TINH.
MOVE wa_final_target-C4_Y03HOCSINH_DIA_CHI
TO C4_Y03HOCSINH_DIA_CHI.
MOVE wa_final_target-C5_Y03HOCSINH_GHI_CHU
TO C5_Y03HOCSINH_GHI_CHU.
CONCATENATE
C0_Y03HOCSINH_HOCSINH_ID
C1_Y03HOCSINH_MA_HOC_SINH
C2_Y03HOCSINH_TEN_HOC_SINH
C3_Y03HOCSINH_GIOI_TINH
C4_Y03HOCSINH_DIA_CHI
C5_Y03HOCSINH_GHI_CHU
INTO wa_final_string
SEPARATED BY lv_delimiter.
IF sy-tabix EQ 1 AND lv_cnt EQ 1.
CONCATENATE wa_final_string
lv_delimiter INTO wa_final_string.
ELSE.
CONCATENATE '<@=""+(char)8@>' lv_delimiter wa_final_string
lv_delimiter INTO wa_final_string.
ENDIF.
APPEND wa_final_string TO gt_result.
CLEAR : C0_Y03HOCSINH_HOCSINH_ID,
C1_Y03HOCSINH_MA_HOC_SINH,
C2_Y03HOCSINH_TEN_HOC_SINH,
C3_Y03HOCSINH_GIOI_TINH,
C4_Y03HOCSINH_DIA_CHI,
C5_Y03HOCSINH_GHI_CHU.
ENDLOOP.
ELSE.
Loop at tt_final_target into wa_final_target.
MOVE wa_final_target-C0_Y03HOCSINH_HOCSINH_ID
TO C0_Y03HOCSINH_HOCSINH_ID.
MOVE wa_final_target-C1_Y03HOCSINH_MA_HOC_SINH
TO C1_Y03HOCSINH_MA_HOC_SINH.
MOVE wa_final_target-C2_Y03HOCSINH_TEN_HOC_SINH
TO C2_Y03HOCSINH_TEN_HOC_SINH.
MOVE wa_final_target-C3_Y03HOCSINH_GIOI_TINH
TO C3_Y03HOCSINH_GIOI_TINH.
MOVE wa_final_target-C4_Y03HOCSINH_DIA_CHI
TO C4_Y03HOCSINH_DIA_CHI.
MOVE wa_final_target-C5_Y03HOCSINH_GHI_CHU
TO C5_Y03HOCSINH_GHI_CHU.
CONCATENATE
C0_Y03HOCSINH_HOCSINH_ID
C1_Y03HOCSINH_MA_HOC_SINH
C2_Y03HOCSINH_TEN_HOC_SINH
C3_Y03HOCSINH_GIOI_TINH
C4_Y03HOCSINH_DIA_CHI
C5_Y03HOCSINH_GHI_CHU
INTO wa_final_string
SEPARATED BY lv_delimiter.
IF sy-tabix EQ 1 AND lv_cnt EQ 1.
CONCATENATE wa_final_string
lv_delimiter INTO wa_final_string.
ELSE.
CONCATENATE '<@=""+(char)8@>' lv_delimiter wa_final_string
lv_delimiter INTO wa_final_string.
ENDIF.
APPEND wa_final_string TO gt_result.
CLEAR : C0_Y03HOCSINH_HOCSINH_ID,
C1_Y03HOCSINH_MA_HOC_SINH,
C2_Y03HOCSINH_TEN_HOC_SINH,
C3_Y03HOCSINH_GIOI_TINH,
C4_Y03HOCSINH_DIA_CHI,
C5_Y03HOCSINH_GHI_CHU.
ENDLOOP.
ENDIF.
free : tt_final_target.
IF NOT gt_result IS INITIAL.
CLEAR wa_result.
LOOP AT gt_result INTO wa_result.
TRANSFER wa_result TO lv_path.
ENDLOOP.
ENDIF.
REFRESH gt_result.
*End of main loop for batching
ENDDO.
*Close dataset
CLOSE DATASET lv_path.
CLOSE CURSOR lv_Y03HOCSINH_dbcur.
ELSE.
DATA: lv_mesg TYPE string.
CLEAR et_file_return.
et_file_return-type = 'E'.
CONCATENATE
'Error occurred when creating dataset' lv_path
INTO lv_mesg.
et_file_return-message = lv_mesg.
Append et_file_return.
ENDIF.
ELSE.
CLEAR et_file_return.
et_file_return-type = 'E'.
et_file_return-message =
'Installed ABAP program does not match interface definition'.
APPEND et_file_return.
ENDIF.
Thanks for helpr u able to figure it out..........i got the same error .......can someone help me fix this issue
-
Reading the XML message from Xi stored in XML format from a abap program.
Hi Gurus,
My requirement here is to read the data that will be coming from Xi from my custom abap program and updating 2 data base tables. The method is after the data mapping is done a class is generated in abap proxy in which a method is available. Inside the method i am writing the code for getting the Xi data stored as a payload message which can be seen in the transaction SXMB_MONI. My code is given below.
***begin code***
method ZII_PAYROLL_HEADER_IN~PAYROLL_HEADER_IN.
**** INSERT IMPLEMENTATION HERE **** ***
data: ln type i.
DATA: i_items TYPE TABLE OF ZPAYLOAD_WRAPPER_EMPLOYEE_REC3.
*DATA: wa_items type ZPAYLOAD_WRAPPER_EMPLOYEE_TAB5.
data: wa_items type ZPAYLOAD_WRAPPER_EMPLOYEE_REC3.
DATA:PERNR TYPE STRING.
*data: it_ZPAYLOAD_WRAPPER16 TYPE ZPAYLOAD_WRAPPER16.
I_ITEMS[] = INPUT-PAYLOAD_WRAPPER-BODY-XMLDOC-PAYROLL_PERIOD_OVERVIEW-EMPLOYEE_RECORD[].
*I_ITEMS = INPUT-payloadWrapper-Body-XMLDOC-PayrollPeriodOverview-EmployeeRecord.
describe table i_items[] lines ln.
endmethod.
**End code***
As per the logic the data stored in the XML message should be avaialble in INPUT-payloadWrapper-Body-XMLDOC-PayrollPeriodOverview-EmployeeRecord which i am assigning to a local internal table in the class.
But in my case there is no data coming in
INPUT-payloadWrapper-Body-XMLDOC-PayrollPeriodOverview-EmployeeRecord.
But i can see the data transffered from XI in the transaction SXMB_MONI->XML message->inbound message->payload.
Is there any way to read the data stored in the XML message in the transaction SXMB_MONI.
Also why the data is not coming in
INPUT-payloadWrapper-Body-XMLDOC-PayrollPeriodOverview-EmployeeRecord inside the class.
If there is any solution for this problem please post it.You can use function module SXMB_GET_MESSAGE_PAYLOAD.
Code snippet:
DATA: ls_mast TYPE sxmspmast,
ls_msgkey TYPE sxmsmkey,
lv_bin_xml TYPE xstring,
lv_str_xml TYPE string.
* select sxmspmast into ls_mast
ls_msgkey-msgid = ls_mast-msgguid.
ls_msgkey-pid = 'RECEIVER'.
CALL FUNCTION 'SXMB_GET_MESSAGE_PAYLOAD'
EXPORTING
im_msgkey = ls_msgkey
im_archive = ' '
im_version = ls_mast-vers
IMPORTING
ex_msg_bytes = lv_bin_xml
EXCEPTIONS
not_authorized = 1
no_message = 2
internal_error = 3
no_payload = 4
OTHERS = 5.
IF sy-subrc EQ 0.
lv_str_xml = cl_soap_moni_helper=>convert_xstring_to_string( xstring_in = lv_bin_xml ).
ENDIF. -
BEx Login error - Termination occurred in the ABAP program "CL_GUI_FRONTEND
Dear All,
I am having error when i am trying to login in BEx Analyser / Quary Designer 7.0
i am using the same user ID password as when i used to login to SAP BW through Logon pad.
but still i am having the error "Name or Password is incorrect. (repeat logon)"
I did try RRMX in BW, i got
Runtime Errors RAISE_EXCEPTION
Information on where terminated
Termination occurred in the ABAP program "CL_GUI_FRONTEND_SERVICES======CP" -
in "GUI_DOWNLOAD".
The main program was "RRMX_START_EXCEL ".
In the source code you have the termination point in line 89
of the (Include) program "CL_GUI_FRONTEND_SERVICES======CM012".
the program in the error dump as
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE = BIN_FILESIZE
FILENAME = FILENAME
FILETYPE = FILETYPE
APPEND = APPEND
WRITE_FIELD_SEPARATOR = WRITE_FIELD_SEPARATOR
HEADER = HEADER
TRUNC_TRAILING_BLANKS = TRUNC_TRAILING_BLANKS
WRITE_LF = WRITE_LF
COL_SELECT = COL_SELECT
COL_SELECT_MASK = COL_SELECT_MASK
DAT_MODE = DAT_MODE
CONFIRM_OVERWRITE = CONFIRM_OVERWRITE
NO_AUTH_CHECK = NO_AUTH_CHECK
CODEPAGE = CODEPAGE
IGNORE_CERR = IGNORE_CERR
REPLACEMENT = REPLACEMENT
WRITE_BOM = WRITE_BOM
TRUNC_TRAILING_BLANKS_EOL = TRUNC_TRAILING_BLANKS_EOL
WK1_N_FORMAT = WK1_N_FORMAT
WK1_N_SIZE = WK1_N_SIZE
WK1_T_FORMAT = WK1_T_FORMAT
WK1_T_SIZE = WK1_T_SIZE
SHOW_TRANSFER_STATUS = SHOW_TRANSFER_STATUS
IMPORTING
FILELENGTH = FILELENGTH
TABLES
DATA_TAB = DATA_TAB
FIELDNAMES = FIELDNAMES
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22.
IF SY-SUBRC <> 0.
case sy-subrc.
when 1.
RAISE FILE_WRITE_ERROR.
when 2.
RAISE NO_BATCH.
when 3.
RAISE GUI_REFUSE_FILETRANSFER.
when 4.
RAISE INVALID_TYPE .
when 5.
RAISE NO_AUTHORITY.
when 6.
RAISE UNKNOWN_ERROR.
when 7.
RAISE HEADER_NOT_ALLOWED.
when 8.
RAISE SEPARATOR_NOT_ALLOWED.
when 9.
RAISE FILESIZE_NOT_ALLOWED.
when 10.
RAISE HEADER_TOO_LONG.
when 11.
RAISE DP_ERROR_CREATE.
when 12.
RAISE DP_ERROR_SEND.
when 13.
RAISE DP_ERROR_WRITE.
when 14.
RAISE UNKNOWN_DP_ERROR.
>>>>when 15.
RAISE ACCESS_DENIED.
krishHello,
the same type of problem was solved today this way (it´s due to a local client problem):
Start users local SAP GUI
In the left upper corner of SAP GUI select the menue and -> options.
Delete all cache files of SAP GUI and browse the local SAP GUI download folder of the users workstation. Rename the files in the download/workdir folder for example to *_old.
Logon to SAP system again, run RRMX again -> confirm download of bex config file -> Excel sheet should open now.
Important: also the end user has to configure some excel addin options (bex) otherwise the excel sheet will be blank / empty.
BR,
Alessandro -
ABAP program "SAPLCNTL" in "CHECK_OO": MESSAGE_TYPE_X
Hi,
I have a problem with a program with ALV-list. Sometimes it terminates with a dump. I can not reproduce the dumps and I can not find the reason for it. I do not know, if it only terminates on some clients.
In the program the alv table is refreshed with CL_GUI_ALV_GRID=>REFRESH_TABLE_DISPLAY. After this there is also a statement CALL METHOD cl_gui_cfw=>flush.
Can anyone help?
Kindly regards
Frank
Runtime Error MESSAGE_TYPE_X
Date and Time 11.11.2008 11:24:28
ShrtText
The current application triggered a termination with a short dump.
What happened?
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).
What can you do?
Print out the error message (using the "Print" function)
and make a note of the actions and input that caused the
error.
To resolve the problem, contact your SAP system administrator.
You can use transaction ST22 (ABAP Dump Analysis) to view and administer
termination messages, especially those beyond their normal deletion
date.
is especially useful if you want to keep a particular message.
Error analysis
Short text of error message:
Control Framework: Invalid Processing of ABAP Object Control
Technical information about the message:
Diagnosis
You want to edit a control created with ABAP objects techniques
(class-based Control Framework) using a function module (function
module-based Control Framework). The system does not support this.
The Class ID of the control is SAP.DataProvider.1.
System response
The transaction is terminated.
Procedure
Contact the person responsible for the SAP System.
Message classe...... "DC"
Number.............. 007
Variable 1.......... "SAP.DataProvider.1"
Variable 2.......... " "
Variable 3.......... " "
Variable 4.......... " "
Variable 3.......... " "
Variable 4.......... " "
How to correct the error
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,
use the following search criteria:
"MESSAGE_TYPE_X" C
"SAPLCNTL" or "LCNTLF01"
"CHECK_OO"
If you cannot solve the problem yourself and you wish to send
an error message to SAP, include the following documents:
1. A printout of the problem description (short dump)
To obtain this, select in the current display "System->List->
Save->Local File (unconverted)".
2. A suitable printout of the system log
To obtain this, call the system log through transaction SM21.
Limit the time interval to 10 minutes before and 5 minutes
after the short dump. In the display, then select the function
"System->List->Save->Local File (unconverted)".
3. If the programs are your own programs or modified SAP programs,
supply the source code.
To do this, select the Editor function "Further Utilities->
Upload/Download->Download".
4. Details regarding the conditions under which the error occurred
or which actions and input led to the error.
System environment
SAP Release.............. "640"
Application server....... "gl3ap4"
Network address.......... "194.69.46.206"
Operating system......... "AIX"
Release.................. "5.3"
Hardware type............ "00C2809E4C00"
Character length......... 16 Bits
Pointer length........... 64 Bits
Work process number...... 8
Short dump setting....... "full"
Database server.......... "glince215"
Database type............ "ORACLE"
Database name............ "GL3"
Database owner........... "SAPSR3"
Character set............ "C"
SAP kernel............... "640"
Created on............... "Feb 18 2008 23:36:16"
Created in............... "AIX 1 5 00538A4A4C00"
Database version......... "OCI_920 "
Patch level.............. "221"
Patch text............... " "
Supported environment....
Database................. "ORACLE 9.2.0.*.*, ORACLE 10.1.0.*.*, ORACLE
10.2.0.*.*"
SAP database version..... "640"
Operating system......... "AIX 1 5, AIX 2 5, AIX 3 5, AIX 1 6"
Memory usage.............
Roll..................... 16192
EM....................... 16759424
Heap..................... 0
Page..................... 139264
MM Used.................. 4672968
MM Free.................. 3703952
SAP Release.............. "640"
User and Transaction
Client.............. 001
User................ "PB754"
Language key........ "D"
Transaction......... "ZVLA "
Program............. "SAPLCNTL"
Screen.............. "ZTCOCKPT 2000"
Screen line......... 4
Information on where terminated
The termination occurred in the ABAP program "SAPLCNTL" in "CHECK_OO".
The main program was "ZTCOCKPT ".
The termination occurred in line 178 of the source code of the (Include)
program "LCNTLF01"
of the source code of program "LCNTLF01" (when calling the editor 1780).
Source Code Extract
Line SourceCde
148 *---------------------------------------------------------------------*
149 * FORM %_CONTROL_DISPATCH *
150 *---------------------------------------------------------------------*
151 *
152 *---------------------------------------------------------------------*
153 * --> OKCODE *
154 *---------------------------------------------------------------------*
155 FORM %_CONTROL_DISPATCH.
156 * CALL FUNCTION 'CONTROL_DISPATCH'
157 * EXPORTING
158 * FCODE = SY-UCOMM
159 * EXCEPTIONS
160 * CB_NOT_FOUND = 1
161 * OTHERS = 2.
162 ENDFORM.
163
164 FORM REGISTERGLOBALOCXEVENT
165 USING SHELLID TYPE I EVENT TYPE I.
166 CALL METHOD OF CL_GUI_OBJECT=>H_GUI 'RegisterGlobalOCXevent'
167 NO FLUSH
168 EXPORTING #1 = SHELLID
169 #2 = EVENT.
170 ENDFORM.
171
172 form check_OO using p_handle type cntl_handle.
173 * check sy-uname = 'KSCHMIDT'.
174 call method cl_gui_cfw=>get_subscriber_by_id
175 exporting shellid = p_handle-shellid
176 exceptions others = 1.
177 if sy-subrc = 0.
>>>>> message X007 with p_handle-clsid.
179 endif.
180
181 endform.
182
183 form check_oo_2 using p_shellid type i.
184 data l_handle type cntl_handle.
185 * check sy-uname = 'KSCHMIDT'.
186 call method cl_gui_cfw=>get_subscriber_by_id
187 exporting shellid = p_shellid
188 exceptions others = 1.
189 if sy-subrc = 0.
190 call function 'CNTH_HANDLE_BY_SHELLID'
191 exporting shellid = p_shellid
192 importing h_control = l_handle
193 exceptions others = 1.
194 message X007 with l_handle-clsid.
195 endif.
196 endform.
Contents of system fields
Name Val.
SY-SUBRC 0
SY-INDEX 0
SY-TABIX 12
SY-DBCNT 1
SY-FDPOS 1
SY-LSIND 0
SY-PAGNO 0
SY-LINNO 1
SY-COLNO 1
SY-PFKEY STAT2000
SY-UCOMM NSEL
SY-TITLE ZTCOCKPT Cockpit: Transporte Aufträge Lieferungen
SY-MSGTY X
SY-MSGID DC
SY-MSGNO 007
SY-MSGV1 SAP.DataProvider.1
SY-MSGV2
SY-MSGV3
SY-MSGV4
Active Calls/Events
No. Ty. Program Include Line
Name
11 FORM SAPLCNTL LCNTLF01 178
CHECK_OO
10 FUNCTION SAPLCNTL LCNTLU13 16
CONTROL_DESTROY
9 FUNCTION SAPLCNDP LCNDPU07 22
DP_DESTROY
8 FUNCTION SAPLCNDP LCNDPU10 103
DP_CONTROL_ASSIGN_TABLE
7 METHOD CL_GUI_ALV_GRID_BASE==========CP CL_GUI_ALV_GRID_BASE==========CM01U 37
CL_GUI_ALV_GRID_BASE=>SET_TOOLBAR_BUTTONS
6 METHOD CL_GUI_ALV_GRID===============CP CL_GUI_ALV_GRID===============CM01M 52
CL_GUI_ALV_GRID=>SET_TOOLBAR
5 METHOD CL_GUI_ALV_GRID===============CP CL_GUI_ALV_GRID===============CM01P 432
CL_GUI_ALV_GRID=>SOFT_REFRESH_TABLE_DISPLAY
4 METHOD CL_GUI_ALV_GRID===============CP CL_GUI_ALV_GRID===============CM00T 116
CL_GUI_ALV_GRID=>REFRESH_TABLE_DISPLAY
3 MODULE (PBO) ZTCOCKPT ZTCOCKPT 652
PBO_ALV_2000
2 FORM ZTCOCKPT ZTCOCKPT 167
ALVAUSGABE
1 EVENT ZTCOCKPT ZTCOCKPT_INC 213
START-OF-SELECTION
Chosen variables
Name
Val.
No. 11 Ty. FORM
Name CHECK_OO
SY-REPID
SAPLCNTL
0000000000000000000000000000000000000000
0000000000000000000000000000000000000000
5454445422222222222222222222222222222222
310C3E4C00000000000000000000000000000000
%_VIASELSCR
0
4
P_HANDLE-SHELLID
128
0008
0000
BS_CENTER
768
0000
0030
%_DUMMY$$
0000
0000
2222
0000
FONT_ITALIC
1
0000
0001
SY-SUBRC
0
0000
0000
SY-XFORM
XAB_READ
000000000000000000000000000000
000000000000000000000000000000
544554442222222222222222222222
812F25140000000000000000000000
SY-MSGID
DC
00000000000000000000
00000000000000000000
44222222222222222222
43000000000000000000
SS_SIMPLE
11
0000
000B
SS_BLACKRECT
4
0000
0004
SPACE
0
0
2
0
SY-MSGNO
007
000
000
333
007
SY-MSGV1
SAP.DataProvider.1
00000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000
54524676576766672322222222222222222222222222222222
310E414102F69452E100000000000000000000000000000000
P_HANDLE-CLSID
SAP.DataProvider.1
0000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000
5452467657676667232222222222222222222222222222222222222222222222222222
310E414102F69452E10000000000000000000000000000000000000000000000000000
SY-MSGV2
00000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000
22222222222222222222222222222222222222222222222222
00000000000000000000000000000000000000000000000000
SY-MSGV3
00000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000
22222222222222222222222222222222222222222222222222
00000000000000000000000000000000000000000000000000
SY-MSGV4
00000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000
22222222222222222222222222222222222222222222222222
00000000000000000000000000000000000000000000000000
No. 10 Ty. FUNCTION
Name CONTROL_DESTROY
NO_FLUSH
X
0
0
5
8
H_CONTROL
OBJHOLE2## 7263 ####
00000000FF000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000FF000000000000000000000000000000000000000000000000000000000000000000000000000000000000
44444443FF222222222222222222222222222222222223333222222222222222222222222222222222222222080022
F2A8FC52FF000000000000000000000000000000000007263000000000000000000000000000000000000000000A00
BS_DEFPUSHBUTTON
1
0000
0001
BS_LEFT
256
0000
0010
THIS_DUMMY_VALUE
0
0000
0000
BS_PUSHBUTTON
0
0000
0000
H_CONTROL-OBJ+16(4)
-1
FFFF
FFFF
SYST-REPID
SAPLCNTL
0000000000000000000000000000000000000000
0000000000000000000000000000000000000000
5454445422222222222222222222222222222222
310C3E4C00000000000000000000000000000000
H_CONTROL-HANDLE_TYPE
NO_OC
0000000000
0000000000
4454422222
EFFF300000
CNTL_TYPE_OCX
OCX
0000000000
0000000000
4452222222
F380000000
CNTL_TRUE
1
0000
0001
IS_ITSAC_767A497173BF11D28BB
0
0
2
0
AC_EXPORTS_4E238C5273BF11D28BB
Table[initial]
AC_EXPO_WA_4E238C5273BF11D28BB
000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
2222222222222222222222222222222233333333322222222222222222222222222222222222222222222222222222
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
No. 9 Ty. FUNCTION
Name DP_DESTROY
H_DP
OBJHOLE2## 7263 ####
00000000FF000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000FF000000000000000000000000000000000000000000000000000000000000000000000000000000000000
44444443FF222222222222222222222222222222222223333222222222222222222222222222222222222222080022
F2A8FC52FF000000000000000000000000000000000007263000000000000000000000000000000000000000000A00
G_STRETCH_UNICODE_COLS_VALID
X
0
0
5
8
%_DUMMY$$
0000
0000
2222
0000
SY-SUBRC
0
0000
0000
SYST-REPID
SAPLCNDP
0000000000000000000000000000000000000000
0000000000000000000000000000000000000000
5454444522222222222222222222222222222222
310C3E4000000000000000000000000000000000Hi Frank,
I doubt it is related to function 'LVC_FIELDCATALOG_MERGE' since the current SAP help documentation talks about using this function for the purpose that I'm sure you are using it. The short dump states that the problem is caused by the use of an "old" function-module-based control framework function combined with the class-based OO CFW.
Diagnosis
You want to edit a control created with ABAP objects techniques
(class-based Control Framework) using a function module (function
module-based Control Framework). The system does not support this.
If you look at the call sequence in the short dump, function module 'CONTROL_DESTROY' is being called (which then calls function 'CHECK_OO' from which the error is sent). Function module 'CONTROL_DESTROY' is in function group CNTL which is part of the "old" function-module-based CFW.
Since the 'CONTROL_DESTROY' function is ultimately called as a result of your Z-program legitimately calling the standard SAP method CL_GUI_ALV_GRID=>REFRESH_TABLE_DISPLAY, I'd say you might want to consider opening a customer message with SAP providing as much detail and background as possible. But before you bother to do that (or while you are waiting to hear back from SAP) you may want to double-check your Z-program to make sure you aren't calling some other function modules from function groups CNTL or CNT0 (the "old" CFW function modules).
I've included just the call sequence from your short dump here for easier reference. Notice the order of the calls from 1 to 11, ending with functions 'CONTROL_DESTROY' and 'CHECK_OO'. I think 'CONTROL_DESTROY' may be causing the problem (??):
Active Calls/Events
No. Ty. Program Include Line
Name
11 FORM SAPLCNTL LCNTLF01 178
CHECK_OO
10 FUNCTION SAPLCNTL LCNTLU13 16
CONTROL_DESTROY
9 FUNCTION SAPLCNDP LCNDPU07 22
DP_DESTROY
8 FUNCTION SAPLCNDP LCNDPU10 103
DP_CONTROL_ASSIGN_TABLE
7 METHOD CL_GUI_ALV_GRID_BASE==========CP CL_GUI_ALV_GRID_BASE==========CM01U 37
CL_GUI_ALV_GRID_BASE=>SET_TOOLBAR_BUTTONS
6 METHOD CL_GUI_ALV_GRID===============CP CL_GUI_ALV_GRID===============CM01M 52
CL_GUI_ALV_GRID=>SET_TOOLBAR
5 METHOD CL_GUI_ALV_GRID===============CP CL_GUI_ALV_GRID===============CM01P 432
CL_GUI_ALV_GRID=>SOFT_REFRESH_TABLE_DISPLAY
4 METHOD CL_GUI_ALV_GRID===============CP CL_GUI_ALV_GRID===============CM00T 116
CL_GUI_ALV_GRID=>REFRESH_TABLE_DISPLAY
3 MODULE (PBO) ZTCOCKPT ZTCOCKPT 652
PBO_ALV_2000
2 FORM ZTCOCKPT ZTCOCKPT 167
ALVAUSGABE
1 EVENT ZTCOCKPT ZTCOCKPT_INC 213
START-OF-SELECTION
Regards,
Jamie
P.S. Please report back here if you find a solution (or if SAP finds one as a result of your customer message). -
Attach files to a Shopping Cart in SRM portal using a ABAP program.
Hello.
We need to attach files to a Shopping Cart using a ABAP program and see them in SRM portal.
Currently we know how to attach files in the backend using the function Xxxxxxxxxx but with this function we can not see the attachment in the SRM portal.
Do you know someway to attach files direclty in the front-end using a program?
Maybe i have to attach first in the back-end and after that transfer to front-end?
I have seen some thread but the solution provided is in the other way arround (transfer from front-end to backend) and then is not useful for my proble.
Thanks in advance.
Kr,
Angel.Hello Angel,
You can attach a file to SC ,and it is a standard functionality provided in SRM.
While creating a Shopping cart,under Documents and attachements tab,there is an option to select a local file and attach it to a SC
If you are looking at attaching the document in SRM and sending it to BE system.(R/3 system), then have a look at SAP note Note 1057932 - FAQ: Atachment transfer to backend, Required Configurations.
The Following BADIs will have to be implemented to allow the above functionality
For transfer of attachments in PO , activate the BADI BBP_CREATE_PO_BACK. Set the values of the following parameters in the
method BBP_CREATE_PO_BACK~Fill_PO_INTERFACE
CV_ATTACH_TRANSFER_ACTIVE = 'X'
CV_ATTACH_BE_STORAGE_CAT = 'DMS_C1_ST'
CV_ATTACH_BE_DOC_TYPE = 'SRM'.
For transfer of attachments in PR, activate the BADI
BBP_CREATE_REQ_BACK. Set the values of the following parameters in the method BBP_CREATE_REQ_BACK~FILL_REQ_INTERFACE
CV_ATTACH_TRANSFER_ACTIVE = 'X'
CV_ATTACH_BE_STORAGE_CAT = 'DMS_C1_ST'
CV_ATTACH_BE_DOC_TYPE = 'SRM'.
Award points if useful.
Thanks
Arshad -
WD Service Call ABAP program generation error in 2004s
Hi,
I create a 'service call' by using the wizard and I select my existing 'component controller' as a controller. The service type I use is a (custom) function module. The function module has 1 import parameter, an export structure and 6 tables.
In the 'adapt context' step I choose all fields and structures to be stored in the context. Then I generate the code.
After generating the code there is a syntax error in the code of the created method. The method code under comment 'store output to context' binds the rfc structure to the context BUT it seems to think that it is a table instead of a structure.
the code:
node_Contract->bind_Structure(Stru_C_Contract[] )
Of course I can remove the '[]' signs manually but I think it is strange that the wizard produces wrong code.
Please let me know if this is a bug or something else.Values in variants are not converted. You can use the same variant in your ABAP program, but you need to change the value in the parameter for logical system in each system you transport the change to. The only alternative is to create a logical system name in SM59 that is the same in all your BW systems but it refers to the local R/3 system.
In other words, you will have two logical systems in your BWD system pointing to your R/3 Dev. Let's call them R3DCLNT100 and R3SYSTEM, where R3DCLNT100 is also the source system (in RSA1). You can use R3SYSTEM in your variant for your ABAP program. In your BWQ (test system), you will have two logical systems also, R3QCLNT100 and R3SYSTEM, where R3QCLNT100 is also your source system.
Does this help. -
Execute ABAP Program - Error in Open File Cust_Dim.dat
HI All,
I am trying to Implement scenario of Data Service designer for Extract SAP Application data (page no. 181 Onwards). It is for transfer data from SAP ECC - KNA1 to MSSQL table.
I have Data Service server install on my system.
I have implement all the steps. When I execute job server. I am getting error like
"Execute ABAP program <C:/Program Files/Business Objects/BusinessObjects Data Services/ZCUSTDIM_1.aba> error < Open File Error -- C:\Program Files\Business Objects\/Cust_Dim.dat>"
Does anyone knows about this? I have tried to find lot in SDN but didn't find any solution.
Thanks
RatnakarHi all
I was having the exact same problem as the one explained here.
I was a little mixed up because I assigned full privileges on the destination folder to one specific account called installsap
I used this account for installing SAP BO Data Services. This account is the one configured on the Business Objects Data Services Service:
However, I kept getting the same error, as if this account had not enough privileges over the folder.
I saw that there is another Service called Server Intelligent Agent. I went through its configuration Properties by using the Central Configuration Manager, specifically within the Log On As Property and it seemed like a non specific System Account was configured there.
Then I open the services.msc (Windows application) in order to see this very same service configuration and it had NOTHING specified there, nor a Local System Account nor an specific user account.
So, I stopped the service and specified the installsap account I used for the Business Objects Data Services Service. After that I verified I could see this configuration through the Central Configuration Manager and now both tools showed the same.
Then I started the SIA Service retried again executing the ABAP Data Flow and the Error in Open File was gone.
It is how the SIA Service configuration looks like.
By the way, I am not sure if the "Job Server Service" which was cited before in this thread is the same as the Server Intelligence Agent Service I modified
Besides, although I've been using DS for quite a considerable amount of time, I have never heard of such "Job Server Service". Let me know if I am wrong.
Anyways it worked for me and I hope it works for someone else who faces the same error.
Best regards! -
Abap program variant error in process chain
Hi experts,
I need your help one more time...
In our process chain, we run the program RSIMPCUST to bring currency and units from the source system to BW. We have created a variant to run this program and call it in the process chain. One of the variant's parameter is the logical system, which was configured as our DEV system.
When we transport this process chain to QA and run it, the variant continues to refer the DEV logical system, and not the QA logical system as it should.
any ideas?
Thanks!
Thiago BragaValues in variants are not converted. You can use the same variant in your ABAP program, but you need to change the value in the parameter for logical system in each system you transport the change to. The only alternative is to create a logical system name in SM59 that is the same in all your BW systems but it refers to the local R/3 system.
In other words, you will have two logical systems in your BWD system pointing to your R/3 Dev. Let's call them R3DCLNT100 and R3SYSTEM, where R3DCLNT100 is also the source system (in RSA1). You can use R3SYSTEM in your variant for your ABAP program. In your BWQ (test system), you will have two logical systems also, R3QCLNT100 and R3SYSTEM, where R3QCLNT100 is also your source system.
Does this help. -
How to filter results of mara without writing abap program
I am running SE16 in SAP ECC searchig MARA table. I want to query such
As ERSDA > u201801/03/2011u2019 OR LEADA > u201801/302/2011u2019, Through form interface, it seems
I can only specify AND for two fields and not OR. Is there a way to specify the complex filter
Without writing ABAP program.
Thanks.Hello,
For simple single table reporting as this just use transaction code SE16 or SE16N. Filter your results as you would in any standard report selection screen using the search bubble option on the selected fields. After inputting the table select "Settings --> Fields For Selection" at the selection screen from the toolbar to add fields for the search. You may then download the results from "System --> List --> Save --> Local File" (Spreadsheet).
Regards,
sifter
Maybe you are looking for
-
How to pass a java script variable to a JSP page
How to assign a javascript variable value to a jsp variabe <script> var scroll="100" </script> <% String age=[ here i need to set the value of "scroll" ] %> is it possible , thanks
-
Can I split a PDF / PCL file when generating using Crystal Report
Hi, I can generate a big PCL file from sending it to a PCL printer from Crystal. Can I add something to split the PCL file while generating it from Crystal? Any pointers towards splitting a PCL would be appreciated. Thank you Deepa
-
Installed SL and apart from a couple of things that were solved by the help of comments here everything is great. The only thing that I cant work out is that on my hotmail account I have various folders with rules that used to show up in the mail app
-
I have imported employees through dtw.Each employee is identified by Employee No.But the primary key of the record is displayed as Employee No.I tried setting EmployeeID,IDNumber but were of no use.The field empID from the table is displayed as Emplo
-
I can't copy and paste in blackboard discussions.
I can't copy and paste in blackboard discussion or any where in blackboard when using firefox. I can if I use a different browser but I prefer firefox. I have also tried the keyboard shortcuts without succes. Any suggestions?