cancel
Showing results for 
Search instead for 
Did you mean: 

Macro to give out Product, Customer info.

Former Member
0 Kudos

Hi

In my SCM 7.0, I want to find all Product, Customer combination where the Key figure value is less than 5.

Can anyone suggest me what function I should chose in Macro Builder and give the logic ? I need to run for all CVCs in the system to check and list out the chars of product and customer together. & How that will be displayed ?

Thanks

venkat

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member209769
Active Contributor
0 Kudos

Hi Venkat,

1) If you want to get an alert log of the product/customers, that would be simple:

Create a macro that would check if the KF is less than 5. Use this macro in a dynamic alert in alert profile.

Create a background activity and background job for this macro. Use a selection profile in the background job variant which has all the products and all the customers as per your requirement.

Maintain the aggregation level in the background job variant as only the product and customer.

In the macro above, generate a dynamic alert in case of issues. After the job finishes, alert logs for this job can be seen by the user and they can take action as required.

2) If you want to generate a list of the product/customers combination where KF value is less than 5, then I think you would need to create a custom program for this. The program would check the KF against the product/customer combination and display the results as you need.

Thanks - Pawan

Former Member
0 Kudos

Hi Pawan,

Thanks for the idea. I would like the CVCs to be displayed. How the custom program can be written ?

Is it not become a big program for to understand by ABAPer and understanding LC ?

Can't we use some standard Business Macro, If there is any available ?

Pls let me know if you have other option also. I will try here diff methods.

Thanks

Venkat

former_member209769
Active Contributor
0 Kudos

Hi Venkat,

If you want to write a program for this requirement, you could use the Function Module BAPI_PBSRVAPS_GETDETAIL2 to get the required KF (Key Figure) data:

1) Specify only the KF that you need

2) Use group by as the material and customer.

If you could give some more selection criteria e.g. if you could specify the customer while running the program, that would improve the performance. But if you need to check for all the CVCs, then it might not be possible.

In the program, you can then check whether the KF value is less than 5, and if yes, then the cutomer-product combination would be stored in an internal table.

At the end of the report, you could display all the customer-product combinations in a list to the user. It would even be possible to export such lists. Any ABAPer can easily help you with such things.

Hope this helps.

PS: If your KF is a standard one, then there is chance that some standard macro is available. Otherwise also, writing a macro which just checks a KF value is a very basic activity.

What KF are you trying to check to be less than a certain value? But in this case, you won't get a list of the customer-products as a list. Alerts would get generated, and your planners need to have a look at alert monitor and take corrective actions as required. This is the SAP standard way for the planners to work by looking at alerts.

Thanks - Pawan