Passing an internal to another program using SUBMIT
Hi,
I need to pass one internal table from one program to another which i am calling using SUBMIT. Is there any way to pass this data without using export/import or selection screen.
If i do use EXPORT is there a retriction to the maximum size i can export?
Thanks
Hi Pankaj,
Consider these two programs I have done using both WITH SELECTION-TABLE and IMPORT/EXPORT.
In Program 1(ZZTEST_ARUN_1).
I have two radio buttons. If I select Material the program executes its own code. If I select plant data is fetched and exported to memory. Then it gets the selection parameters of the Program 2(ZZTEST_ARUN_2) through the FM RS_REFRESH_FROM_SELECTOPTIONS. Then I populate the values for selection screen and pass using the
SUBMIT....WITH SELECTION-TABLE option.
REPORT zztest_arun_1.
TABLES: t001w.
DATA : it_marc TYPE STANDARD TABLE OF marc WITH HEADER LINE,
it_werks TYPE STANDARD TABLE OF t001w WITH HEADER LINE.
PARAMETERS material RADIOBUTTON GROUP abc. "Material General Details
PARAMETERS plant RADIOBUTTON GROUP abc DEFAULT 'X'. "Material Plant Details
START-OF-SELECTION.
IF material EQ 'X'.
*If Material selected own code executes
SELECT * FROM marc INTO TABLE it_marc UP TO 200 ROWS .
LOOP AT it_marc.
WRITE :/ it_marc-matnr,
it_marc-werks.
ENDLOOP.
ENDIF.
IF plant EQ 'X'.
*If Plant selected data fetched
SELECT * FROM t001w INTO TABLE it_werks UP TO 50 ROWS.
*Exported to Memory
EXPORT it_werks[] TO MEMORY ID 'TEST'.
*Declare on selection table type RSPARAMS
DATA : stable LIKE rsparams OCCURS 0 WITH HEADER LINE.
*Call this FM to get the Selection screen details
*of Program ZZTEST_ARUN_2 (it returns Select Options, Parameters..)
CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
EXPORTING
curr_report = 'ZZTEST_ARUN_2'
TABLES
selection_table = stable
EXCEPTIONS
not_found = 1
no_report = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
stable-sign = 'I'.
stable-option = 'BT'.
* populate some selection condition
READ TABLE it_werks INDEX 10.
stable-low = it_werks-werks.
READ TABLE it_werks INDEX 40.
stable-high = it_werks-werks.
APPEND stable.
*Submit it then
SUBMIT zztest_arun_2
WITH SELECTION-TABLE stable
AND RETURN.
ENDIF.
<b>Second Program.</b>
REPORT zztest_arun_2.
TABLES: t001w.
DATA : it_werks TYPE STANDARD TABLE OF t001w WITH HEADER LINE.
SELECT-OPTIONS : s_werks FOR t001w-werks.
*Import the stored data.
IMPORT it_werks[] FROM MEMORY ID 'TEST'.
*Display the data based on selection criteria got
*form ZZTEST_ARUN_1
LOOP AT it_werks WHERE werks IN s_werks.
WRITE : / it_werks-werks,
it_werks-name1.
ENDLOOP.
Regards,
Arun Sambargi.
Similar Messages
-
Submititng the program to another program using internal table values
Hi All,
How to Submit from one program to another program using internal table values minimum 7 int tables without using the seletion screen
thanks
rajHi All,
Thank you very much for your inputs.
i am facing another issue:
For each 10,000 records it should trigger a job (we are trying to call a program) were the validation will be done only through the other program.
please find the code mentioned below :
TABLES : but000.
DATA: int_bp LIKE but000 OCCURS 0 WITH HEADER LINE.
data released like BTCH0000-CHAR1.
DATA: jobnumber LIKE tbtcjob-jobcount, " Job ID and
jobname LIKE tbtcjob-jobname, " job name.
startdate LIKE tbtcjob-sdlstrtdt, " Start-time
starttime LIKE tbtcjob-sdlstrttm, " window specs.
laststartdate LIKE tbtcjob-laststrtdt,
laststarttime LIKE tbtcjob-laststrttm,
job_released LIKE btch0000-char1. " JOB_CLOSE: Was job released?
DATA : l1 TYPE i,
b_size TYPE i,
b_cursor TYPE cursor.
INITIALIZATION.
b_size = 5000.
START-OF-SELECTION.
OPEN CURSOR WITH HOLD b_cursor
FOR
SELECT *
FROM but000
WHERE bpkind = 'AA'.
IF sy-subrc = 0.
DO.
FETCH NEXT CURSOR b_cursor INTO TABLE int_bp
PACKAGE SIZE b_size.
Note : here in this point we are getting a dump for the second job trigger.
IF sy-subrc = 0.
CLEAR jobname.
CONCATENATE sy-repid sy-datum sy-uzeit INTO jobname.
export int_bp to memory id 'ABC'.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = jobname
IMPORTING
jobcount = jobnumber.
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4
CALL FUNCTION 'JOB_SUBMIT'
EXPORTING
authcknam = sy-uname
jobname = jobname
jobcount = jobnumber
report = 'YTEST_RRR'.
variant = lv_variant.
SUBMIT ytest_rrr
VIA JOB jobname NUMBER jobnumber
AND RETURN.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
event_periodic = 'X'
jobcount = jobnumber
jobname = jobname
strtimmed = 'X'
IMPORTING
job_was_released = released
else.
EXIT.
ENDIF.
ENDDO.
calling program :
REPORT YTEST_RRR .
data itab1 like but000 occurs 0 with header line.
data l type i.
import itab1 from memory id 'ABC' .
describe table itab1 lines l.
free memory id 'ABC'.
write:/ 'total records are:', l.
Please give your suggestion why its going for dump in the second iteration.
thanks in advance. -
PASSING A TABLE TO ANOTHER PROGRAM
HII FRNDS
CAN WE PASS A TABLE TO ANOTHER PROGRAM . I AM CALING THAT PROGRAM USING SUBMIT COMMAND.
tHANKX
ROHITcheck this sample code..
DATA list_tab TYPE TABLE OF abaplist.
SUBMIT report EXPORTING LIST TO MEMORY
AND RETURN.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = list_tab
EXCEPTIONS
not_found = 1
OTHERS = 2.
IF sy-subrc = 0.
CALL FUNCTION 'WRITE_LIST'
TABLES
listobject = list_tab.
ENDIF.
hope this helps... -
How to get data from the called program using SUBMIT in a background job?
Hi Experts,
I've a program which creates a background job using JOB_OPEN and JOB_CLOSE function modules.
Between the above function modules I need to call a program using SUBMIT VIA JOB statement.
My problem is, How do I fetch some data in an internal table in the called program to the calling program after the SUBMIT statement?
I tried to EXPORT and IMPORT the data, but they are giving a failed sy-subrc when using this background job.
Kindly let me know your inputs and valuable suggestions.Kumar,
When we execute a program as a background job then the output will be sent to Spool which needs to be fetched again.I guess we need to use Submit via spool as mentioned by Rajat.
Check these threads to get some idea
submit report to spool & import spool id
Re: Generate Spool for a report
K.Kiran. -
Passing the output to another program
Passing the output to another program
The problem I have that I don�t know how to pass the results of my java Program ( as parameter) to another application!
I have a class �A.class� should send result �VAR_result� to application �B.application�
Now I am using it like this: System.out (VAR_result) >> B.application
But it could not be the right way at least because I cant make any other System.out as debug now.
My Question please: to pass a parameter to a java is clear: A.class ( var ..)
But how to take a parameter from a class, to use it in another Applicatin ( script )?
Thanks a lotslackware2007 wrote:
Passing the output to another program
The problem I have that I don’t know how to pass the results of my java Program ( as parameter) to another application!
I have a class “A.class” should send result “VAR_result” to application “B.application”
Now I am using it like this: System.out (VAR_result) >> B.application
But it could not be the right way at least because I cant make any other System.out as debug now.Then move your debug to System.err and use System.out as it should be used and pipe stdout to the stdin of the other application.. -
When i open my Canon RAW-files with preview or transfer them to another program using preview they change to color despite the fact that they where all shot in B/W... How to change this?
I shoot only RAW - no JPEG-files except those visualizing the files on my memorycard or computer. I think i have to refine my question;
1. I know there is possible to make B/W HDR-images.
2. I know the best HDR images are based on RAW-files.
3. When i transfer the images in question to a HDR software they change, so when i view them in the software (either Preview or the HDR software) they are suddenly viewed (and processed) in color.
4. This never happend on my PC so i know it has to do with either Finder or Preview.
5. Do i have to make all my B/W HDR-images on the PC or is it a way for me to change how Finder/Preview show/alter my images? -
How to pass a value and call SE38 program using SUBMIT statement
Hello Friends
I am trying to write a batch program in SE38, that calls other SE38 Programs.
I don't want to use Parameter command to see the value on screen.
All I want is to send a range of date (ToDate & FromDate) and generate different reports satisfying this date range condition.
Can some one please help me with this. I would really appreciate it.
I have tried the command SUBMIT with options of filling the input fields of the subsequent programs but I don't want to do this.
I want all the sub programs to be called one after another and the reports generated using the date varialbles I send from the main program.
I don't want to use se37 functions because of the client's request.
Any help will be highly appreciated.
Tks
RamYes I am using SUBMIT command but I was not using the right options with the SUBMIT command and once I used the right options, it worked.
Tks
Ram -
Call Program from another Program using varient
Hi...
How to call program from program with varient....?
i have used submit but how to pass varient dynamically.
Regards,
ChintanHi,
Use the FM SUBMIT_REPORT
OR
SUBMIT <Program Name> VIA SELECTION-SCREEN
USING SELECTION-SET <VARIANT>
AND RETURN. -
How to run batch programs using SUBMIT command without any interaction need
Hello ABAP gurus,
I have created a batch program in SE38 which calls many other SE38 Programs (Reports).
I have used the command SUBMIT to call the sub programs. There are about 15 sub programs that this main batch program is calling.
It works fine, but after calling each subprogram it stops and I have to manually click on 'Back Button' in green on the sap screen to run the next program in the list. Like this I have to do 15 times to run all the programs in the batch.
Is there a way to avoid this manual intervention and make the program run all the sub programs on its own.
Your feedback will be highly appreciated.
Thanks
RamThanks Sampath for the response.
Yes I am using the option "AND RETURN". So it is coming out of each sub program, and it is at this stage it waits for me to click on 'backward green arrow' to continue to the next.
Here is the code I have used
SUBMIT Z_AS_BI_F0005_EXTRACT WITH S_DATE IN S_DATE WITH P_TEST = 'N' AND RETURN.
SUBMIT Z_AS_BI_DIVISION_EXTRACT WITH S_DATE IN S_DATE WITH P_TEST = 'N' AND RETURN.
SUBMIT Z_AS_BI_COMPANY_EXTRACT WITH S_DATE IN S_DATE WITH P_TEST = 'N' AND RETURN.
SUBMIT Z_AS_BI_CUSTOMER_EXTRACT WITH S_DATE IN S_DATE WITH P_TEST = 'N' AND RETURN.
SUBMIT Z_AS_BI_BRANCH_EXTRACT WITH S_DATE IN S_DATE WITH P_TEST = 'N' AND RETURN.
SUBMIT Z_AS_BI_BUS_UNIT_EXTRACT WITH S_DATE IN S_DATE WITH P_TEST = 'N' AND RETURN.
SUBMIT Z_AS_BI_ADDRESS_EXTRACT WITH S_DATE IN S_DATE WITH P_TEST = 'N' AND RETURN.
SUBMIT Z_AS_BI_CUSTOMER_GROUP_EXTRACT WITH S_DATE IN S_DATE WITH P_TEST = 'N' AND RETURN.
SUBMIT Z_AS_BI_GROUP_EXTRACT WITH S_DATE IN S_DATE WITH P_TEST = 'N' AND RETURN.
SUBMIT Z_AS_BI_PMT_TERMS_EXTRACT WITH S_DATE IN S_DATE WITH P_TEST = 'N' AND RETURN.
SUBMIT Z_AS_BI_REGION_EXTRACT WITH S_DATE IN S_DATE WITH P_TEST = 'N' AND RETURN.
SUBMIT Z_AS_BI_TERRITORY_EXTRACT WITH S_DATE IN S_DATE WITH P_TEST = 'N' AND RETURN.
Any other suggestions or feedback will be appreciated.
Tks
Ram -
Passing dynamic internal table to FM using RFC
Dear All,
Is it possible to pass a dynamic internal table to a function module using RFC?
If it is possible than how do i achive this?Basically not, RFC enabled FM parameters must be defined by a LIKE or TYPE clause. so you may try to use a prededined SAP type wide enough (e.g. TAB512 ) and map the data in the FM and caller program (in Unicode try to use tools like class CL_ABAP_CONTAINER_UTILITIES to map data between actual internal table record and RFC used itab "container" type)
For examples look at RFC enabled RFC_GET_TABLE_ENTRIES FM, and look for where-used program.
Regards,
Raymond -
Call program using submit with variant that changing value
Hi All,
I need to call a report with variant and abstract the data back to my current program.
so far,
i use following method
SUBMIT RFITEMAR USING SELECTION-SET 'XXX'
EXPORTING LIST TO MEMORY
AND RETURN.
DATA list_tab TYPE TABLE OF abaplist.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = list_tab
EXCEPTIONS
not_found = 1
OTHERS = 2.
DATA: L_ABAPLIST LIKE ABAPLIST OCCURS 0.
DATA: BEGIN OF L_ASCITAB OCCURS 0,
LINE(2048),
END OF L_ASCITAB.
CALL FUNCTION 'LIST_TO_ASCI'
EXPORTING
LIST_INDEX = -1
TABLES
LISTASCI = L_ASCITAB
LISTOBJECT = list_tab
EXCEPTIONS
EMPTY_LIST = 1
LIST_INDEX_INVALID = 2
OTHERS = 3.
However, the problem is that i need to get some value from variant 'XXX' and keep changing it.
I have try function module "RS_VARIANT_VALUES_TECH_DATA" to get the variant details.
But, it just doesn't get me back all the details of the variants.
Are there any way i could read the variants in detail? i even try to read LRAW data from table vari. but there are no function module to convert the LRAW to either char or STRING.
Thanks.
Edited by: simplekx on Jun 20, 2011 4:43 PMYou can use the FM "RS_CHANGE_CREATED_VARIANT" to change the variant values for already created variant and the FM "RS_VARIANT_CONTENTS" to get the variant values. Instead of changing the variant values and then passing to the Submit, you can directly pass the values to the Submit through..WITH SELECTION-TABLE seltab or ... WITH p IN sel variant of the Submit.
-
Passing parameter values to another report using URL actions (reportserver)
Hi guys,
I have two reports that I link with eachother. For report A - B everything works perfect. When I try to do the same for report B - A it works, but the parameter value is not filled in.
=Iif(
Parameters!PAR_LinksEnabled.Value,
Globals!ReportServerUrl & "?" & Replace(Globals!ReportServerUrl, "_vti_bin/ReportServer", "")
& "Reporting/POS Reporting/Reports/POS Report.rdl&POS_ID=" & Parameters!CONNECTION_ID.Value & "&POS_LANG=" & Parameters!POS_LANG.Value & "&PAR_Date=%5BDate invoice%5D.%5BBonus Calendar - Week%5D.%5BBonus
week of year%5D.%26%5B" & Left(Parameters!YEAR_WEEK.Label, 4) + "%5D%26%5B" & CInt(Right(Parameters!YEAR_WEEK.Label, 2)) & "%5D",
Nothing
Even tho I specify the parameter he has to pass through, the report opens with parameter period : <select a value>. Anyone has an idea why such behaviour happens?
Thanks!Hi Yvanlathem,
Per my understanding that you want to use the expression above to conditional add the hyperlink to pass the value to the parameter of anpother rreport via the URL in the SharePoint integrated mode report server, right?
I have check the expression you have provided and the issue can be caused by the wrong way you have write the expression to pass the parameter, please check detais information below to make sure you have pass parameter in the URL correctly:
Please modify the expression to below structure :
=Iif( Parameters!PAR_LinksEnabled.Value="Enabled", "URL",Nothing)
I saw you have use expression like "&POS_ID=" & Parameters!CONNECTION_ID.Value & "" which is incorrect, we need to set a report parameter within a URL, use the following syntax:
parameter=value(not Value=Parameter)
If you are using the following syntax like "Parameter1=Parameter2", both parameters and from different report, if you have add the "Go to URL" action from report2 to Report1, please make sure Parameter1 is from the Report1
and Parameter2 is from Report2, change the order will not work
More detail information:
Pass a Report Parameter Within a URL
So, In your scenario, please make sure the value is from one report's field (POS_ID) and the the parameter(CONNECTION_ID) is from another report (e.g:"&CONNECTION_ID=" &Fields!POS_ID.Value &"")
Similar thread for your reference:
SSRS 2012 Drill Through report cascading Parameters not refreshing
If you still have any problem, please feel free to ask.
Regards,
Vicky Liu
Vicky Liu
TechNet Community Support -
Best way to pass data sets to another program
Hey
I want to connect another (maths) program with my java application. Therefore I need to paste data (some kind of tab separated table) to this program.
I try now to save these data in a separate newly generated file and to pass a command with Java's Runtime.exec() method to this program to read these data. Is this a good idea or might there be better ways?
If I do so, is there a way in Java to generate some kind of a "temporary" file which will be deleted automatically after usage or is this nothing else than to save it in a common file and delete it afterwards. What's the best way to pass data generally?Well, the connection will not be over a network, so I'd rather think it's not a Socket or RMI problem (unless someone convinces me).
Yes it's very external, it's a C or C++ written program, I don't have any source codes. So far I generated a file for Input command and data, I passed that on to the maths program and returned the output into another file.
Now I would like to separate the output and like to obtain some tables and graphical things like charts at the output. Do I have to generate three different types of outputfiles? How to store some graphics e.g. some distributions. I thought even of generating a database. I never thought about XML, I don't know if this works for that kind of problem?! -
I cannnot eject my iPod classic in Windows 7 because it says there is another program using it
I am unable to eject my iPod classic unless I go to the My Computer in Windows Explorer and hitting eject. I cannot eject it through iTunes. Is there a way to find what program is using it and stop it so that I can eject it through iTunes again?
Also I'd suggest checking to see "Enable disk use" or "Manually manage music and videos" options enabled on the device's summary screen under options because you have to manually eject the ipod before disconnecting the interface cable if either option is enabled. If so, try turning off whichever one is enabled and click apply in the lower right corner. The ipod will re-sync on its own and if that's what the issue was, should auto-disconnect when the sync completes.
-
Control another program using java
how can i control outlook express from my java program
for example i want to view in a textarea the text email that is being deliveredthe reason i wanted to do that is that i created an encryption program, and i want to use this program to encrypt emails.If you have any other ideas of how this can be achieved please share them with me.
Maybe you are looking for
-
I was in the Apple Store today because I was getting duplicate emails on my Mac and on my iPhone. So they encouraged me to just use iCloud. I then went to Gmail and changed my settings to forward my email to my iCloud account. I have received noth
-
How can i LPAD and/or RPAD this query in sql
Hi, I have a column in a table with value 'True Wheel '. I want the result in the following format: 'True*Wheel*****' i.e I want to pad '*' on the right as well as at the centre of the two words. Is it possible ? Please help !
-
Different instructions for disable arch log mode on 11Gr2 RAC server?
Hello all, I've run into a problem where I've lost my tape drive...and have no sysadmins to help. I don't want my RAC instances to run our of space and halt, so I'm planning to take them out of archive log mode, and just do exports daily till I can m
-
Hi all. I've got an iMAC Intel running snow leopard. Today it shut down twice on me while i was on the internet. There was no warning and I had to switch it back on manually. I've had a look in the system log (as this is about the limit of my knowled
-
Fact table and Dimension support
When a datastore is setup, it can be set as 'OLAP type' Dimension, Slowly Changing Dimension or Fact table. I know that for a SCD you then define which columns are the surrogate key, natural key, start/end date etc and then use an appropriate 'Slowly