cancel
Showing results for 
Search instead for 
Did you mean: 

Performance Issues

Former Member
0 Kudos

hello all,

Currently we are going through our UAT testing and load testing.

for this reason we are processing more than 10 lacs Sales order daily through ECC, GTS, TM,EWM.

I have plugged EM with all these modules. GTS is a different system ( custom code is present for events ) , ECC is different system ( custom code present ), TM & EWM in a single system ( using standard for TM and custom for EWM ). Our EM is in a different system.

We are on EM 9.2 and also on all the latest versions and service packs of all other boxes.

But i can see the performance of GTS and ECC system very slow compared to TM,EWM.

Meaning the queues are executing very slowly for GTS and ECC ( Sales order ).

Can anyone please suggest some things to enhance our performance.

really appreciate if anyone helps me on this as i am stuck on this very badly.

regards

Mainak Sen

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Daniel, Vishnu and Gopi,

Thank you for your suggestions. I have created a relevance function module and replaced the condition with the FM. Code as follows -

*** EVENT HANDLER RELANCE

   FIELD-SYMBOLS:

*   Work Structure for Sales Order Header New

     <ls_xvbak>     TYPE /saptrx/sd_sds_hdr.

* Check if Master table is Sales Order Header or not.

   IF i_app_object-mastertabdef >< 'SALES_ORDER_HEADER_NEW'.

     PERFORM create_logtable_ao_rel

       TABLES c_logtable

       USING  space

              i_app_object-mastertabdef

              i_app_obj_types-trrelfunc

              i_app_object-appobjtype

              i_appsys.

     EXIT.

   ENDIF.

* Read Master Object Table (Sales Order Header - VBAK)

   ASSIGN i_app_object-mastertabref->* TO <ls_xvbak>.

     e_result = abap_false. "false_condition.

   IF <ls_xvbak>-auart = 'TA'. ( Sales document type )

     e_result = abap_true."true_condition.

   ENDIF.


But after putting this FM, the event handler stopped getting created only.


This is the screen shot from SLG1.

But if i again switch it back to the Condition, event handler creation works fine.

I am not sure what mistake i am committing.



Former Member
0 Kudos

Code looks ok visibly. Put a break point and see what's your e_result value is 'T' or 'F"? Your SLG1 doesn't tell us much.

Thanks,

Vishnu

Former Member
0 Kudos

Hello Vishnu,

Thanks for this input. My mistake was that i was passing ABAP_TRUE in E_RESULT.

Now it worked for me.

Thanks

Mainak Sen

Answers (5)

Answers (5)

Former Member
0 Kudos

Thank you guys for all your valuable inputs.

My mistake in the code was that i was passing ABAP_TRUE instead of 'T' or 'F'.

I will keep this loop open as i am doing all sorts of performance enhancements in my project.

So i will be needing guidance for you all and your wise wisdom.

Thanks once again.

Regards

Mainak Sen

Former Member
0 Kudos

Hi Mainak,

So you want to solve your performance issue in one thread


Regards


GGOPII

Former Member
0 Kudos

Hi Mainak,

I agree with Gopi. It's tough to track the issues in one thread. You can keep this open but use a different thread for non-performance related issues.

Based on experience, you can resolve most of the issues by simply putting a breakpoint on:

/SAPTRX/EVENT_MGR_COMMUNICATE or /SAPTRX/BAPI_EH_POST -> for EH creations/Updates

/SAPTRX/EVENT_MGR_COMMUNICATE or /SAPTRX/BAPI_EH_ADDEVENTMSG_02 -> for Events

For performance, follow all the recommendations provided by all the members in this thread and additionally we can provide more inputs if you have any specific issues.

Thanks,

Vishnu

Former Member
0 Kudos

Hi Mainak,

Check this thread which we have discussed on few performance issues also.

Regards


GGOPII

Former Member
0 Kudos

Hi Mainak,

1. I assume you have selected A Check Function (Function Module) and entered functional module in EM Rel. Function

2. You have to enter Main table to link Master table.

So maintain workstruture and code for Main table as well. Ref - FM /SAPTRX/XRA_MM_ITEM_PCM10

.

3. Control Table Tab - Main Obj. Table SALES_ORDER_ITEM_NEW and SALES_ORDER_HEADER_NEW


Check and let me know.


Regards



GGOPII

Former Member
0 Kudos

Hello Guys,

I am checking all scenarios to improve the performance. And when creating a Relevance condition for

ESC_SORDER, in the application object type, there is MASTER TAB - /SAPTRX/SD_SDS_HDR.

Inside this structure i wanted to use document type - AUART, as i am not able to find document type field in main table - VBAPVB.

I just want to create event handlers for some particular document types.

But  /SAPTRX/SD_SDS_HDR-AUART is not working.

Same thing happened for Relevance condition for event types.

Can you guys please point out what is the mistake i am making here or is there something else i need to do to use SALES ORDER DOCUMENT TYPE as the relevance  condition.

regards

Mainak Sen

Former Member
0 Kudos

Hi Mainak,

What do you mean by "/SAPTRX/SD_SDS_HDR-AUART is not working.". How are you trying to access it or use in relevance condition.

Provide a sample snippet from your code here and your relevance setup.

Thanks,

Vishnu

Former Member
0 Kudos

Hi Mainak,

Document type AUART belongs to header document table VBAK but you are trying to access through SO line itemVBAPVB-VBAP.  You can access through /SAPTRX/SD_SDS_HDR-VBAK AUART.

Check and let me know.

Regards


GGOPII

Former Member
0 Kudos

hello Vishnu,

I am sending u some screen shots.

In this structure – There is a field

I want to use this field and the value in this field like below –

And the value will Be OR ( Standard Order )

So using this field if I create a condition

/SAPTRX/SD_SDS_HDR-AUART = OR then it’s not considering.

In SLG1 I can see this entry.

So I have changed it to Item category now. But I need to use Sales Document type.

Can you help.

regards

Mainak Sen

Former Member
0 Kudos

Hello Gopi,

I am doing the same.

But its not working.

Send some screen shots.

regards

Mainak Sen

Former Member
0 Kudos

Hi Mainak,

Can you show the screen shot of condition to check quickly?

Regards


GGOPII

Former Member
0 Kudos

Hi Mainak,

Your condition should be like below:

               Express. 1                                                  Operator      Express. 2          And/Or

&/SAPTRX/SD_SDS_HDR-Sales Document type&          =                    OR                     or

Ref this - ESC_SHIPMT -> TRA10_DELIV or ESC_SHIPMT ->TRA10_SEA to use multi condition.

Regards


GGOPII

Former Member
0 Kudos

Helo Gopi,

My condition looks like this.

&/SAPTRX/SD_SDS_HDR-Sales Document type& = Where did you find this field ?


regards

Mainak Sen

Former Member
0 Kudos

Hi Mainak,

Your relevance condition looks OK to me. I think your AO Type setup might be the problem?

You should have used Main = SALES_ORDER_ITEMS_NEW and Master = SALES_ORDER_HEADER_NEW

I suggest you to use to Relevance function rather than relevance condition.

Thanks,

Vishnu

Former Member
0 Kudos

Hi Mainak,

It looks odd to me as I am not infront of SAP system now so I couldn't check.

how could system understand that condition as &/SAPTRX/SD_SDS_HDR-S because I can see many &/SAPTRX/SD_SDS_HDR-S (e-g document type, Sales Org).

If you use relevance condition, then impact performance so try to use relevance function.

Regards


GGOPII

Former Member
0 Kudos

Hi Mainak,

Follow this path and put the breakpoint and check.

IF_EX_BADI_SD_SALES~SAVE_DOCUMENT -> /SAPTRX/EVENT_MGR_COMMUNICATE' -> /SAPTRX/INTERNAL_EM_COMMUNICAT -> PERFORM check_em_relevance -> /SAPTRX/EVALUATE_AOTYPES ->  /SAPTRX/EVMGMT_REL_DETERMINE -> /SAPTRX/CONDITION_EVALUATOR


Regards


GGOPII

Former Member
0 Kudos

Hey Gopi,

Mainak is not displaying technical names. That's OK.

Former Member
0 Kudos

Use the following code in your relevance function.


ASSIGN i_app_object-mastertabref->* TO <ls_xvbak>.

IF ( <ls_xvbak>-auart = 'OR' ).

     e_result = 'T'.

   ELSE.

     e_result = 'F'.

   ENDIF.


Check the syntax though.

Thanks,

Vishnu

former_member186607
Active Contributor
0 Kudos

Hi Mainak,

usage of relevance functions should ALWAYS be preferred to using relevance conditions in scenarios in which performance is critical. Evaluation of the  conditions is very slow.

The strong recommendation is to NOT use conditions at all - not in the application system, e.g. relevance conditions and not in SAP EM, e.g. in the rule set or for EH Type determination. You should always implement custom functions instead!

Best regards, Daniel

Former Member
0 Kudos

Hi Mainak,

Since you said ECC and GTS are custom code, your code and config together might be creating this issue.

As queues are getting processed slowly, your EM side processing(rules/pre-processing) is definitely a problem.

Without knowing what's your system setup, I suggest you to narrow down the issue so that we can help you better.

I would try to remove custom rules/pre-processing and run a test and do the same thing by putting them back and run the test again. This way you will know which statements/rules are taking long time in performance analysis.

Please add more info and we can narrow down the issue.

Thanks,

Vishnu

Former Member
0 Kudos

Hello Vishnu, Gopi,

Thanks for your responses.

I will do the same.

But i just want to add here that in GTS we have our custom events ( Legal,Embargo,SPL etc blocks ).

So the custom code is only there to check and raise the event from GTS. And in EM system we are using the Status in the rule set to point out if the block is true or false.

There are not much code there.

But in Sales order we have many custom events and custom codes to populate the control parameters.

Those things i will eliminate. But for delivery processing i am useing the standard BPT in ECC.

As well as  for Invoice. But the same performance issue is happening in these queues also.

I have already raised a High priority ticket to SAP - 908503 / 2015 .

Yet to hear from them.

Please suggest.

regards

Mainak Sen

Former Member
0 Kudos

Hi Mainak,

Have you restricted the rules with Event based conditions? If not, I suggest you put in a condition for each event and merge all the related rules for that event. Better to have one rule per event where ever possible.

Since you have too much traffic into EM, let SAP take a look at your system. We don't know what to suggest for performance without looking into your system.

If you can identify any bottleneck, please specify and we can help you.

Thanks,

Vishnu

Former Member
0 Kudos

Hi Mainak,

Can you check with Architect who has done server sizing on SAP ECC (Load testing) and SAP EM side?

There could be some root cause which impacts the performance.  Either the system is doing heavy lifting jobs during peak hours with little resource or each event handler or event message takes time to process to complete.

Regards


GGOPII

Former Member
0 Kudos

Hi Mainak,

There could be different reasons which hits performance on SAP ECC and SAP GTS.

1. The volume of transactions where system couldn't handle that much volume during peak hours - Check this SAP Event Management - Six Key Things To Consider During Server Sizing - YouTube

2. The transactions volume are huge in peak hours.

3. Sales order had more than 20 line items where you have header and item update happens in event handler and interlock each line items.

4. GTS custom functions which impacts the performance in SAP GTS side because you may enhanced custom import/export licensing check before update in SAP EM.

5. You may update same event handler from SAP ECC Sales order and SAP GTS customs document, that would have locked and takes time to update.

6. Check both SAP ECC and SAP GTS queue and ask your ABAPer to debug one of queue.

7. Last, create SAP OSS note and provide the number here.  SAP team can quickly check for you and advise what is the root cause.

Regards

GGOPII