cancel
Showing results for 
Search instead for 
Did you mean: 

Sales Orders to be downloaded to Mobile based on Creation Date

Former Member
0 Kudos

Hello All,

I have a requirement that Mobile Sales users want only the Sales Orders of last 15 months on their laptops.

Is it possible to achieve?

I have tried adding SDGEN_OBJECT/ERDAT field in the replication object and then using it in the subscription. But in the Subscription, I can put only selected values from the calendar.

Are there a way to put the dynamic value of 15 months from current date or any other way to achieve this?

Thanks in advance.

Regards,

Pijush

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Pijush,

You need to check if the replication, publication, subscription have a criteria field "ERDAT". If so, you can create a new subscription with this criteria field (and others if required) and use the greater operator. If you remove the current subscription all sales documents get removed from that laptop and if you assign the new subscription on those SDs are sent to the laptop which are greater than the date specified.

I am not sure if you can design an intelligent subscription which allows you to only have a time interval such as today - the last x months. Probably you have to create a new subscription from time to time to limit the data sent to the laptop.

Regards

Whity

Former Member
0 Kudos

Hi,

I have already tried this, but the filter on ERDAT (GE or BT) does not work. If I assign the subscription created based on this criteria, it does not extract any Sales Orders to the site.

Thanks,

Pijush

Former Member
0 Kudos

Are you sure you put in the date in the right format? e.g. yyyymmdd

Former Member
0 Kudos

Hi Whity,

Thanks for your information. But I am selecting the date from the calendar icon itself. So the format is getting set correctly.

Have you done anything of this type? Is it possible to share some documents/screenshots on this?

I have tried extracting the data as well. But it does not pick any Sales Orders.

Thanks,

Pijush

Former Member
0 Kudos

Hi Pijush,

If you want to modify a replicatin object, you have to unassign (and delete as far as I remember) all subscriptions of that replication object first. You have to be careful with this in a productive environment as it can lead to a collapse of your middleware.

Then you modify the replication object and activate it in DEV. Next step is to transport but be sure that in the target system all subscriptions and publications are already unassigned and deleted.

Then create new publications and subscriptions.

If you follow these steps, it should work.

Whity

Former Member
0 Kudos

Hi,

if your CRM/MSA version is 5.0 or higher you don't have to delete the replication or publication object in case you want to use an additional filter criteria.

You only need to add the new criteria to the replication object, create a new publication based on this field, create new subscriptions and assign them to the sites. Only AFTER this step you should remove the existing subscriptions from the sites to prevent the system to delete first all sales docs and then reassign a subset of them again.

The filter on a date field should work, I suggest you test it with a EQ filter for a particular date.

As it is mentioned already above it is not possible to have a variable field value (like SY-DATE - 15 months) as the MW replication & realignment needs a trigger (creation of a new sales doc or changing the according field) to calculate the delta to be distributed.

What you could do is to create/assign new subscriptions every month with a particular date value which fits to the 15 months interval. Then remove the existing ones which would send deletion messages for the sales docs which are older than 15 but newer than 16 months.

But to be honest I would suggest to do the filtering in MSA directly (and keeping the data there) by adding a new where clause to the sales doc query BDoc which will be filled on the SDC component. In this case you would even be able to calculate the 15 months interval exactly by using the VB date function.

Regards,

Wolfhard

Former Member
0 Kudos

Hi Wolfhard / Whity,

Thanks for sharing lot of information on the same. However, business is not considering this right now.

This is MSA 4.0, so I think, what Whity says, I need to follow to do the changes, whenever it is needed.

But before starting this topic in this forum, I tried to make changes to the replication object SALESDOCGEN_O_W in QA system.

It showed the message that it cannot be changed and I clicked "Cancel". But some post-processing happened and I could see the criteria fields are added to the replication object.

Few days back, when I created some Sales Orders from an MSA QA system, the order went to CRM, got a Sales Order number, but the Sales Order number is not visible in MSA. I tried this from two/three MSA machines and the result was same.

So I guessed that probably changes in the replication object are causing this issue. Can you please let me know whether this might be the case?

I cannot delete those criteria fields which are added. Can you please let me know is there any way to put the replication object SALESDOCGEN_O_W to its previous state before I did those changes?

Thanks a lot in advance,

Regards,

Pijush

Former Member
0 Kudos

Hi,

I don't think that adding criteria fields to a replication object can cause the problem you mentioned above.

But anyway: Did you already check in the transactions smq1, smohqueue, smw01 and especially st22 whether there could be some problem when sending the changes back to the Mobile sites?

If there is a dump or red Bdoc then it might help to regenerate the meta data for the replication and especially the linked publication object (Tx smoggen or gnrwb).

Regards,

Wolfhard

Former Member
0 Kudos

Hi Wolhard,

Thank you very much for your suggestion.

I could not find any error except SMW01. In SMW01, I can find many error (similar). The details are below.

BDoc Type: BUS_TRANS_MSG

BDoc State: Technical Error (Incomplete)

Error Message: Could not determine module name: BUS_TRANSACTION_MESSAGE GENKEY: REP_GET_RECIPIENT

Service that caused the error : SMOH_REPLICATION_WRAPPER_MSG

I have generated the BDoc Type, Replication Object and Publication Object for Sales Transactions using txn SMOGGEN.

Please let me know whether I need to generate the above objects for BUS_TRANS_MSG or it is related to something else.

Thanks a lot again for all of your help.

Best Regards,

Pijush

Former Member
0 Kudos

Hi,

I guess that the BDoc processing has been stopped (see smw01) because there is some issue with validating within the linked ERP system.

Please check Tx smq1/smq2 in both systems (ERP/CRM).

As this topic is quite complicated you should create an OSS message for that.

Regards,

Wolfhard

Former Member
0 Kudos

Hi Wolfhard,

Thanks for your suggestion.

Using txn: SMOGGEN, I have generated the BDOC Type and other related objects for BUS_TRANS_MESSAGE. And after that, re-processing the error BDocs is successful.

This message is now closed.

Regards,

Pijush

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Pijush,

You need to check if the replication, publication, subscription have a criteria field "ERDAT". If so, you can create a new subscription with this criteria field (and others if required) and use the greater operator. If you remove the current subscription all sales documents get removed from that laptop and if you assign the new subscription on those SDs are sent to the laptop which are greater than the date specified.

I am not sure if you can design an intelligent subscription which allows you to only have a time interval such as today - the last x months. Probably you have to create a new subscription from time to time to limit the data sent to the laptop.

Regards

Whity