Pass parameter to program (with LDB) submitted in background
Hello,
For a particular requirement, I need to submit the program RPLPAY00 in background.
I need to extract data for the 'Current Year' which appears as a radiobutton on screen
However, it comes from the logical database PNP
I have written code as follows
*& Report ZRUN_RPLPAY00
*& Author : Kris Donald
*& Date : 15-05-2009
*& Purpose :
REPORT ZRUN_RPLPAY00.
DATA: LV_JOB_NAME LIKE TBTCO-JOBNAME,
LV_JOB_NR LIKE TBTCO-JOBCOUNT,
LV_JOB_RELEASED TYPE C,
LV_JOB_START_SOFORT TYPE C,
LV_PRINT_PARAMETERS TYPE PRI_PARAMS.
LV_JOB_NAME = 'RPLPAY00'.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
JOBNAME = LV_JOB_NAME
IMPORTING
JOBCOUNT = LV_JOB_NR
EXCEPTIONS
CANT_CREATE_JOB = 1
INVALID_JOB_DATA = 2
JOBNAME_MISSING = 3
OTHERS = 4.
IF SYST-SUBRC = 0.
*submit job with all the selection screen params...
SUBMIT (LV_JOB_NAME)
WITH PNPTIMR1 = ''
WITH PNPTIMR3 = 'X'
with PNPBEGDA = ''
with PNPBEGPS = ''
with ALV_LIST = 'X'
USER sy-uname
VIA JOB LV_JOB_NAME NUMBER LV_JOB_NR AND RETURN.
IF SY-SUBRC = 0.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
JOBCOUNT = LV_JOB_NR
JOBNAME = LV_JOB_NAME
STRTIMMED = 'X'
IMPORTING
JOB_WAS_RELEASED = LV_JOB_RELEASED
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 SYST-SUBRC <> 0.
MESSAGE I162(00) WITH
'An error occured while closing the background job.'.
STOP.
ENDIF.
ENDIF.
ENDIF.
SKIP 1.
However when I check the output log it shows the following message
'Pay scale grpg for allowances for 00040011 is not defined on 20040728'
If 'Current year' was selected properly, it would have read as
'Pay scale grpg for allowances for 00040011 is not defined on 20090101'
Does anyone know how I can pass the parameters properly to the program in background ?
Similar Messages
-
Hi,
My Issue is when I execute a program (ZRHECM_PRINT_CRS Copy of RHECM_PRINT_CRS) directily It is generating the output for me in the form of xstring, But when I submit it with same parameter inside a function module It is not going to (get) statement.
This program is using pnpce(LDB)
Is there a problem in submiting a program Using LDB?
Here is what I Submit .What should be done ?
SUBMIT zrhecm_print_crs WITH pnppernr-low = pernr
WITH PNPTIMED = PNPTIMED
WITH p_carea = p_carea
WITH p_ccatg = p_ccatg
WITH p_cplan = p_cplan
WITH p_crevi = p_crevi
WITH pnpbegda = begda
WITH pnpendda = endda
WITH pnpstat2-low = stat2
WITH pnpbtrtl-low = btrtl
WITH pnpwerks-low = werks
WITH pnppersg-low = persg
WITH pnppersk-low = persk
AND RETURN.You don't need two jobs, you can have 1 job with two steps, each step would call the progam with the different variant.
If you want to write a program which submits the program twice with two different variants, you can use the SUBMIT statement. Here VARIANT1 is the name of a variant.
SUBMIT ZREPORT01
USING SELECTION-SET 'VARIANT1'
AND RETURN.
Regards,
Rich Heilman -
Pass parameter between programs
Hi,
I need to pass one parameter between 3 programs :
That is the actual flow of my parameter.
SAPF110V -> RFFOBE_I -> which include ZRFFORI99B)
get param <- RFFOBE_I <- set param
with statments
SET PARAMETER ID 'ZDBL' FIELD p_doublon.
GET parameter ID 'ZDBL' FIELD p_doublons.
But unfortunatly it doesn't work :/ (value of my param = 0)
I can run the include program in debug because it is run in background...
I can't use a Ztable
Any idea to pass value between this flow ?
Thanks,Hello,
The value which you want to pass between the programs can be stored in the SAP memory space by using the IMPORT and EXPORT to MEMORY ID statement.
EXPORT <internal table/variable> to MEMORY-ID 'MY MEMORY'.
Above statement will keep the value in SAP memory by creating a memory named as 'MY MEMORY'.
IMPORT <internal table/variable> from MEMORY-ID 'MY MEMORY'.
Above statement will get the value from SAP memory space.
But while using the above statement please consider that all the three programs should be run in the same session because the Memory that you are using will automatically be cleaned up by the Garbage collector as the session ends.
Hope it helps.
Thanks,
Jayant.
<<text removed - don't ask for points>>
Edited by: Matt on Nov 19, 2008 7:48 PM -
PO Output For Communication Program is not Submitting in Background PO appr
Hi Gurus,
We are working on "PO Output For Communication" Program.We created a Standard Purchase Order and Approved it through the "E-Mail" option checked."PO Output For Communication" program was not submitted in the background.
From the workflow we found that it was stucked at PO new Communication Process.
As the value of column "po_output_format" is NULL in the "PO_SYSTEM_PARAMETERS" table it is not submitting in background.
Already in the front end
Purchasing responsibility->setup->organizations->purchasing options
under Documnet control we assigned Output format column as "PDF".
Will you please provide us your valuable solution as soon as possible.
Thanks in Advance,
RSThis Program "PO Output for Communication" does effects in other parts.
I mean that this program actually sends an email (or fax or print) along with the PO in PDF attachment or in the TEXT format.
This program does other part than the above mentioned point also.If yes then provide me the information in which other parts this program effects.I believe it is only the part you mentioned above.
PO Output for Communication
http://docs.oracle.com/cd/E18727_01/doc.121/e13410/T446883T443960.htm#srs.poxpopdf
PO Output for Communication Search
http://www.oracle.com/pls/ebs121/search?word=PO+Output+for+Communication&format=ranked&remark=quick_search
Thanks,
Hussein -
Error in calling SQL plus program with parameter from Shell script
This is my Shell script. I am trying to call in the SQL plus program with the parameter and the shell script is registered as a concurrent program.
PARAMETERS=`echo $1 |tr -d '\"'`
DB_USER_ID=`echo $PARAMETERS|cut -d" " -f3|cut -d"=" -f2`
CONN_STRING=$DB_USER_ID
REQ_DATE=`echo $PARAMETERS|cut -d" " -f9|cut -d"=" -f2`
timestamp=`date +%m-%d-%y-%H:%M:%S-%Z`
timestam=`date +%y-%m-%d`
sqlplus -s $CONN_STRING @ar_statement.sql $REQ_DATE
chmod 755 statement.sh
. statement.sh
My Sql plus program is like this.
set pagesize 0
set heading off
set feedback off
spool $GEC_TOP/log/ge_ar_statement.sh
select output_file_name
from fnd_concurrent_requests
where trunc(actual_completion_date) = '&2';
spool off;
exit;
When i run the concurrent program, i am getting the following error:
ar_statement: line 14: REQ_DATE: command not found
Enter value for 2:
User requested Interrupt or EOF detected.
ar_statement.sh: line 1: Enter: command not found
ar_statement.sh: line 2: User: command not found
ar_statement
Program exited with status 127
I am not strong at Unix Porgamming and i would request someone who can
help me out as soon as possible.
I need this solution quickly and thank everyone in advance.
Thanks.Can you put your coding between code statements, like shown in the FAQ. It will be easier to read.
Looking at your script, my first guess is that crontab will not find your sqlplus since your script does not have $HOME/bin in the $PATH. From what I understand, running .profile in your script will not work either because variables are exported to sub-shells, not to the shell above. You can call your script with a dot like . ./script which means that the script will run like it was typed at the command prompt. But it will be less confusing to define appropriate variables in the script. eg.
ORACLE_SID=my_instance_name
ORACLE_HOME=/my_path_to_oracle_home_directory
LD_LIBRARY_PATH=$ORACLE_HOME/lib
PATH=$ORACLE_HOME/bin:$PATH
I remember some slightly different way of coding to handle the sqlplus return codes.
For instance:
sqlplus -s /nolog > /dev/null <<-EOF
connect system/manager
@ssm.sql
whenever oserror exit failure
whenever sqlerror exit failure
EOF
sql_err=$?
if [ $sql_err -ne 0 ]; then
echo "FAILURE"
else
echo "SUCCESS"
fiThe - in -EOF supresses tab's
Using connect will prevent ps from showing your login credentials
In some versions of bash the ending EOF needs to be at the beginning of the line to work.
Edited by: waldorfm on Jul 14, 2010 7:05 PM
complaining about putting code between code delimiters and forgot myself ;-)
Edited by: waldorfm on Jul 14, 2010 7:08 PM
Btw, if you "source" a script running it like . .script, than an exit in that script will log you out. -
Dear All,
I am getting a below error while doing ehp6 installation on sybase (high availbility )
can any one help me on this..?
An error occurred while processing option SAP Business Suite 7i 2011 > Enhancement Package 6 for SAP ERP 6.0 > SAP Application Server ABAP > SAP ASE > High-Availability System > Database Instance( Last error reported by the step: System call failed. Error 2 (The system cannot find the file specified. ) in execution of system call 'CreateProcessAsUser' with parameter ( , NULL, Program Files/sapinst_instdir/BS2011/ERP606/AS-ABAP/SYB/HA/DB, &StartupInfo, &ProcessInfo), line (646) in file (d:\depot\bas\720_rel\bc_720-2_rel\gen\optu\ntamd64\ins\sapinst\impl\src\syslib\synxcchapp.cpp), stack trace: d:\depot\bas\720_rel\bc_720-2_rel\gen\optu\ntamd64\ins\sapinst\impl\src\ejs\ejscontroller.cpp: 181: EJSControllerImpl::executeScript() d:\depot\bas\720_rel\bc_720-2_rel\gen\optu\ntamd64\ins\sapinst\impl\src\ejs\jsextension.hpp: 1059: CallFunctionBase::call() d:\depot\bas\720_rel\bc_720-2_rel\gen\optu\ntamd64\ins\sapinst\impl\src\osmod\iaxxbprocess.cpp: 423: CIaOsProcess::start_impl() d:\depot\bas\720_rel\bc_720-2_rel\gen\optu\ntamd64\ins\sapinst\impl\src\syslib\synxcchapp.cpp: 238: CSyChildApplicationImpl::start(false) d:\depot\bas\720_rel\bc_720-2_rel\gen\optu\ntamd64\ins\sapinst\impl\src\syslib\synxcchapp.cpp: 262: CSyChildApplicationImpl::doStart() .). You can no
Regards,
Letz..Hello Mauricio.
Thanks
Two Thinks:
1.- This error appears precisely in the process of creating SAP users including you mention sidadm:
A.- Execute sapinst
B.- Installation option is chosen
SAP NetWeaver CE Production Edition
Installation Options
High-Availability System
Central Service Instance (SCS)
c.- System ID, Next and appear message error
2.- However, the user manually create sidadm, I gave the permissions you indicate, and the error message is the same
Thanks -
Submitting a dynamic program with layout name
Hi,
I searched many blogs and the SDN forum but couldn't find a solution.
I need to know the layout fields of an ALV report for a later usage. Let me explain it with code:
I used below code to extract data of a dynamic program.
cl_salv_bs_runtime_info=>set(
EXPORTING display = abap_false
metadata = abap_true
data = abap_true ).
Submit (program) USING SELECTION-SET variant EXPORTING LIST TO MEMORY
AND RETURN.
TRY.
cl_salv_bs_runtime_info=>get_data_ref(
IMPORTING r_data = lf_ref ).
ASSIGN lf_ref->* TO <lt_data>.
CATCH cx_salv_bs_sc_runtime_info.
MESSAGE `Unable to retrieve ALV data` TYPE 'E'.
ENDTRY.
cl_salv_bs_runtime_info=>clear_all( ).
CREATE DATA lf_ref1 LIKE LINE OF <lt_data>.
ASSIGN lf_ref1->* TO <lt_line>.
What I need is to submit program with a (known) layout. If it is not possible, how can i modify the ALV report to fit a layout's display properties. (If I can manage to get -dynamic program- layout's visible fields, it will work too.)
Thank you.Hi ,
Check this LINK you can take help from this
create dynamic varient and pass to Submit program .
[how to create a variant dynamically and get it?;
OR :
you can use function module to get layout names and reprot
ranges: lr_report for ltdx-report,
lr_handle for ltdx-handle,
lr_log_group for ltdx-log_group,
lr_username for ltdx-username,
lr_variant for ltdx-variant,
lr_type for ltdx-type.
call function 'LT_VARIANTS_READ_FROM_LTDX'
exporting
i_tool = r_tool
i_text = r_text
tables
et_variants = rt_variants
it_ra_report = lr_report
it_ra_handle = lr_handle
it_ra_log_group = lr_log_group
it_ra_username = lr_username
it_ra_variant = lr_variant
it_ra_type = lr_type
exceptions
not_found = 1
others = 2.
regards
Deepak.
Edited by: Deepak Dhamat on Jan 23, 2012 8:18 AM -
Pass parameter with apostrophe
Hi,
How I can pass parameter with apostrophe to a store procedure.Whats the change i need to make to ' when i am passing.
Thanks in advance.
PramodIf you are using bind variables, the string should be escaped automatically. If you are not using bind variables, you should be using bind variables.
Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC -
Infoset with ldb IOC - error in selection parameter
Hi Expers,
could any of You pls help me with an issue - creating infoset with ldb, and get error in selection parameter definiton.
I am about to create an infoset than a query, using IOC logical database, and get a couple of error message related to selecion parameters - such as: error in sel. parameter P_PICK is - Statement concluding with "...TYPE" ended unexpectedly.
I do not really need this parameter for my selection, so I was to delete - but I could not find it amongst the selection fields in actual infoset. When I tried to create it, I got a message: it has already been created (of course), but where can I find / change it if not amongst listed selection parameters (Extras / Selection)
I suppose I can not make any changes in DBIOCSEL - because COOIS is also using this ldb - and it might have some unexpected effect there as well.
Later I started to create a Z*report via SE80, using same ldb, and it works fine.
So it is not a burning issue any more, but still interesting, why infoset has problem with the sel. parameter which is actually not in use.
All usefull answer is appreciated
BrHi,
the selection screen is coded without a number. Here's the code:
SELECTION-SCREEN BEGIN OF BLOCK selection WITH FRAME TITLE text-t11.
SELECTION-SCREEN BEGIN OF BLOCK persdata WITH FRAME TITLE text-t01.
SELECT-OPTIONS so_pernr FOR ls_pa0017-pernr.
SELECTION-SCREEN END OF BLOCK persdata.
SELECTION-SCREEN END OF BLOCK selection.
SELECTION-SCREEN BEGIN OF BLOCK input WITH FRAME TITLE text-t12.
SELECTION-SCREEN BEGIN OF BLOCK zeitraum WITH FRAME TITLE text-t02.
PARAMETERS pa_begda TYPE p0017-begda DEFAULT sy-datum OBLIGATORY.
PARAMETERS pa_endda TYPE p0017-endda DEFAULT '99991231' OBLIGATORY.
SELECTION-SCREEN END OF BLOCK zeitraum.
SELECTION-SCREEN BEGIN OF BLOCK gruppierungen WITH FRAME TITLE text-t03.
PARAMETERS pa_spebe TYPE p0017-spebe OBLIGATORY DEFAULT '1'.
SELECTION-SCREEN END OF BLOCK gruppierungen.
SELECTION-SCREEN BEGIN OF BLOCK zuordnungen WITH FRAME TITLE text-t05.
PARAMETERS pa_bukrs TYPE p0017-bukrs MATCHCODE OBJECT c_t001 DEFAULT '2000'.
PARAMETERS pa_gsber TYPE p0017-gsber MATCHCODE OBJECT h_tgsb DEFAULT '0001'.
SELECTION-SCREEN END OF BLOCK zuordnungen.
SELECTION-SCREEN END OF BLOCK input.
SELECTION-SCREEN BEGIN OF BLOCK attributes WITH FRAME TITLE text-t13.
PARAMETERS pa_test AS CHECKBOX DEFAULT 'x'.
SELECTION-SCREEN END OF BLOCK attributes.
Regards
Mark-André -
Passing parameter with apostrophe to sp
Hi,
How I can pass parameter with apostrophe to a store procedure.Whats the change i need to make to ' when i am passing.
Thanks in advance.
Pramodjust use double apostrophe
SQL> var x char
SQL> exec :x := '''';
PL/SQL-Prozedur wurde erfolgreich abgeschlossen.
SQL> print x
X
' -
Passing parameter with space?
How does java pass parameter value with spaces? e.g. url?param1=value with space .
Is there any built in method like PHP's addslashes?
Thanks.URLEncoder.encode("value with
space","UTF-8")Also the core JSTL tag c:url will encode parameters with spaces, and of course there's the crude way of just using the + sign. -
How to pass parameter through URL to bounded task flow with page fragment
I want to pass parameter to Bounded Task Flow With Page Fragment trough URL
as I start this taks flow with router and according to this Param I will rout the user.
I added input param to taks flow named direction and make the task flow called URL invoke url-invoke-allowed
<input-parameter-definition id="__41">
<name id="__42">direction</name>
<value>#{pageFlowScope.direction}</value>
<class>java.lang.String</class>
</input-parameter-definition>but I don't know how to add this to the JSPX that I will add the bounded task flow Inside.
and How to pass this from URLHi,
url-invoke-allowed is only required if the task flow itself is directly accessible from a browser (which is not the case at all if the task flow uses page fragments). To pass input parameters to a task flow that is embedded in a region and that has input parameters, you define the input parameters on the taskFlow Id that is created in the PageDef file of the containing page. To learn ADF task flows, have a look at the videos below. They also contain a sample for passing parameters to a region
http://download.oracle.com/otn_hosted_doc/jdeveloper/11gdemos/taskflow-overview-p1/taskflow-overview-p1.html
http://download.oracle.com/otn_hosted_doc/jdeveloper/11gdemos/taskflow-overview-p2/taskflow-overview-p2.html
Frank -
I want parameter for program name entering with f4 help pls send code
I want parameter for program name entering with f4 help pls send code
Points if helpfulHi,
PROG is a string which indicates the type of the object --- program
u can call the FM as follows
CALL FUNCTION 'REPOSITORY_INFO_SYSTEM_F4'
EXPORTING
<b> object_type = 'PROG'
OBJECT_NAME = p_report</b>
ENCLOSING_OBJECT =
SUPPRESS_SELECTION = 'X'
VARIANT = ' '
LIST_VARIANT = ' '
DISPLAY_FIELD =
MULTIPLE_SELECTION =
SELECT_ALL_FIELDS = ' '
WITHOUT_PERSONAL_LIST = ' '
IMPORTING
OBJECT_NAME_SELECTED =
ENCLOSING_OBJECT_SELECTED =
STRUCINF =
TABLES
OBJECTS_SELECTED =
RECORD_TAB =
EXCEPTIONS
CANCEL = 1
WRONG_TYPE = 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.
Patil -
How to write c# to pass parameter with craxddrt.dll?
any example provided to open crystal report by passing parameter
after add reference craxddrt.dll etc.
for 8.5 report[Samples|https://wiki.sdn.sap.com/wiki/display/BOBJ/ReportDesignerComponentSDKCOM+Samples].
Also check your Developer Help file...
Adn as Don said, unless you have obtained license for craxDDrt.dll, you are breaking your agreement. Use craxDrt.dll...
Ludek
Follow us on Twitter http://twitter.com/SAPCRNetSup
Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports] -
Passed parameter value to be checked with the retrieved column value
select app.compositename,
(select distinct stringvalue from WFMESSAGEATTRIBUTE where taskid = APP.taskid and name = 'approverPayload') as APPROVERPAYLOAD,
from DEVT_SOAINFRA.WFTASK APP
where APP.TEXTATTRIBUTE6 not like 'Product Data%'
and (:P_REQUESTTYPE like '%JobCha%')
and (:P_APPROVERID is null or
upper(nvl(APPROVERPAYLOAD,'-1')) like upper(:P_APPROVERID || ',%') or
upper(nvl(APPROVERPAYLOAD,'-1')) like upper('%,'||:P_APPROVERID ||',%') or
upper(nvl(APPROVERPAYLOAD,'-1')) like upper(:P_APPROVERID)
above is my query and iam retriving approverpayload based on below select statement
(select distinct stringvalue from WFMESSAGEATTRIBUTE where taskid = APP.taskid and name = 'approverPayload')
and in the where conditions can i check the passed parameter :P_APPROVERID exists in the APPROVERPAYLOAD as i have tried below
and (:P_APPROVERID is null or
upper(nvl(APPROVERPAYLOAD,'-1')) like upper(:P_APPROVERID || ',%') or
upper(nvl(APPROVERPAYLOAD,'-1')) like upper('%,'||:P_APPROVERID ||',%') or
upper(nvl(APPROVERPAYLOAD,'-1')) like upper(:P_APPROVERID)
is my attempt correct if not can any one suggest me how to write it so.You cannot use the column alias in the same level in the where clause as you are doing it. It needs to be done one level higher. So it will look something like this.
select * from
select <column_name> <new_column_alias>
from <table_name>
where <new_column_alias> <operator> <condition>Regards
Raj
Maybe you are looking for
-
Print-time XML data update?
We're researching our options to print artwork with dynamic (i.e. data driven) elements inline with our production process. We have a packaging machine that has an integrated inline printer and we want to send print jobs that contain dynamic data su
-
Hi Friends I'm creating workflow to pull data from SQL server to BW . I've created data flow from SQL table to template table then into BW transfer structure. When I validate the project it sayd no errors but when I execute the jon I get the followin
-
Removing Open With dialog from contextual menus
Does anyone know how to remove the "Open With..." option from contextual menus? Thanks
-
Speeding up and Slowing down Clips
I know how to do this on the older versions of imovie, but this new layout is useless. Anyone know how to speed up clips? Im so confused!!!!!!
-
Windows 2003 DHCP server merge to Solaris 10
Does anyone ever tried to merge a Windows2003 DHCP server to Solaris 10? Especially running this DHCP server in a solaris zone? I have an old windows 2003 server with 100 DHCP clients that needs be be transported to Solaris so we can get rid of this