Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Get parameter in background ---creating problem

Former Member
0 Likes
1,922

Hi guys,

I have created a program which will scheduled the the backgorund jobs based on my records.

For ex : I am having 1 lakh records in my internal table.

I am looping my internal table, when count reaches 20000

by using "job_open" ,"job_submit" and job_close.

In "job_submit" i am using another program scheduling

the batch job for good performance of the program.

In my main program i am passing some internal tables by using "SET PARAMETERS".In my another program i am using "GET PARAMETERS" and receiving those internal tables.But my question is how can i check wheather those internal tables have recived data in "GET PARAMETERS" side,in debugging mode.

Note : SUB Program running in Batch mode.

Thanks in advance

6 REPLIES 6
Read only

hymavathi_oruganti
Active Contributor
0 Likes
1,129

1.

<b>WHILE USING set paramer id, no need to use get parameter id in the other side.both purpose is almost same.</b>

<b>but if u r using export/import, u need to use export before submit and import in the called program.</b>

<u><b>difference between the two:</b></u>

<u><b>get parameter id</b></u>DATA: para TYPE tpara-paramid VALUE 'RID',

prog TYPE sy-repid.

GET PARAMETER ID para FIELD prog.

IF sy-subrc <> 0.

MESSAGE 'Parameter not found' TYPE 'I'.

ENDIF.

1.in the above syntax para is a variable for which parameter id is assigned.

2. get parameter id returns sy-subrc.

<u>set parametr id</u>

SET PARAMETER ID: 'CAR' FIELD carrier,

'CON' FIELD connection.

1. the parameter id 'CAR' is static , u cant use variables

Message was edited by: Hymavathi Oruganti

Read only

0 Likes
1,129

Hi Hymavathi,

Thanks for your reply.You have suggested to me write "MESSAGE" here but my second program will be in batch mode.So i think i can not receive any messages from back ground.

1.One more qusetion is whatever the data we set in SAP memory,Is it available to the program which is running in background?

Please suggest me.

Thanks

Read only

0 Likes
1,129

yah, it will be available.

1.if u r calling a report from a report , then u can use export/ import because two reports will alwasys be in <b>ABAP MEMORY</b>.

<b>export <var> to memory id <pid></b> in the program where u r using SUBMIT statement and <b>IMPORT <var> FROM MEMORY ID <PID></b>in the called program

2. IF U R calling a transaction from a report, we need to use SET PARAMETER ID or GET PARAMETER ID befor call transaction.because, two transcations/ a report & a transaction will always be in <b>SAP MEMORY</b>.

only one of the two is needed in the calling program as explained in previous post.

3. If u r calling a report / trasaction from a different LOGON , then they will be in <b>GLOBAL MEMORY</b> then u need to use

<b>export <var> to shared buffer</b> in the calling program

and

<b>import <var> from shared buffer</b> in the calling program

NOTE: ABAP MEMORY IS SUBSET OF SAP MEMORY

SAP MEMORY IS SUBSET OF GLOBAL MEMORY.

so , we can use SET PARAMETER/GET PARAMETER , also in ABAP MEMORY but not the reverse

Message was edited by: Hymavathi Oruganti

Read only

FredericGirod
Active Contributor
0 Likes
1,129

Hi,

I think you cannot pass informations between dialog mode and batch mode. For this particular thing you have to use the command :

export / import ... to shared memory ....

Rgd

Frédéric

Read only

Former Member
0 Likes
1,129

Hi,

I have done a similar development.

I used Export / Improt to /From memory.

It is wroking fine.

May be you can try this approach.

Regards.

Shashank

Read only

vinod_gunaware2
Active Contributor
0 Likes
1,129

hi

You can debug batch jobs by going to 'SM37', type in 'JDBG' in the

command line ( no '/' ), put the cursor on the job and press enter - will

take you to the job in debug mode.

You can do this only after the job has finished execution. This will simulate the exact background scenario with the same selection screen values as used in the job also sy-batch will set to 'X'.

So type in the transaction code 'JDBG' and place your cursor on the job after It has finished. It will take you to a SAP program in debug mode. Step through this program which is about 10 lines, after this your program will be executed in the debug mode.

regards

vinod