cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in copying the KF values using Macro (In BG)

Former Member
0 Kudos

Hello,

I'm trying to copy the keyfigure value from KF1 to KF2 in SNP using macro.

It works perfectly when I execute it interactively. But I when execute the job in the backgroud for copying its not working. Please let me know what might be the problem? (Version: SCM 4.0)

Thanks,

Siva.

View Entire Topic
Former Member
0 Kudos

When you execute it in background you normally assign a selection ID for the DP background job for which the macro is to be executed. If the concerned materials are not being picked up by the selection ID or not assigned properly to the background job, then you may find the macro may not be executed for that selection. Also check out the settings of DP background job such as aggregation level at which the macro is to be executed.

By the way, what does the SM37 log say for the background job? Let us know any error messages which may be helpful in diagnosing your issue.

Cheers,

Srinidhi

Former Member
0 Kudos

Hello Srinidhi,

The job doesn't show any error. Log says 'data saved successfully' but still I'm not able to c the data in my planning book. But few products the log says 'data is not saved'. Please let me know what might be the problem (All the details for activites and jobs are correct).

Thanks,

Siva.

somnath_manna
Active Contributor
0 Kudos

Remember KF copy macro saves data in TimeSeries leyfigures.

Especially in SNP most keyfigures are Order Series or Auxiliary Keyfigure (like Total Demand, Total Supply) which cannot be copied and saved by Copy Macro especially in background.

Somnath

Former Member
0 Kudos

Go to the spool list and check whether all CVCs that come under the selection ID you selected in the background job are displayed here. The CVC will be displayed based on the aggregation level you select in the backgroudn job.

When the result of the calculation is same as the previous result you normally get the message 'data is not saved' with amber traffic light, even though the macro has executed succesfully.

Another point which comes to my mind is, whether the selection is locked when your job ius running. Ensure that nobody is logged in Interactive Planning in 'change' mode while your background job is running.

Cheers,

Srinidhi

Former Member
0 Kudos

I'm copying the values from 9APSHIPLP (Distribution Receipt (Schedule Line)) to 9APSHIPBE (DistrReceipt (Scheduling Agreement Confirmation)) but still there is a problem in copying during background.

Former Member
0 Kudos

I believe these are order series keyfigure and hence its not working.

Can you please verify?

Former Member
0 Kudos

Why can't I copy the keyfigures values with macro in the back-ground?

Is this the behaviour of SAP?

Pls let me know how can I handle this.

Thanks,

Siva.

Former Member
0 Kudos

Hi Siva,

In SNP you cannot copy KF1 ==>KF2 the reason is these two KF's are order series. But you can create 2 time series key figures manitain this Key figure semantic as 001 (Time series). Then copy the SNP KF1 to KF3 by writing a maco.

Macro

KF3

Add step

KF3=

KF1

then define a activity in DP using the t-code /sapapo/mc8t here assign the macro to activity.

Then define the DP background job, here assign created activity and seletion ID. Make sure all the Location product exist in your data view. Then using the report /sapapo/ts_batch_admin create background job in SM37. This job will copy your KF1 value to KF3.

Here you have to make sure you have defined the selection ID properly, macro, DP activity and DP background job. If this have been taken care I'm sure you can copy the KF1 value to KF

Let me know if you find any difficulty.

Regards

KRN

Former Member
0 Kudos

Hi Siva,

In SNP you cannot copy KF1 ==>KF2 the reason is these two KF's are order series. But you can create a time series key figure KF, and manitain this Key figure semantic as 001 (Time series). Then copy the SNP KF1 to KF3 by writing a maco.

Macro

KF3

Add step

KF3=

KF1

then define a activity in DP using the t-code /sapapo/mc8t here assign the macro to activity.

Then define the DP background job, here assign created activity and seletion ID. Make sure all the Location product exist in your selection ID Then using the report /sapapo/ts_batch_admin create background job in SM37. This job will copy your KF1 value to KF3.

Here you have to make sure you have defined the selection ID properly, macro, DP activity and DP background job. If this have been taken care I'm sure you can copy the KF1 value to KF

Let me know if you find any difficulty.

Regards

KRN

Former Member
0 Kudos

Hi KRN,

Thanks for ur valuable suggestion.

Regards,

Siva.

Former Member
0 Kudos

Hi KRN,

I tried executing the macro with ur logic but still it's not working.

I took 3 figures KF1 (Order Serires), KF2(Time Series) and KF3(Order Series).

KF1 to KF2 copy works fine but KF2 to KF3 copy is not working.

Please let me know what might be the issue.

Thanks,

Siva.