Status Message for ABAP Program
Hello Gurus,
I have an internal table. I placed the contents of the internal table on the application server using executable program. Everything works fine.
When I execute the program, the selection screen appears and after I give the inputs and execute again, the file is placed on the application screen and the screen is back to the abap code from selection screen.
I want a status message at the bottom indicating that the file was placed in the application server successfully. If it fails then I need the failure message that the file was not placed.
Please help me out how I can get these messages when I execute my program and where I need to place this code in my program.
Regards,
Balu
Hi,
You would be using OPEN DATASET, to transfer the internal table contents to Application Server file.So check sy-subrc.
OPEN DATASET.....
<b>IF sy-subrc eq 0.</b>
loop at itab.
transfer itab....
endloop.
Close Dataset.
Message 'File successfully saved!'.
<b>else.</b>
Message 'Error in saving the file !'.
<b>endif.</b>
Best regards,
Prashant
Similar Messages
-
Error messages in ABAP program are stored in which table
hi all,
Can anyone tell
error messages in ABAP program are stored in which table??Hi Sir ,
Please have a look below .Hope it is suitable and simpler solution for your question.
Please do reward if useful.
Thankx.
Fuction module for storing error messages ->'format_message'
for example...
data : v_message(100) type c.
call transaction NNNN mode A update S messages into it_messages.
loop at it_messages where msgty = 'E'.
call function 'format_message'
exporting
*it_messages details
importing
v_message.
write :/ v_message.
clear v_message.
endloop.
Anothe method - ->
Here is a sample of the program code for that:
LOOP AT it_messtab.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
id = it_messtab-msgid
lang = it_messtab-msgspra
no = it_messtab-msgnr
v1 = it_messtab-msgv1
v2 = it_messtab-msgv2
IMPORTING
msg = g_msg
EXCEPTIONS
OTHERS = 0.
IF it_messtab-msgtyp = 'S'.
it_sucess-sucess_rec = g_msg.
it_sucess-lifnr = it_header-lifnr." Based on your field
it_sucess-tabix = v_lines.
APPEND it_sucess.
ELSEIF it_messtab-msgtyp = 'E'.
it_error-error_rec = g_msg.
it_error-lifnr = it_header-lifnr.
it_error-tabix = v_lines.
APPEND it_error.
ELSE.
it_info-info_rec = g_msg.
it_info-lifnr = it_header-lifnr.
it_info-tabix = v_lines.
APPEND it_info.
ENDIF.
ENDLOOP. -
Import issue for ABAP program in Production Server ?
Hi Experts,
I have an ABAP program which gets executed properly in BW Development server but getting the following error when I am trying to execute it in the BW Production while I could activate the program successfully.
Kindly help me to resolve this issue.
Thanks in advance !!!
Regards,
Gokulkumar RDHi Golkul,
Can you debug the program while execute?
I think there is some hardcoding in the program for checkiing the client and then raised a custom message in the program.
Can you share the coding of the prorgam if possible?
Try to check for any messages raised in the program. Also click on the on the message pop up and see the details on the message and let us know.
Thanks
Amit -
Last Status Message ID -10040 - Program will not rerun
Ive deployed a package which reprts 99% success. if i look at the report of the succesful clients about half are reporting the state message above & the other half 10008 - Program completed with success.
Have the machines with state mesage ID 10040 actually run the package succesfully or is SCCM miss reporting them?.I have simillar situation here.
I have deployed script to upgrade JRE version with Mandatory assigment. I have realized after few days that is needed to update script and re-deploy to ensure needed success of deployment.
I have deleted old Mandatory assigment and add new one to ensure that program will rerun on all target resources. But in about 30% im getting STATUS MESSAGE ID 10040 and if i look into local logs i have created from this upgrade script machines which show
STATUS MESSAGE ID 10040 did not run program based on new Mandatory Assigment.
WHY? and how i can ensure that all targets will re-Run it?
thanks for help -
How do i create a header template for ABAP programs?
Hi all.
Need a little bit of help here. When you create a new program you get a template with space for comments at the top of the program and basic stuff. If I want to change this template to add areas that we want to have comments on for every program we make at work. How do I do that?
Instead of :
I want to have in a way similar to this:
* Author: *
* Function: *
And so on
I want the words to be there when our developers creates the program.
How can I do that?
BR
KalleAfter I create a new report program, I delete everything but the REPORT line. I then put this code in for my skeleton.
* Created By: Walter Industries (Paul Chapman)
* Created On: 02/29/2008
* Tran Code: ZLMxx
* Program Name: YPTC_REPORT_SKELETON " replace New Progam Name herer
* Program Descr: Configurable Leads Data Query
* Modification Log
* Programmer :Issue: Date : Chg Req. : Description
* Paul Chapman :00000:02/29/2008:DEVK000000:New Program
REPORT yptc_report_skeleton MESSAGE-ID zleads_msg. " replace New Progam Name herer
*_________________________________________________ Tables
TABLES: zpca, cepc, zlmlead.
*_________________________________________________ Constants
CONSTANTS:
line_length TYPE i VALUE 100,
c_tab TYPE x VALUE 9, " x'09'
c_crlf TYPE x VALUE 3338. " x'ODOA'
*_________________________________________________ Types
TYPES: BEGIN OF scr_text_line,
line(line_length) TYPE c,
END OF scr_text_line.
*_________________________________________________ DATA
DATA:
curr_screen_tab(4) TYPE n.
*_________________________________________________ ALV Area
*_________________________________________________ Ranges
RANGES:
r_branch FOR zpca-branch.
*_________________________________________________ Selection Screen
SELECTION-SCREEN:
BEGIN OF TABBED BLOCK tabs FOR 36 LINES,
TAB (20) tab1 USER-COMMAND push1 DEFAULT SCREEN 1010,
TAB (20) tab2 USER-COMMAND push2 DEFAULT SCREEN 1020,
END OF BLOCK tabs.
* Tab1 Options S E L E C T I O N S C R E E N S Tab 01 *
SELECTION-SCREEN BEGIN OF SCREEN 1010 AS SUBSCREEN.
SELECTION-SCREEN: BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
SELECT-OPTIONS:
sdiv FOR cepc-prctr MATCHCODE OBJECT zdivjwh,
ssbrch FOR zlmlead-branch.
SELECTION-SCREEN: END OF BLOCK blk1.
SELECTION-SCREEN: BEGIN OF BLOCK bl10 WITH FRAME TITLE text-010.
PARAMETERS:
cparm1 AS CHECKBOX USER-COMMAND sel,
cparm2 AS CHECKBOX USER-COMMAND sel,
cparm3 AS CHECKBOX USER-COMMAND sel,
cparm4 AS CHECKBOX USER-COMMAND sel,
cparm5 AS CHECKBOX USER-COMMAND sel.
SELECTION-SCREEN: END OF BLOCK bl10.
SELECTION-SCREEN END OF SCREEN 1010.
* Tab 2 Options S E L E C T I O N S C R E E N S Tab 02 *
SELECTION-SCREEN BEGIN OF SCREEN 1020 AS SUBSCREEN.
SELECTION-SCREEN: BEGIN OF BLOCK blk2 WITH FRAME TITLE text-002.
SELECT-OPTIONS:
sctype FOR zlmlead-ctype,
sprfcnt FOR zlmlead-prefcont.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(25) text-201.
SELECTION-SCREEN POSITION 30.
PARAMETERS: rb_opt1 RADIOBUTTON GROUP gr20.
SELECTION-SCREEN COMMENT 34(03) text-991. " Yes
SELECTION-SCREEN POSITION 40.
PARAMETERS: rb_opt2 RADIOBUTTON GROUP gr20.
SELECTION-SCREEN COMMENT 44(03) text-992. " No
SELECTION-SCREEN POSITION 50.
PARAMETERS: rb_opt3 RADIOBUTTON GROUP gr20.
SELECTION-SCREEN COMMENT 54(06) text-993. " Either
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN: END OF BLOCK blk2.
SELECTION-SCREEN: BEGIN OF BLOCK bl20 WITH FRAME TITLE text-020.
PARAMETERS:
cb_opt1 AS CHECKBOX,
cb_opt2 AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN: END OF BLOCK bl20.
SELECTION-SCREEN END OF SCREEN 1020.
*____________________________________________ Screen Actions
AT SELECTION-SCREEN OUTPUT.
PERFORM what_tab_am_i_on.
CASE curr_screen_tab.
WHEN '1010'. " Tab 1
WHEN '1020'. " Tab 2
WHEN OTHERS.
ENDCASE.
PERFORM tab_hide_unhide.
*___________________________________________ Initialization
INITIALIZATION.
* Tab Text
tab1 = 'Tab 1'.
tab2 = 'Tab 2'.
*_________________________________________________ Load of Program
LOAD-OF-PROGRAM.
*_________________________________________________ Start of Selection
START-OF-SELECTION.
PERFORM set_up_branch_range.
*_________________________________________________ End of Selection
END-OF-SELECTION.
*& Form what_tab_am_i_on
FORM what_tab_am_i_on.
LOOP AT SCREEN.
IF screen-name CS 'BLOCK_1010'.
curr_screen_tab = '1010'.
ELSEIF screen-name CS 'BLOCK_1020'.
curr_screen_tab = '1020'.
ENDIF.
ENDLOOP.
ENDFORM. " what_tab_am_i_on
*& Form tab_hide_unhide
FORM tab_hide_unhide.
LOOP AT SCREEN.
CHECK screen-group3 = 'TAB'.
CASE screen-name.
WHEN 'TAB1'.
* IF
* screen-active = 1.
* screen-required = 1.
* screen-input = 1.
* screen-output = 1.
* screen-intensified = 1.
* screen-invisible = 1.
* ELSE.
* screen-active = 0.
* screen-required = 0.
* screen-input = 0.
* screen-output = 0.
* screen-intensified = 0.
* screen-invisible = 0.
* ENDIF.
WHEN 'TAB2'.
* IF
* screen-active = 1.
* ELSE.
* screen-active = 0.
* ENDIF.
ENDCASE.
MODIFY SCREEN.
ENDLOOP.
ENDFORM. " tab_hide_unhide
*& Form set_up_branch_range
FORM set_up_branch_range.
r_branch[] = ssbrch[].
CHECK NOT sdiv IS INITIAL.
r_branch = 'IEQ'.
SELECT branch INTO r_branch-low
FROM zpca
WHERE region = 'JWHCO'
AND division IN sdiv.
APPEND r_branch.
ENDSELECT.
SORT r_branch.
DELETE ADJACENT DUPLICATES FROM r_branch.
ENDFORM. " set_up_branch_range -
Authentication or Security Checks for ABAP programs
Dear experts,
Please tell me where do we give the authentication or security checks to our ABAP programs and how do we do that. ( Do not allow all to execute our developed programs).
Regards,
MaanasaIf you know the authorization group u can use the following ways.
1. In the Attributes u can specify the authorization gourp name
2. AT SELECTION-SCREEN
AUTHORITY-CHECK OBJECT 'Z_TABU_DIS'
ID 'ACTVT' FIELD '03'
ID 'CUSTTYPE' FIELD v_class
ID 'TABLENAME' FIELD p_dbtble.
CASE SY-SUBRC.
WHEN 0.
WHEN OTHERS.
Error message
message I419(MO).
STOP.
ENDCASE. -
PHYSICAL FILES FOR ABAP PROGRAM
hi friends
i would like to know are there any physical files on os level for the ABAP programs.for example, when we create a customized report for sales in ABAP does SAP also create a corresponding copy on os level. if yes then in which file system .?
we have ECC 5.0 on AIX & use oracle 9i.
thanks in advance.
regards.imran mohd wrote:
> hi friends
>
> i would like to know are there any physical files on os level for the ABAP programs.for example, when we create a customized report for sales in ABAP does SAP also create a corresponding copy on os level. if yes then in which file system .?
>
>
> we have ECC 5.0 on AIX & use oracle 9i.
>
> thanks in advance.
>
> regards.
The code you write in ABAP is not stored on OS-level (at least not in an ABAP-stack system) - it's contained in the database. As for the 'copies' your management wishes (for some ambigous reason) to have - there's no need. The code you write is versionised, so that every change made to the code is automatically documented when you press 'Save'.
That was answering a 'basic' question - but you have made me very curious now: would you mind to explain why you would want a 'copy' of your custom code on OS-level? Any special reason??
Edited by: Mylène Dorias on Jun 9, 2010 1:37 PM typo -
How to get Access key for ABAP Program development in HANA Studio
Hi,
I have got instance for ABAP on HANA development system.
But while creating new program it is asking me for Access key, since I do not have user id pwd for service market place I couldnt able to create the access key.
Can any one suggest the way to create ACCESS KEY??
Thanks,
RamDear Ram,
it seems that you need to follow the chapter 6.1 in the documentation...:
Kind regards, Stephan -
TCode for abap program performance testing
Hi
I have tuned a abap program which was consuming lot of time. I still have the old version with diff name. I would like to know the tcodes where in i could see the performance of the program.
regards
BalajiHi balaji,
This is kiran Kumar.G.I will give some steps.you better to follow those steps to get ur report performance.
If u r satisfy with my answer give me REWARD POINTS.
HAVE A NICE DAY.
STEPS:
1.OPEN UR REPORT IN SE38 TRANSACTION.
2.SELECT THE MENU PATH
UTILITIES-->MORE UTILITIES-->RUNTIME ANALYSIS
3.SELECT THE PROGRAM RADIO BUTTON AND GIVE UR REPORT NAME THERE.AND CLICK <b>EXECUTE</b> BUTTON
4.IT WILL TAKE U TO ANOTHER SCREEN THERE U CAN EXECUTE UR REPORT AND COME BACK.
5.CLICK ON ANALYZE BUTTON.(PRESENT IN BELOW OF THE SCREEN).
THEN U WILL GET ONE GRAPH
NOTE:
1.IF IT IS RED UR PROGRAM IS HAVING VERY POOR PERFORMANCE
2.IF IT IS GREEN IT IS OK.
ABAP GRAPH : TELLS UR CODING IN THE REPORT.
DATABASE GRAPH : U R RETREIVE DATA FROM DATABASE IN UR REPORT..
SOME STEPS USED TO IMPROVE UR PERFORMANCE:
1. Avoid using SELECT...ENDSELECT... construct and use SELECT ... INTO TABLE.
2. Use WHERE clause in your SELECT statement to restrict the volume of data retrieved.
3. Design your Query to Use as much index fields as possible from left to right in your WHERE statement
4. Use FOR ALL ENTRIES in your SELECT statement to retrieve the matching records at one shot.
5. Avoid using nested SELECT statement, SELECT within LOOPs.
6. Avoid using INTO CORRESPONDING FIELDS OF TABLE. Instead use INTO TABLE.
7. Avoid using SELECT * and Select only the required fields from the table.
8. Avoid nested loops when working with large internal tables.
9. Use assign instead of into in LOOPs for table types with large work areas
10. When in doubt call transaction SE30 and use the examples and check your code
11. Whenever using READ TABLE use BINARY SEARCH addition to speed up the search. Be sure to sort the internal table before binary search. This is a general thumb rule but typically if you are sure that the data in internal table is less than 200 entries you need not do SORT and use BINARY SEARCH since this is an overhead in performance.
12. Use "CHECK" instead of IF/ENDIF whenever possible.
13. Use "CASE" instead of IF/ENDIF whenever possible.
14. Use "MOVE" with individual variable/field moves instead of "MOVE-
CORRESPONDING", creates more coding but is more effcient.
Regards,
Kiran Kumar.G -
Hello,
Can anyone tell me how I can create a transport for and ABAP Program. It is currently in DEV but needs to go to test.
ThanksI think you must have created this object as a Local Object. You need to do 2 things here :
Reassign the Development Class to a Z Dev Class.
Use trx code SE38. On the first screen, specify the program name & click on Goto-->Object Directory Entry.
You will get a popup here, change the Dev Class to whatever you have on your side, this will prompt you for a Workbench Transport request. Follow up with Basis to get it to Test. -
I would like to have the ability for the user to edit the property 'Status Message'. In the properties it says that it should be available in the details section however I am not seeing it there. Does anyone know if I might have something set
incorrectly or is this expected behavior.
Steven Albrecht
University of Colorado Denver
Steven AlbrechtHi Steven,
For this issue, I'm trying to involve someone familiar with this topic to further
look at it.
Thanks,
Eric Tao
TechNet Community Support -
No status messages for any components after 2012 SP1 upgrade
Hi, after a recent upgrade to 2012 SP1 two of my sites no longer show any status messages in monitoring. All the services seem fine, I can distribute and deploy packages to clients, run queries etc.
All other sites are now fine, the difference is the working sites are on 2008 R2 or 2012 and the trouble sites are on 2008 Storage Server SP1. So obviously close at hand to assume the Site Server OS is somehow the culprit.
SP2 is installed on all sites for SQL Server 2008 R2, servers have been restarted.There we go!
So sender.log had these:
There is no existing connection, Win32 error = 7054
and
Error during connection to \\primaryserver.domain.local\SMS_SITE (7054).
As mentioned already, I already verified the secondary site computer accounts were in the SMS_SiteToSiteConnection_XX1
on the primary site server. But I added my main SCCM service account there as well and under Administration\Hierarchy Configuration\File Replication I changed the File Replication Account from the computer account to the service account and the status messages
are now transfered and appearing in the Status Message Viewer.
I don't really care why the computer account wouldn't work, I'm just going to leave it like this, the 2008 Storage Servers
are due to be replaced or upgraded this year anyway.
Thanks Juke and everyone else! -
Can I use logical databases in a WebDynpro for ABAP program?
can I use logical databases in a WebDynpro ABAP program?
I need to build a WDA screen that is similar to the SAPDBPNP selection screen (user can find the personnel number based on several criteria, such as last_name/first_name of the employee). So it seems that the exisinting logical databases have already many nice features already built (like the selection screens, the logic behind the screens etc). So I was wondering if/how I can use them in my WDA application.Hi
Please let me also know the solution to this. I am a beginner to WebDynpro and want to know if I can make use of LDB's as we do in our normal HR programming do develop a WDA in HR.
Thanks and regards,
Uma. -
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 -
Hi ,
Is there some table where I can find the list of ABAP programs?
Thanks
FedeXplease visit this this will be use ful to u
http://www.sap-img.com/abap.htm
Maybe you are looking for
-
BW FICA extract structures corrupted after upgrade from 4.6C to ECC6
Hi All. After the upgrade an include (FKKBWP) in the extract structure FKKOPBW_BASIC contained a field belonging to the APPEND structure ZAFKKOPBW_BASIC (originating from enhancing the configured structure). Also ZAFKKOPBW_BASIC is not visible in FK
-
Hello folks, I've been struggling and I need to figure out how to read a field from an XML field into ABAP. I'm writing this method and I need to call this field from my XML file. Can you guys please give me suggestions? Please advise. I will appreci
-
YouTube HD Export Preset (H.264)
I've tried many different settings within this preset and every file stutters when played in Windows Media Player. Will it stutter when uploaded to YouTube? I have not had the time to upload it yet but thought I would ask if anybody here has any exp
-
How to use OLE object in Forms6i on web
Hi, I am migratiing 4.5 forms to 6i on web, in 4.5 there is ole to invoke WINWORD, is it possible in 6i on web to invoke WINWORD form the client machine?? null
-
ABC Analysis from transaction MC40 - Qty field
Hi All, I recently got to know about MC40 and i dont understand some areas of it. After executing MC40, i will get the list of materials sorted already for A, B , and C. However, when i click on double line, it then shows me Qty field as well. Now wh