Reading contents of called standard program
Hi Experts,
Calling Program: Zreport
Called Program: Standard report (Note: with no Start-of-selection event. So, no Spool!).
I need to read the content of one of the intrnal table of the called program inside my Zreport. Kindly guide how can I achieve this?
Thanks in advance.
Udit
>
Keshav.T wrote:
> Use this method retrieving internal table info. during runtime from callstack
But this is possible only if the internal table is available in the ABAP stack.
@OP: You can check this thread which is close to what you requirement is. How do I get a variable, or object from ABAP STACK.
BR,
Suhas
Similar Messages
-
Dear Experts,
I have writen a Z program which converts the format of the output file, i need to execute the standard program rfebck00 after execution is completed i need the final output values back in my Z program for further process..
I tried with the submit and return ...but it is not working ,
I'm getting the output but after I pressed the back button its going to my program but user is not willing to press back button Is there any other way to do the above requirement...
thanks in advance
HemaHi,
Please try to use FM ABAP4_CALL_TRANSACTION to call transaction FCKR (report program RFEBCK00). Perhaps you can setup the table parameter USING_TAB for BDCDATA of back button.
Regards,
Ferry Lianto -
Problem in changing the internal table contents of a standard program
Dear All,
I am making changes to internal table LT_PPDIT of standard program SAPLHRPT in the user exit EXIT_SAPLACC4_001 while payroll posting to accounting with tcode PC00_M99_CIPE. But though the changed value of LT_PPDIT is visible within the exit still the value of LT_PPDIT when we come outside exit is the same as what was before entering exit.
Please suggest is there any way of modifying internal table of a standard program in the user exit.
Regards,
KanupriyaHi,
I think the internal table is getting refreshed or something like that after the user exit.
Try debugging after the user exit and put breakpoints at clear and modify statements.
Then you ll find out where its regaining the oringinal value after getting changes.
After locating that point try finding some enhancmenent point there and including your code so that your value of internal able gets modified.
Regards,
Subhashini -
Calling standard program with logical database
Hi all,
I am trying to call a standard report (RPTBAL00) from a custom program without displaying the selection screen. I want to fill some of the select-options programmatically.
My code is somethig like this
submit RPTBAL00
with pernr-pernr = 'XXX'
with pernr-pnpbegda = '20020101'
with pernr-pnpenddaa = '99991231'
and return.
but the report gets called with defaults.
Does anyone know what I am doing wrong?Hi
I seem your code is right, but I don't understand which elements are filled with default values.
Anyway this is a little code to submit a report with logical database:
Co.Ge.
loop at so_umskz.
move-corresponding so_umskz to selopt.
append selopt to frange-selopt_t.
endloop.
if sy-subrc = 0.
frange-fieldname = 'UMSKZ'.
append frange to range-frange_t.
endif.
refresh frange-selopt_t.
loop at so_zlsch.
move-corresponding so_zlsch to selopt.
append selopt to frange-selopt_t.
endloop.
if sy-subrc = 0.
frange-fieldname = 'ZLSCH'.
append frange to range-frange_t.
endif.
if not range-frange_t[] is initial.
range-tablename = 'BSIK'.
append range to trange.
call function 'FREE_SELECTIONS_RANGE_2_EX'
exporting
field_ranges = trange
importing
expressions = texpr.
endif.
submit rfitemap
with ................
with free selections texpr and return.
Max -
Calling Standard program in Z report
Hi,
Zreport is calling the MB5B Transaction program ( rm07mlbd ) using the submit statement.
Here i have to take the values of Total/Val. of Receipts & Total/Value of Issues and do the some extra calculation in ZREPORT.
But when i used the below statements, i am able to get the whole output of the MB5B transaction into internal table. But How to get the specified values only i.e. Total/Val. of Receipts & Total/Value of Issues.
SUBMIT rm07mlbd AND RETURN WITH SELECTION-TABLE seltab
EXPORTING LIST TO MEMORY.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = itab_list
EXCEPTIONS
not_found = 4
OTHERS = 8.
CALL FUNCTION 'LIST_TO_ASCI'
EXPORTING
list_index = -1
TABLES
listasci = vlist
listobject = itab_list
EXCEPTIONS
empty_list = 1
list_index_invalid = 2
OTHERS = 3.
CALL FUNCTION 'LIST_FREE_MEMORY'.
Thanks in Advance
BaluIt would be hard to extract the result from the spool-type data received, did you try to find an exit, BAdI or Enhancement point in the standard report where you could export the relevant internal table
(e.g.. use an implicit enhancement point at start or end of form [LISTAUSGABE1|http://www.sdn.sap.com/irj/scn/advancedsearch?query=listausgabe1] in include [RM07MLBD_FORM_02|http://www.sdn.sap.com/irj/scn/advancedsearch?query=rm07mlbd_form_02] where you could export [G_T_BELEGE|http://www.sdn.sap.com/irj/scn/advancedsearch?query=g_t_belege], of course check first that you are called from an external report [sy-calld|http://help.sap.com/abapdocu_70/en/ABENSYSTEM_FIELDS.htm])
Regards,
Raymond -
Suppress Information message during submit a standard program
Hi experts,
I am calling standard program RCATSCO from a report using following code:
SUBMIT rcatstco WITH p_pernr IN s_pernr
WITH p_date IN lt_r_date
WITH p_belnr IN s_belnr
WITH s_rkdauf IN s_rkdauf
WITH p_budat EQ sy-datum
WITH p_warn EQ gc_x
EXPORTING LIST TO MEMORY
AND RETURN.
When all data are already transferred to controlling this standard program displays a popup information message 'No data for transfer'. I need to suppress this popup and continue execution of the report. Please help.
Thanks,
ArnabOne option is to do that check yourself and bypass submitting the program if there is no data to transfer. Another option is to submit the program via job. That way the the message will go to the job log. I see that you are using the option exporting list to memory, which means you want to read the spool after the program is executed. With the "via job" option, you may need to monitor the status of the job for completion and then read its spool.
-
How to read contents of files that do not fall under public security group?
Hi,
I need to read the contents of a WCM based xml file that does not fall under public security.
The process is like this:
First the user makes chnages to the content.
The workflow will be triggred based on the security group metadata that is associated with the content.
Once the content is finally approved our workflow calls a custom idoc script.
First we tried directly reading the xml contents from the idoc script which was still in the context of workflow. But since content item is still in workflow I was not able to read the changes. So I created a separate content publisher thread and read the DOC_INFO and checked for the dStatus value. If the value is RELEASED then I reading contents by calling ssIncludeXml idoc script.
This was working fine for public content. But now the requirement is that all content cannot be public. Content authors should not be able to edit the content that does not belong to their group, So we created security groups (and roles) and are associating that groups to the relavent content.
Beacuse of this change I am not not able to read the non public content. The call to DOC_INFO_BY_NAME service, which gives all the content files' metadata, is expecting the user to be logged in to give the details.
I tried calling the CHECKIN service with sysadmin and captured the cookies returned by that service and use cookies for the DOC_INFO_BY_NAME service call. But the service call was faling. It is throing the 401 forbidden error with the message that user needs to be logged in to get the details.
How to address this problem. Someone please help.
Note: I also tried using ridc for this. I was able to get it working but since it is executing in the context of server ridc api is changing server's environment properties like HTTP_HOST, HTTP_CGIPATHROOT etc. It also seemed like system was becoming non functional after using ridc. When I called check-in the system metadata values like security group are no more loading. Not sure if ridc is the culprit here but worried that it might be causing this issue.
Regards,
PratapSorry, I posted too much details while posting this question. I was saying "not able to read *non* public content".
Anyway, I was able to resolve the issue. I was able to authenticate with sysadmin credentials in the request to service using basic authentication and was able to read doc info with that credential.
But I realized there is more than option for reading secure content.
- I could set user name as sysadmin in the m_environment (if I am in the context of a service) and the call the DOC_INFO_BY_NAME service.
- I can post an HTTP request to DOC_INFO_BY_NAME service with sysadmin credentials and do basic authorization via the connection. (This is what i have done successfully as of now )
- I could add guest role to all security groups with R (read) privileges.
I will look into all options and implement the one which is more apt.
Regards,
Pratap -
Calling the standard program in program and getting its output in int table
Hi there,
I have a requirement, where I need to call the standard program (of transaction CJI3) in my Y program. CJI3 transaction produces a ALV GRID output. I need to use that data for further processing. I am getting following problems:
1. I tried to use SUBMIT ... EXPORTING TO MEMORY statement. I need to pass the company code for the selection, but the company code is in the dynamic selection. So not getting how to pass them.
2. Just a doubt. Can we export the ALV GRID to the memory an retrieve it back using import?
3. I did tried to use SUBMIT ..... statement using only the parameters which are on the selection screen. However the control went to CJI3 transaction and gave an error message 'Please select "from database" or "from archive" '. Did not understood that, any IDEA?
Or is there any other way with which I can accomplish my requirement of getting the data in my program to manipulate, other than SUBMIT.
Points will be rewarded.
Thanks,
Ganesh KhumseHi,
point 1:
SUBMIT ... EXPORTING TO MEMORY will never work, because it displays the information in an ALV grid and that grid is waiting for user interaction for manipulating the information.
point 2:
no, you cannot export the content of an ALV grid to the memory
point 3:
must you get records in an internal table or must you feed the transaction, so that this one performs a task ?? for first option read below and for the other option you might work with BDC and Transaction Recorder.
what you have to do is read the code of transaction CJI3 in order to understand what it does, where the information is read from and what is the internal table that passes the values to the ALV Grid. You might find a user exit in the code for manipulating that information or you might create an enhancement point if there´s no user exit. -
How to change call to the function module in the standard program
Hi Guru,
My requairment is to create the new Z function module ZJ_1B_IM_NF_DOCUMENT_FUNCTION in the MM07MFJ1 program.
I have created the Z Funtion module,
plz provide me the info how to change the call to the new custom FM from the standard program.
Points will be given to the ans.You use SE38 to change out the code. When you try and change it you will get a popup asking you for a Key, since you are changing SAP Code. If you have a Developers key you have to go to the SAP Service Marketplace and tell SAP that you are changing this code in order to get they key. After this every time you do support packs you run the risk of this getting overlaid and you will have to change it back, also if you have a problem and SAP sees that you customized this code they probably won't spend any time on your problem.
-
Calling standard printer driver program RVADOR01 from ALV report
I have ALV report (Sales order documents) and one of columns in report is icon type with print preview link (hotspot). When user press icon, I would like to call standard print program RVADOR01 (actually we have custom Z_RVADOR01 and custom smartform which are working fine when using Document -> Output in VA03) to display print preview. I don't know how to call (trigger) print driver routine and pass needed parameters to it (ex. SO number).
MarkoActually I did that. But then you are at least three clicks away from print preview screen. For testing purpose I've created custom smartform and run it from my report. It is working like I want. Now, instead of my procedure I want to run standard printer driver program with needed parameters. I believe that all it needs is document number (vbeln) and all the rest is already there, program, smatform... I just don't know how to use it (ex. pass parameters).
I know I maybe complicating too much but I am ABAP beginner and want to learn as much as possible. Thank you anyway! -
Hi all,
I am coding an Z Program and in this Zprogram i have to call an Standard Program(RFFOUS_T) and after giving the Necessary input Manually in the first selection screen (1000)of the Standard program i have to return back to my Z program
How can i do this
Regards
AjyaHi Ajay,
You can use addition WITH SELECTION-TABLE rspar to pass the selection screen parameters.
SUBMIT report1 WITH SELECTION-TABLE rspar_tab.
Here table rspar_tab contains values for Selection Screen.
Also you can pass value to selection screen field dirsctly
SUBMIT report1
WITH sel_screed_field1 BETWEEN 'H' AND 'K'
WITH sel_screed_field2 IN range_tab.
If Found Help Full Do Reward.
Regards.
Eshwar. -
How to call the Standard Program in our ZPROGRAM?
Hi Frieds can you tell me the procedure how to call the Standard program
in z----
program and we have to get the data from standard one to our customer program.
Thanks in advance,
madan mohan.Hi,
*Submit report but export resultant list to memory, rather than
*it being displayed on screen
SUBMIT zreport EXPORTING LIST TO MEMORY.
Once report has finished and control has returned to calling
program, use function modules LIST_FROM_MEMORY, WRITE_LIST and
DISPLAY_LIST to retrieve and display report.
*Example Code (Retrieving list from memory)
DATA BEGIN OF itab_list OCCURS 0.
INCLUDE STRUCTURE abaplist.
DATA END OF itab_list.
DATA: BEGIN OF vlist OCCURS 0,
filler1(01) TYPE c,
field1(06) TYPE c,
filler(08) TYPE c,
field2(10) TYPE c,
filler3(01) TYPE c,
field3(10) TYPE c,
filler4(01) TYPE c,
field4(3) TYPE c,
filler5(02) TYPE c,
field5(15) TYPE c,
filler6(02) TYPE c,
field6(30) TYPE c,
filler7(43) TYPE c,
field7(10) TYPE c,
END OF vlist.
SUBMIT zreport EXPORTING LIST TO MEMORY.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = itab_list
EXCEPTIONS
not_found = 4
OTHERS = 8.
CALL FUNCTION 'LIST_TO_ASCI'
EXPORTING
list_index = -1
TABLES
listasci = vlist
listobject = itab_list
EXCEPTIONS
empty_list = 1
list_index_invalid = 2
OTHERS = 3.
IF sy-subrc NE '0'.
WRITE:/ 'LIST_TO_ASCI error !! ', sy-subrc.
ENDIF.
Regards
Sudheer -
Standard program for calling shipping smartform
hi
can anybody tell me wats the standard program which calls the shipping smart form from transaction VT03NhI,
For Print Program -->RVADSPAT
For EDI processing-->RSNASTED
Regards
Sandipan -
I need to call main window from a Standard program
I need to call main window from a Standard program for SAP Script. I have wrote the code like this but it is not working. Kindly help me on that.
FORM OPEN_AND_START_FORM
FORM open_and_start_form.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
device = 'PRINTER'
dialog = space
form = 'ZOTC_SLI'
language = print_co-spras
OPTIONS = pr_options
EXCEPTIONS
canceled = 01
device = 02
form = 03
OPTIONS = 04
unclosed = 05.
CHECK sy-subrc IS INITIAL.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
window = 'MAIN'.
ENDFORM. "OPEN_AND_START_FORM
FORM CLOSE_AND_END_FORM_FORM *
FORM close_and_end_form.
CALL FUNCTION 'END_FORM'.
ENDFORM. "CLOSE_AND_END_FORMHi,
FORM CLOSE_AND_END_FORM_FORM *
FORM close_and_end_form.
CALL FUNCTION 'END_FORM'.
change this to CALL FUNCTION 'close_FORM'.
as you are not using the start_form
you can use End_form
i hope you understand now
ENDFORM. "CLOSE_AND_END_FORM
reward points if helpful.
thanks & regards,
venkatesh -
Short dump in standard program
Hi Friends,
below description is short dump for standard program.
Please see the below and help me how to correct the program.
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).
Error analysis
Short text of error message:
Internal error: Program , include , form .
Technical information about the message:
Diagnosis
An unexpected error has occurred.
Procedure
If you can reproduce the error, contact the SAP Hotline quoting the
error number.
Message classe...... "GR"
Number.............. 214
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
"SAPFGRWE" or "FGRWEF80_F80_FILL_COL_TAB"
"F80_FILL_COL_TAB"
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.
Thanks & Regards,
Sree
Edited by: adepus on Oct 7, 2009 12:39 PM
Edited by: adepus on Oct 7, 2009 12:39 PMHi Clemens,
I am getting a dump error as shown below. Could you please find some resolution for this issue. we just made some changes to the transaction GS02(Just added a GL account to one of the sets).
Runtime Error MESSAGE_TYPE_X
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:
Internal error: Program , include , form .
Technical information about the message:
Diagnosis
An unexpected error has occurred.
Procedure
If you can reproduce the error, contact the SAP Hotline quoting the
error number.
Message classe...... "GR"
Number.............. 214
Variable 1.......... " "
Variable 2.......... " "
Variable 3.......... " "
Variable 4.......... " "
Variable 3.......... " "
Variable 4.......... " "
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
"SAPFGRWE" or "FGRWEF80_F80_FILL_COL_TAB"
"F80_FILL_COL_TAB"
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.
Source Code
79 MESSAGE x214.
80 ENDIF.
81 PERFORM e08_read_object_index(sapfgsb0)
82 USING fcolumns-dim_index.
83 IF c-subrc 0. MESSAGE x214. ENDIF.
84 c_dsentry = c-tval-from.
85 IF c_dsentry '='.
86 READ TABLE data_fields BINARY SEARCH
87 WITH KEY tab = rep_table
88 dsentry = c_dsentry.
>>>> IF sy-subrc 0. MESSAGE x214. ENDIF.
90 ENDIF.
91 WHEN OTHERS.
92 c_dsentry = '*'.
93 ENDCASE.
94 ENDIF.
Regards,
Pavan
Maybe you are looking for
-
Apple fails to fix TV with 3.0.2
I realise that for many users, it is the video capabilities of the TV that are important. But although these are useful, for me and many others it is the TV's musical abilities which are of paramount importance and these took a backward step with v
-
Page item display 32767 characters (via computation)
Hello everyone, Running APEX 3.2.1.00.11 I am trying to generate values for a page item using a PL/SQL function body. It parses and concatenates many rows of our databases. In one case I need to return some generated javascript code to pre-load a aut
-
Merging multiple forms and having shared fields
I am designing multiple forms for a client for application purposes. There are about 40 forms in all. Client is designing a online helper that will help users download only the forms they need for their application. So once that is decided, then we
-
Hi all I try to use signed framework RSLs to speed up my Flex application startup, so I followed indications "Using the framework RSLs" on help.adobe.com. In my project Properties > Flex Build path > Library path : - I set Framework Linkage to RSL -
-
I have created a workflow with OR split. One branch publishes the page whereas other branch cancels the publish action. Irrespective of which branch I select, workflow is completed. So even if next step picked is 'cancel publish', its the publish act