cancel
Showing results for 
Search instead for 
Did you mean: 

Mass Activity - Error in SAP CPS

Former Member
0 Kudos

Hi guys,

I am trying to run a mass activity from SAP CPS in the ISU system. I imported the mass activity - 0004, the posting and the document date had to be changed dynamically, so I created a parameter set as shown here.

Created a job to copy parameters(these two parameters only). Ran the job, the parameters are created and copied to target id FPMA5

Created a copy of the job SAP_MassActivityTemplateRun -> Used the Target ID as shown and date as today.

So, I am consuming the Identification FPMA5 from the previous job run here. Tried to run it, getting the below error in the SAP CPS system.

com.redwood.scheduler.connector.sap.rfc.connection.exception.SapBapiException: BAPI exception while calling /SCJS/ISU_START_MASS_ACTIVITY: E XM 300 RAISE_EXCEPTION {00,341} Runtime error & has occurred [0004,K2,26.05.2014,FPMA5]
 BAPI exception while calling /SCJS/ISU_START_MASS_ACTIVITY: E XM 300 RAISE_EXCEPTION {00,341} Runtime error & has occurred [0004,K2,26.05.2014,FPMA5] [RAISE_EXCEPTION, {00,341}, Runtime error & has occurred, [0004,K2,26.05.2014,FPMA5]]
Parameters:
  0004
    2014-05-26
  FPMA5
  X
        at com.redwood.scheduler.connector.sap.rfc.jco2.connection.impl.ClientConnectionImpl.checkBapiReturnCode(ClientConnectionImpl.java:727)
        at com.redwood.scheduler.connector.sap.rfc.jco2.connection.impl.ClientConnectionImpl.call(ClientConnectionImpl.java:533)
        at com.redwood.scheduler.connector.sap.rfc.connection.AbstractRfcConnection$4.doPerform(AbstractRfcConnection.java:310)
        at com.redwood.scheduler.connector.sap.rfc.connection.RemoteFunctionCall.perform(RemoteFunctionCall.java:147)
        at com.redwood.scheduler.connector.sap.rfc.connection.AbstractRfcConnection.perform(AbstractRfcConnection.java:481)
        at com.redwood.scheduler.connector.sap.rfc.connection.AbstractRfcConnection.execute(AbstractRfcConnection.java:303)
        at com.redwood.scheduler.connector.sap.rfc.jco2.connection.impl.SapFunctionModuleWrapper.execute(SapFunctionModuleWrapper.java:200)
        at com.redwood.scheduler.connector.sap.rfc.jco.AbstractSapFunctionModule.execute(AbstractSapFunctionModule.java:109)
        at com.redwood.scheduler.connector.sap.rfc.command.impl.AbstractMassActivityRunCommand.startMassActivity(AbstractMassActivityRunCommand.java:264)
        at com.redwood.scheduler.connector.sap.rfc.command.impl.MassActivityTemplateRunCommand.doExecute(MassActivityTemplateRunCommand.java:50)
        at com.redwood.scheduler.connector.sap.rfc.command.impl.AbstractMassActivityCommand.execute(AbstractMassActivityCommand.java:67)
        at com.redwood.scheduler.connector.sap.rfc.command.AbstractXbpCommand.doExecute(AbstractXbpCommand.java:84)
        at com.redwood.scheduler.connector.sap.rfc.command.AbstractCommand.execute(AbstractCommand.java:57)
        at com.redwood.scheduler.connector.sap.rfc.service.operation.RunJobOperation.doWork(RunJobOperation.java:136)
        at com.redwood.scheduler.connector.sap.rfc.service.SapJobWork.doWork(SapJobWork.java:38)
        at com.redwood.scheduler.infrastructure.workqueue.Worker.run(Worker.java:76)
        at java.lang.Thread.run(Thread.java:722)


I now added other parameters into the parameter set, maintained them in the COPY_Parameter job. Even then I get the same error!


I believe my problem is this - I am able to copy the parameters, but passing them to the Mass activity is somehow failing(I am using the MASS_ACTIVITY_TARGET_ID field output from Copy parameters to MASS_ACTIVITY_ID, which I believe is wrong. But I want to use the copy parameter job's output in the mass activity template run). Please let me know.


I followed this guide: Importing and Running Mass Activities - SAP Central Process Scheduling by Redwood - SAP Library


Thanks and regards,

Pavan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi guys,

Sorry, this was an error in the identification itself, the identification given to me had an error and was solved by the functional guys! So, essentially this is resolved.

I have another query though, if I can continue in same thread, I would ask here, or else will create a new thread(for reference for others in future).

I have a job chain consisting of nearly 40 mass jobs. The job chain starts @ 6 PM in the evening and ends at 4 AM next day.

For each mass job, the copy parameters puts the date, but there's an error, for the mass jobs that runs after 12 AM(12-4), the date should be the previous day itself. How do I get this done? There's no consistency in jobs being called at a specific time once the chain starts, it just continues on and on!

So, essentially, for all the jobs that start after 12 AM, i should give previous day(right now, for today I am giving expression =Time.expressionNow('truncate day')). So, guys if you know please help me!

Thanks and regards,

Pavan

h_carpenter
Active Contributor
0 Kudos

Hi Pavan,

I guess this thread is ok, since it is still about mass activities.

So, why do you not specify the parameter at job chain level, that way it will have the correct date for child jobs. You then map the parameters of the child jobs to that job chain parameter.

Regards,

HP

Former Member
0 Kudos

Hi HP,

Could you give me an example of how I have to do that??? I checked this in the admin guide, but could not get information.

Warm regards,

Pavan

h_carpenter
Active Contributor
0 Kudos

Hi Pavan,

To create a job chain-level parameter, proceed as follows:

  1. Go to Definitions > Job Chains and choose Edit on your job chain
  2. In the job chain editor, click on the Parameters tab
  3. Click Add, fill in Name, for example MASS_ACTIVITY_DATE, fill 0 into Display Order.
  4. In default expression field, fill =Time.expressionNow('truncate day add 3 days')
  5. Make sure Display is checked, click Save
  6. Submit the job chain, you will notice that the date is as expected, cancel the submit.
  7. In the job chain, go to the job for which you want to set the parameter and choose Reference, select the job chain parameter.

The above will use the date at submit time + 3 days, if you want to use the runtime date, when the job chain starts, you disable Display and enable Runtime, remove 'add 3 days'.

Hope that helps.

Regards,

HP

Answers (1)

Answers (1)

abhishek_singh29
Active Participant
0 Kudos

Hi Pavan,

EXM 300 is releated to SAP errors. Could you please check the temaptes that you have created in SAP for 01.01.2001 date id.

Use below in JC:

TARGET DATE ID =Custom_AWS.calcChainRequestTime(jobId)

So when you submit the main job, it will calcuate that submit date for partiuclar job chain. I hope you all combine all jobs in a single chain.

Please note, if you have submitted the job today and you will release in next week then it will run with today's date. Please over due action in JC.

Please let know if require more details.

Regards,

Abhishek Singh

Former Member
0 Kudos

Hi Abhishek,

Yes, that was an error in the information given to me, the input had a reconciliation key and the input given to me was wrong, hence that error.

Thanks for the information though, this seems usable. I would use this.

Warm regards,

Pavan

Former Member
0 Kudos

Hi Abhishek,

How do I add 3 days or subtract 3 days from this.

What I was doing: MASS_ACTIVITY_DATE = Time.expressionNow('truncate day add 3 days')

With your expression, how do I add/subtract days. It'd make my life easy

Thanks and regards,

Pavan

h_carpenter
Active Contributor
0 Kudos

Hi Abhishek,

You appear to have a Custom_AWS library in your CPS, could you please confirm this ? If this is the case, Pavan cannot use that call, as he most certainly does not have your custom library 😉

Regards,

HP

abhishek_singh29
Active Participant
0 Kudos

Hi HP,

Yes, you are right

Regards,

Abhishek