cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Action profile

former_member182315
Participant
0 Kudos

Hi Experts - Need some advise as I am unable to decide for the following scenario.

When the quotation end date is greater then the current date then change the status to "Expired".

1- Whether to create a custom program and schedule it with a back ground job to run every day.

Or

2-To control via action profile, but I am thinking in the action profile the user has to go inside the transaction in order for the action to get triggered which we don't want the reason is the user trying to search very bigning with the search criteria of status as "Expired" he should able to see in the search result list all the expired quotes.

Action profile solution only works when the user has to go inside each transaction.

One more point Will this effect the system performance as every time the action is getting triggered when the user open the transaction.

I am not sure if the 2nd solution works or 1st if the 1st work can any body provides what should be the action definition and method, do I still need to create a custom BADI and the method as processing type.

Please advise

Regards

Vani

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Vani

Action Profile would be the standard approach.

Regards

Arden

former_member182315
Participant
0 Kudos

Hi Arden - If Action profile is the standard approach, then can you please help me in the configuration steps :

1 - Do I need to define in the action definition  the processing type as method and if it is method then what should be the Method???

As per standard "SET_DOCUMENT_STATUS" can this be used as method or CRM_ORDER_CHANGE_STATUS???

Please advise.

(still will this be an development as the technical person has to copy the standard badi and make changes in order to achieve the following:

When the quotation end date is greater then the current date then change the status to "Expired".

2 - do I need to define in the processing parameter the expression as "PROCESS" the initial value "Quote expired".

3 - whether do we need to configure for PPF ?

4- Do I need to have a new date type for defining in the schedule condition.

Please advise this is quiet urgent, points will be rewarded.

Regards

Vani

Former Member
0 Kudos

Hi Vani

Answering as best as I can as I presently do not have access to a system

1 - Do I need to define in the action definition  the processing type as method and if it is method then what should be the Method??? - Arden Says:"Yes"

As per standard "SET_DOCUMENT_STATUS" can this be used as method or CRM_ORDER_CHANGE_STATUS???  - Arden Says: "I think you'll need to copy and modify the latter option"

Please advise.

(still will this be an development as the technical person has to copy the standard badi and make changes in order to achieve the following: - Arden Says:"Yes"

When the quotation end date is greater then the current date then change the status to "Expired". - Arden Says:"This is your Start Condition"

2 - do I need to define in the processing parameter the expression as "PROCESS" the initial value "Quote expired". - Arden Says:"In the Start Condition configuration - select Edit Condition. In here is a mini menu where you can select the rules. Basically your going to use Date A > Date B"

3 - whether do we need to configure for PPF ? - Arden Says:"Lets see if we can do this as an immediate update therefore no need to schedule PPF"

4- Do I need to have a new date type for defining in the schedule condition. - Arden Says: "You should be using youe existing Date Types, they should be visible in the Start Condition Configuration"

Regards

Arden

former_member182315
Participant
0 Kudos

Thanks so much Arden for the time take in answering my query, this has helped me.

Still there are questions around action and I am well aware that you love to answer in Y/N but if possible, I repeat if possible to elaborate where needed.

When I use the action profile this will get triggered if and only if the user is going inside the transaction right??( I mean the status get updated to "Quote Expired" when the quotation date is > Current date) will it means that he has to go in every transaction in edit mode in order to get the BADI triggered?? and then save it.

If this is the case the system is eating the performance therefore with another action definition again it will take some system performance. (As there are lot of issues related to system performance here).

Can't we run an initial load by a Z-ABAP program where it will update from the back ground as it will read all the records and where ever it finds the "quotation date is > Current date,  it will update the status to "Quote Expired" and this program we can schedule daily as a background job as a delta.

Kindly advise.

Appreciate your help and advise.

Regards

Vani


Former Member
0 Kudos

Hi Vani

Sorry, was thinking about this last night, you do need to set up the PPF so that it runs at regular intervals, daily will probably suite your scenario.

You can always use a Z batch job, to do this, it's just not the standard approach. Only you and your team can determine the best fit for your scenario.

Make sure that your action is set up so that it only executes once (1 time) and that is when the condition is met and the status updated.

Hope this helps

Regards

Arden

former_member182315
Participant
0 Kudos

Thanks Arden for your valuable advise, one last query which I need to ask you, what is the method I would be using to update the status, do you have any idea.

Regards

Vani

Former Member
0 Kudos

Hi Vani

If you're doing the Action Profile, then you'll most likely need to copy an existing Method and if it's not using CRM_ORDER_MAINTAIN already, you'll need to use that.

If you're using a Z Program, you'll also need to use CRM_ORDER_MAINTAIN as the update mechanism.

Regards

Arden

samantak_chatterjee
Active Contributor
0 Kudos

Hi Vani,

You can use a Report program and schedule it as a Background job. It will be helpful and will save your system resources as it will be executed at a specified interval. You can schedule it at midnight when the system load is usually less. I thought of sharing this idea with you after following the chat history where you have mentioned multiple times that Performance is a major concern.

Also, make sure you include the standard logging mechanism so that you can track all the changes that are made.

Let me know if you need any technical inputs regarding the report program.

Hope this helps.

Thanks,

Samantak.

former_member182315
Participant
0 Kudos

Hi Arden - I am trying to follow the standard approach and followed following steps but here I am observing the system status is updated as "Completed" not the user status, I want to update both the status SYSTEM & USER status.

I followed the following procedure given below:

In action definition :

Method : COMPLETE_DOCUMENT

Element : STATUS

Name STATUS

and data type CRM_J_STATUS.

The inital value is the code  "QUEX" - (quotation expired)

But this is not working can you please somebody guide me, this is eating lot of my time.

Regards

Vani

former_member182315
Participant
0 Kudos

Hi Samantak - I am trying to follow the standard approach, ultimately I will go for your solution if the decision not to follow the standard.

Still can you guide me what is the report program and how schedule to back ground.

Regards

Vani

samantak_chatterjee
Active Contributor
0 Kudos

Hi Vani,

Thanks for your response.

As per my understanding, your requirement is to change the status of the Quotations for which the End Date has expired i.e. the End Date is less than today's date. For all these quotations, you will change the user Status from 'Released' or something else to 'Expired'.

So, in the input of the Report there will 2 fields

1. Process Type of type parameter

2. Date Field - type Sy-datum (defaulted)

3. Logging & tracing enabled - Checkbox


Based on the process type, end date and status you can query the CRM_ORDER_INDEX(please check the table name once), you need to extract the Quotation header guids. Then pass the guids into the crm_order_read and extract the required details - for us here only the status. Then loop the first internal table of selected records and fill the status with the updated/new status - 'Expired'. Finally pass the table to CRM_ORDER_MAINTAIN Function Module. Call the CRM_ORDER_SAVE and BAPI_TRANSCTION_COMMIT Function Modules to persist the changes to the database. You can also call CRM_ORDER_INTIALIZE to refresh the buffers.

At the same time, keep a track of the changes using the BAL_MSG Log functionality.


I hope I was also to provide you the raw algorithm to develop the report. Once the report is tested and finalized you can schedule the same in the background using the transaction - SM35/SM36.


Let me know if you face any issues with regards to code logic or need any additional input.


Hope this helps.


Thanks in advance.


Best Regards,

Samantak Chatterjee.

former_member182315
Participant
0 Kudos

Hi Arden - I am trying to follow the standard approach and followed following steps but here I am observing the system status is updated as "Completed" not the user status, I want to update both the status SYSTEM & USER status.

I followed the following procedure given below:

In action definition :

Method : COMPLETE_DOCUMENT

Element : STATUS

Name STATUS

and data type CRM_J_STATUS.

The inital value is the code  "QUEX" - (quotation expired)


In the start condition I am defining the validation the current: Quotation Valid To& >=(greater then & equal) %Current Date%.

Even I followed one of the thread given, still I am not successful. Kindly advise:::

Changing user status via action profile | SCN

But this is not working can you please somebody guide me, this is eating lot of my time.

Regards

Vani

Former Member
0 Kudos

Hi Vani.

Could you please past the code for the method you're using.

Thanks

Arden

former_member182315
Participant
0 Kudos

Hi Arden - I am using the standard method given below and in the start condition the following validation given below:

Is this the right thing which I am doing:

In action definition :

Method : COMPLETE_DOCUMENT

Element : STATUS

Name STATUS

and data type CRM_J_STATUS.

The inital value is the code  "QUOTEX" - (quotation expired)

In the start condition I am defining the validation the current: Quotation Valid To& >=(greater then & equal) %Current Date%.

Regards

Vani

former_member182315
Participant
0 Kudos

Hi Samantak,

Can you please help me, you have any idea if we follow the standard approach whether I am following the given below steps properly?

In action definition :

Method : COMPLETE_DOCUMENT

Element : STATUS

Name STATUS

and data type CRM_J_STATUS.

The inital value is the code  "QUOTEX" - (quotation expired)

In the start condition I am defining the validation the current: Quotation Valid To& >=(greater then & equal) %Current Date%.

Regards

Vani

former_member182315
Participant
0 Kudos

Hi Arden - One quick question regarding the same, when we follow the standard approach of action profile does the user has to go in each and every transaction in Edit mode in order for the action to get triggered and change the status.

Any idea how to influence the user status as I can successfully update the system status to "FINI" - completed but unable to change the user status.

Kindly help this is very urgent.

Appreciate your patience and help.

Regards

Vani

Answers (0)