Using submit to call RCCLORD program
Hi,
I want to call RCCLORD program in my zprogram by passing the below fields from my z program:
Process order, Plant,Order Type.
Can any one tell me how do i write it.. need the exact syntax to pass the values to the selection screen of the called program.
thanks,
Try something like following
tables :aufk.
SELECT-OPTIONS: S_AUFNR for aufk-aufnr,
S_WERKS for aufk-WERKS,
S_AUART for aufk-auart.
SUBMIT RCCLORD
with S_AUFNR in S_AUFNR
with S_WERKS in s_werks
with S_AUART in S_AUART
AND RETURN.
Similar Messages
-
Using SUBMIT in an ABAP program.
Hello,
There is a need in my function module where I need to take the help of a transaction wherein I would require the values of an internal table ( which is populated somewhere in the transaction program ) to be passed back to my function module where I intend to use these values to populate in a structure and to do some other mumbo jumbo with it.
So, I did the following:
In my function module, I was able to create a structure which would hold the exact same stuff like the data of the internal table in the transaction program.
I then wrote the following SUBMIT code so it jumps to the transaction program to get the values I need.
EXPORT internaltable TO MEMORY ID c_memory.
SUBMIT ZTRANSACTIONPROGRAM
WITH w_param1 EQ '1000'
WITH w_param2 EQ iw_something
AND RETURN.
IMPORT internaltable FROM MEMORY ID c_memory.
What is happening basically is :- When I debug the code, I find that the execution does go to the transaction program I want it to go. But, soon after it jumps back to the calling FM code. ( Is this because of the return statement I have added here?) And, the internal table which is imported is empty. No values whatsoever.
If I want it to go all the way to the line of code in the transaction program - exactly after which that internal table( which I need ) is getting populated - what would I have to do?
I could insert some code which basically says " Hey! If my calling program is "this"(my FM) -> only then copy this particular internal table at this line ( I would want to insert the code at the place where I would need a data transfer) to the memory id. " Plus, I would want this internal table to be exported so I can import it back to my FM and use it. And, may be an EXIT statement after that? So, I would not want the whole of the transaction program to execute.
Could you help me figure out how I need to code this requirement of mine in the transaction program? Is this doable? Please provide how I would need to code this out in the transaction program.
Would appreciate suggestions and alternatives to this approach.
Thanks & Regards,
Alice.Try this code:
1] code for function module:
data: isel type table of rsparams.
data: xsel type rsparams.
data s_matnr type matnr.
loop at it_matnr into s_matnr. "Select option
xsel-selname = 'S_MAT'.
xsel-kind = 'S'.
xsel-sign = 'I'.
xsel-option = 'EQ'.
xsel-low = s_matnr.
append xsel to isel.
clear: xsel, s_matnr.
endloop.
xsel-selname = 'PB_IND'."Radio button
xsel-kind = 'S'.
xsel-sign = 'I'.
xsel-option = 'EQ'.
xsel-low = 'X'.
append xsel to isel.
clear xsel.
xsel-selname = 'DIADATE'. "Parameters
xsel-kind = 'S'.
xsel-sign = 'I'.
xsel-option = 'EQ'.
xsel-low = sy-datum.
append xsel to isel.
clear xsel.
submit zgk_test_program
with selection-table isel
and return.
import t_display to it_display1 from memory id 't_display'.
free memory id 't_display'.
append lines of it_display1 to it_display.
2] code for program:zgk_test_program
export t_display to memory id 't_display'. "t_display is internal table
leave program. -
Sending a pdf file using submit without client email program.
I need a solution on sending a completed pdf file to my email address without the clients email program poping up. My website has a small pdf file that users can complete and return to me. I get many complaints from users stating it requires them to save the file first and then they are unsure were it saved or how to attach it to a email. To make this easer on my users I want the submit button to simply send me the file using some method from my website. I use iPage to host the site now. I was looking for a script to call or some way to do this automaticly. I was woundering if urs/sbin/sendmail might work. I am simply at a loss on this.
Using a sendmail type script will send you the form data in the body of an email message, if the form is set up to submit as "HTML". You can create your own script to attach the form data as an FDF, XFDF, or even the complete PDF, but it's unlikely your provider supplies a script for this, so you'd have some custom programming to do.
Sending just the form data also avoids the licensing restrictions for Reader-enabled forms. You can easily import an FDF or XFDF into a blank form to create a filled-in form. -
Urgent: How to use ORA_FFI to call exe program from Report 6i
We follow report help to use ORA_FFI but it does not work. Kindly help to advise sample code for using it.
Stevenu can solve this problem with lexical parameter.
create a user parameter and use it as lexcical parameter.
create a ur on form with form builder instead of report default parameter form and run reprport with parameters.
here is an exmple that i used.
if :Month is not null and :year is not null and :sjnl_no is not null then
declare
plist paramlist;
begin
plist := get_parameter_list ('list_1');
if not id_null(plist) then
destroy_parameter_list (plist);
end if;
plist := create_parameter_list ('list_1');
add_parameter (plist, 'P_where', text_parameter,'and (doc_no='||:SJNL_NO||')and to_char(doc_date,''MON-YYYY'')='''||:MONTH||'-'||:Year||'''');
add_parameter (plist, 'DESTYPE', text_parameter,:des_type);
run_product(REPORTS,'sale_journal', SYNCHRONOUS, RUNTIME, FILESYSTEM, plist);
exit_form;
end;
else
Message ('Select Moth, Year and Document No. first.');
end if;
Qadeer -
How to use SUBMIT key word in the program in the program
Hello Folks,
I want use SUBMIT statment in the program for calling the other program. My query is
I have one report named REPORT1 and I am using the SUBMIT statment in this report to call the second report named as REPORT2. The flow of the program is I excute the first report REPORT1 and entr the value on selection screen of REPORT1, selection screen is having one parameter. then SUBMIT statment comes into picture to call the second report REPORT2 in this second report, I would like to pass the selection screen value of first report REPORT1.
I want to know how to pass the selection screen value of the first REPORT1 to second REPORT2.
Anyone please guide me in this regards.
Thanks & Regards
ChetanHi Chetan,
Try this report.
Create two reports namely ztry, ztry1 as below.
Run report ztry.
When you run report ztry,
ztry1 will get excuted first(through 'submit'),
getting values from report ztry through 'import' and 'get parameter'.
Report ztry.
*Export and Import
DATA: text(20) VALUE 'Hello',
mem(20).
WRITE:/ 'Export and Import' COLOR = 1.
EXPORT text TO MEMORY ID mem.
SUBMIT zawi_try AND RETURN.
WRITE:/ ''' Hello'' exported to ZAWI_TRY successfully '.
WRITE:/.
*Set and Get Parameter ID
DATA: var(20) VALUE 'Master'.
WRITE:/ 'Set and Get Parameter' COLOR = 1.
SET PARAMETER ID 'abc' FIELD var.
WRITE:/ 'Set Parameter ID is success'.
WRITE:/.
Report ztry1.
DATA: text(5),
mem(20).
IMPORT text FROM MEMORY ID mem.
WRITE:/ 'Importing '' Hello'' from ztry:', text color = 1.
FREE MEMORY ID mem.
write:/ mem.
DATA: var(6).
GET parameter id 'abc' field var.
write:/ 'Value got through Get Parameter ID from ztry:',var color = 1 .
Thanks.... -
Create spool for background jobs which uses submit statement
Hi Gurus,
I have a quick question regarding the backgroud jobs. When we run a program in the background , it should create a spool for us, but, the problem comes when I am running a program in the background, its not creating the spool. This program uses SUBMIT statement. This program collects the data and it will submit to the other program and then retuen. In this case, its not creating a spool. Its very important for us to look at the spool for this program. Does anybody cam across this kind of problem? I need ur inputs.
Thanks in advance, <REMOVED BY MODERATOR>
Regards,
Srinivas.
Edited by: Alvaro Tejada Galindo on Mar 18, 2008 4:31 PMhi check this link ...
Scheduling a submitable program as a background task with the number number in a background request name. After scheduling, the background task is completed by function module JOB_CLOSE and released immediately.
DATA: number TYPE tbtcjob-jobcount,
name TYPE tbtcjob-jobname VALUE 'JOB_TEST',
print_parameters TYPE pri_params.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = name
IMPORTING
jobcount = number
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
IF sy-subrc = 0.
SUBMIT submitable TO SAP-SPOOL
SPOOL PARAMETERS print_parameters
WITHOUT SPOOL DYNPRO
VIA JOB name NUMBER number
AND RETURN.
IF sy-subrc = 0.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = number
jobname = name
strtimmed = 'X'
EXCEPTIONS
cant_start_immediate = 1
invalid_startdate = 2
jobname_missing = 3
job_close_failed = 4
job_nosteps = 5
job_notex = 6
lock_failed = 7
OTHERS = 8.
IF sy-subrc <> 0.
ENDIF.
ENDIF.
ENDIF.
https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=backgroundsubmit&adv=false&sortby=cm_rnd_rankvalue
sy-subrc Meaning
0 Background task scheduled successfully.
4 Scheduling cancelled by user on the selection screen.
8 Error during scheduling, i.e. when accessing JOB_SUBMIT internally.
12 Error in internal number assignment.
regards,
venkat.
Edited by: venkat appikonda on Mar 18, 2008 6:32 PM -
Call another program in a program
Hi friends,
In my program i have push button when i press that it should go to tcode'cje0' and there is parameter which is a report where we ennter the report name in that transation. I should fill that with rep name "112SAPKL", Than it should display the final screen.All the things should be done in the main program itself. When i press push button final should display.
Rewarded if useful.
Advance thanks
siva kumar.Hi
Use SUBMIT to call the report
If you know the transaction code then use CALL transaction
Regards
Shiva -
Calling java program from PL/SQL
I already have a java program that encrypts/decrypts data.
How can I use or rather call this program in PL/SQL?Please refer [url http://download-west.oracle.com/docs/cd/B19306_01/appdev.102/b14261/subprograms.htm#sthref1814]Calling External Subprograms on PL/SQL User's Guide and Reference.
-
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. -
Calling a Report Program In Web Dynpro Using Submit statment
Hi all,
Can any one suggest how can i call a report program form Web Dynpro using Submit statment. I tried to call it its showing Field symbols not defined error. Is their any other ways to call Report in a Web Dynpro?. I have posted the error message when i tried using SUBMIT ZRR AND RETURN CONTROL
Field symbol has not yet been assigned.
The error occurred on the application server mnghcmsap_HRS_00 and in the work process 1 .
The termination type was: RABAX_STATE
The ABAP call stack was:
Form: CHECKBOX_OUT of program SAPLKKBL
Form: GEN_LINE_OUT of program SAPLKKBL
Form: DATA_OUT_SIMPLE of program SAPLKKBL
Form: LIST_OUTPUT_NEW of program SAPLKKBL
Form: FIRST_LIST_DISPLAY of program SAPLKKBL
Module: LIST_DISPLAY of program SAPLKKBL
Function: K_KKB_LIST_DISPLAY of program SAPLKKBL
Method: PRINT_BACKEND of program CL_GUI_ALV_GRID===============CP
Method: SET_TABLE_FOR_FIRST_DISPLAY of program CL_GUI_ALV_GRID===============CP
Form: PBO of program SAPLSLVC_FULLSCREEN
Edited by: VINMANO on Jul 22, 2009 2:54 PMHI,
Its possible to call report program from Web dunpro...
chk out dis link,
calling report(se38) in webdynpro abap
By the way are using field symbol anywhere and left it unassigned?
Thanks,
Divya.S -
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 -
How to catch errors in calling program when using SUBMIT ... AND RETURN ?
Hi ,
I am calling a report using submit and return statement from a function module. The report has select-options field for a date field. If user enters a date in low, which is greater than high, getting error message "Lower limit is greater than upper limit".
How to catch this error without endup stoping on selection screen of the report?
In the documentation, I read :
Programs called with SUBMIT ... AND RETURN or CALL TRANSACTION cannot propagate exceptions to the caller, because exception objects are bound to the internal mode of a program.
Is there any way to overcome this?
Also my aim is to write a validation on the date selection-option to have the date range not more than 20 days.
I am not sure of how to achieve this.
Is there a way to do validation of select-options data before submiting to the report ?
Is there any standard FM to achieve this task?
Thank you,
Surya.
Edited by: Surya on May 24, 2009 6:08 PMHi Surya ,
In your function module's code validate the date .
If the low value of the date less than high and date period is not more than 20 then
call transaction and in else condition raise exception.
In your FM write like that - -
IF date-low LT date-high AND
date_difference LE '20' .
CALL TRANSACTION 'transaction'.
ELSE.
RAISE ........... " Raise the invalid date exception
ENDIF.
Regards
Pinaki -
CALL a report from WDA using SUBMIT to sap-spool
Hi,
I need to call a report from one of the methods of a WDA application.
The out of this report is a sapscript. I want show it in WDA (PDF).
The report is called when a user clicks EXECUTE button.
The piece of the code is:
call function 'GET_PRINT_PARAMETERS'
exporting
immediately = 'X'
new_list_id = 'X'
no_dialog = 'X'
receiver = sy-uname
release = 'X'
sap_cover_page = 'X'
importing
out_archive_parameters = t_arcpar
out_parameters = t_pripar
valid = i_valid
exceptions
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
others = 4.
submit hbrcced0
with pnppernr-low eq i_pernr
with pnpbukrs-low eq t_p0001-bukrs
with pnpbegda eq i_begda
with pnpendda eq i_endda
with p_expot eq ''
with ano eq v_gjahr
with respcc eq v_sachn
to sap-spool
spool parameters t_pripar
archive parameters t_arcpar
without spool dynpro
and return.
if sy-calld eq ''.
message 'err' type 'E'.
else.
If i execute this code in WDA, the sy-calld never is equal 'X'.
But if i execute it in program (SE38) the sy-calld is 'X'.
How i can call the program 'hbrcced0' in WDA ?
Cheers,
Silvio GaleryHi Silvio,
a submit REPORT to spool does work from WDA.
ONLY when "and return" is used.
You have that, so it should work.
Note you had print immediate on, so it will be output on printer,
and not available to read after the call.
(which option was the keep after print?, I would have to check docu)
The sy-calld will be set to X inside the REPORT when it is running.
After the submit has run back inside WDA it is of course reset to space again.
Cheers
Phil. -
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?
ThanksHi 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. -
How to execute the first program without using SUBMIT and RETURN
Hi Experts,
My requirement is , I need to select thet value from VA02 at runtime and need to pass that value to VF01 transaction and press save then it creates proforma document.The created document we can see in VA02 by clicking on document flow.
My program is processed through OUTPUT TYPE.
To get this functionality i written coding like this.
1) i am selecting the value at runtime from VA02 using FORM ROUTINE.Now iam passing this selected value to VF01 for
genarate proforma document using BDC.Here the problem is,first time when i am selecting the value form VA02 at runtime it is in open status,now my BDC code need to update the value in VA02 only.so locking problem occurres the document is not getting updated.
To overcome this problem i have done changes like this......
2) i splited my program into two parts, that is into two programs.
a) In first program i am only selecting the value form VA02 at runtime using FORM ROUTINE and in this program i have written SUBMIT statement to call another program there my BDC code will create documet and update in VA02,upto here everything is doing fine,
But here again the problem is when i process OUTPUT type my program is triggering and giving correct result but the status is not changing form YELLOW to GREEN.Why means when SUBMIT statement trigger, control is going to second program and creating a new document,but not coming to first program so the status is not changing as the first prohram is still processing. .If i write RETURN along with SUBMIT the VA02 is in open STATUS only, till control comes to first program.so it will not uodate document in VA02.
If i execute all line in my program status will automatically change from YELLOW to GREEN how to acheive this
please suggest me the solution.I would do 2 things:
1) be sure to do a COMMIT WORK AND WAIT
2) refresh your display in calling program
the point 2) can be done by submitting the program again (or the transaction) with the same parameters
Maybe you are looking for
-
Hi everyone,,i bought a used iphone 5 with iOs 7.0.3. i want to delete the icloud account and add mine. I have sent an e-mail to the current account being used in my iphone. How can i get rid of this account plzzz help me ou
-
In Adobe Acrobat Pro XI, is there a way to set defaults when combining files?
My specific problem; When I combine files, Adobe creates the bookmarks (which is desirable). These bookmarks however, always seem to default on "page width" view. I would prefer to have the bookmarks set to "fit page". It is very cumbersome to ed
-
Download ALV to EXcel- Urgent pls help me
Please help me in this... I have an ALV report around 120 column. The report is displayed perfectly on screen. But when I use the Export option to download as an excel file, some data is missing in SAP No field For example My report output is like th
-
sometimes LV can't open VI if system crushed (power off) when this VI is opened by LV this trouble appear not every time. I had experimented with this trouble and not found any rule (about dozen attempts and no problem with vi) But yesterday I was on
-
Cleansing Cases in Webclient UI
Hi All, I have followed all of the steps required to merge accounts in the Webclient and have created cleansing cases. in the transaction BUPA_CLEAR you can drag and drop Business Transactions from Source to Target but how does this functionality wor