cancel
Showing results for 
Search instead for 
Did you mean: 

Urgent: Alert with field level info by using UDF

Former Member
0 Kudos

Hi Experts,

I have gone through one of blog [https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/4077] [original link is broken] [original link is broken] [original link is broken];

Even I have the same problem too...sender JMS system and receiver R/3 system ( IDOC), But my requirement is creating a alert system with the field level info...like if any error occur in the SXMB_MONI, I am expecting field level error info ( which field is the causes the error some thing like that) rather than a generic alerts. please find the detailed structure below;

Example : Sender ( JMS) and Receiver ( IDoc)

Sender Data Type :

DT_Out_Record

Header

Field 1

Field 2

... upto Field X

Item

Field 1

Field 2

... upto Field X

Note: Please suggest me is this ( UDF to create alerts ) is the best approach or can I use any other approch to do the same with the better performance. If UDF one is the best...suggest me the appropriate steps for that!!

Can anybody guide me or share their experiences with me.

( Points to be rewarded )

-Esha

Accepted Solutions (1)

Accepted Solutions (1)

vijay_b4
Active Contributor
0 Kudos

Hi Esha,

A Alert is based on a Query and certainly you can check value of UDF in a Query.

You will need a query like date field :

SELECT T0.DocNum, T0.PostDate, T0.U_youruserfield, DATEDIFF(DAY, T0.U_youruserfield, GETDATE()) AS 'OVERDUE DAYS'

FROM [dbo].[OWOR] T0

WHERE DATEDIFF(DAY, T0.U_youruserfield, GETDATE()) > 0

Replace U_youruserfield with the actual name of your user field in the production order header.

Reward pointd if this helps

Regards

Vani.

Former Member
0 Kudos

Thanks for the prompt response Vani...

Can you suggest me the approach for my requirement..how can I use these queries in my req?!!!

Please help me out!!

-Esha

Former Member
0 Kudos

Can anybody help me out?!!!!!!

Former Member
0 Kudos

Esha,

Could you provide "real" samples (message and alert) so we can try to find a solution ? If I understand correctly, you'd like to raise alerts within your mapping containing data from the processed document ?

Rgds

Chris

Former Member
0 Kudos

Yes... Exactly..

And, I have already given the input structure ( JMS ) and output structure ( Idoc )...If you required any other info...please let me know?!!

Note: Basically what I required is.... Need to develop some meaningful alerts ( along with some general info like message id, sender sys info, receiver sys info + field level info which field causes the problem ) rather than general alerts ( which gives message id, sender sys info, receiver sys info etc..)

I think you got my requirement...

-Esha

Former Member
0 Kudos

I've designed something similar in some of our mappings, using RFC lookups to raise alerts using calls to SALERT_CREATE module ... Then you can extract some relevant infos or constants from payload and msg headers and supply the RFC call with them !

Chris

Former Member
0 Kudos

Hey,

Can you provide me the related docs for the same

-E

Former Member
0 Kudos

Esha,

I do not have specific documentation about its implementation, but :

1 - import SALERT_CREATE RFC structure definition (I did this in a CORE swcv that is referenced across all needing swcvs)

2 - I built my own RFC lookup wrapper to provide easy to use lookup methods (input as String or DOM object)

3 - I built SALERT_CREATE input structures and values in a dedicated static class called in my mappings

4 - this class calls RFC lookup wrapper method that serialize those input values and calls the suitable RFC receiver channel with the whole msg containing alert details (providing category and containers are defined in ALRTCATDEF)

I'll try to get some source code snippets if you need'em

Rgds

Chris

Former Member
0 Kudos

Thanks for the info Chris....

But I am new to these things....if possible could you please share those code snippets to me...it would be more helpful for me to complete this scenario.

Thanks n advance.,

E

Former Member
0 Kudos

Can you help me out for the same

Answers (0)