Pass Parameter in ABAP Extract STAGE

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
akroy2011
Participant
Posts: 5
Joined: Mon Jul 18, 2011 12:46 pm

Pass Parameter in ABAP Extract STAGE

Post by akroy2011 »

I want to pass a parameter "p_Date" with value '20110701' in an ABAP program.
But the ABAP program is not considering this parameter.It is fetching all records.
please suggest.
ShaneMuir
Premium Member
Premium Member
Posts: 508
Joined: Tue Jun 15, 2004 5:00 am
Location: London

Post by ShaneMuir »

How are you passing the parameter to the ABAP program?

If you are using the build query functionality, then in your where clause you just put your parameter in the column/value in the usual fashion (ie #parameter_name#).

If you go over to the SQL tab you will see that this gets interpreted into something like
SAP~FIELD = DS_JOB_PARAM@parameter_name

If you are writing the ABAP yourself then you'd have to do something similar in the actual program.
akroy2011
Participant
Posts: 5
Joined: Mon Jul 18, 2011 12:46 pm

Post by akroy2011 »

That problem got resolved.I put quotes in parameter of where clause.

where ERDAT>='#p_Date#'

It is working fine if I run the job manually.

Now I have created another ABAP code for KONV.
When I pass a string as job parameter to ABAP code & run job manually it works fine.
But when I pass same value through sequencer,it is not fetching any value.
The value passed by sequencer to job is exact same.

Any suggestion?
PhilHibbs
Premium Member
Premium Member
Posts: 1044
Joined: Wed Sep 29, 2004 3:30 am
Location: Nottingham, UK
Contact:

Post by PhilHibbs »

akroy2011 wrote:...But when I pass same value through sequencer,it is not fetching any value.
The value passed by sequencer to job is exact same.
Have a look in the job log in Director, open up the entry that contains the environment and job parameters, and compare side by side a run from the sequence and a run from outside the sequence. Are they completely identical?
Phil Hibbs | Capgemini
Technical Consultant
Post Reply