Counting Entries in  SXMSPMAST via UDF

Hi All,
The requirement is to count number of messages passed in a day through PI and trigger an email.
Idea is to count number of message entries for a day(based on time perioed) in table SXMSPMAST.
How can we count the number of entries in this table using UDF??
Idea is to create File to Email interface.
Trigger FIle adapter at certain interval daily and in message mapping using an UDF count number of messages in in this table and pass it onto target interface which will trigger email...
Any inputs on this UDF please.
Thank you.

Hi,
    In order to achieve this either need to generate the ABAP mapping and use it in Operation/Interface mapping
or generate RFC and do a lokkup of the same using message mapping or udf....
but the necessity here is to generate either ABAP Report mapping or RFC FM for the same...
as the data /table resides in ABAP u cannot go for UDF directly...
HTH
Rajesh

Similar Messages

  • Cycle Count Entries Form not showing specific employee name in "Counted By" LOV List

    Cycle Count Entries Form not showing specific employee name in "Counted By" LOV List.But the Employee is active . Is there any setup for this activity?

    Hi,
    This is because the query is excluding the current site you are trying to modify since it is actually in the report.
    You can include in your query:
    or site_id = :Pxx_SITE_ID
    Where Pxx_SITE_ID is the item holding the site_id value and xx is your page number.
    Thank you,
    Erick

  • Regarding Cycle Count Entries

    Dear All,
    I am doing cycle counting in which I have 10 Items in my subinventory. I have completed ABC Analysis and classified first 2 items as A and next 3 item as B and remain 4 items as C. Even I have performed Cycle Count as well.
    In Cycle count entries i am not able to enter count quantity for my entire 10 items instead it is showing only 6 items only. Why I was not able to see remaining 4 items and how do I enter count quantity for those missed 4 items?
    What would be the solution if i want to see all my 10 items in in cycle count entries form?
    Edited by: SaroR on Jan 20, 2010 6:58 AM

    Can you check mtl_cceoi_action_pub.import_CountRequest api?
    Please make sure you carry out the following before calling the API.
    1. Create a Cycle Count
    2. Enter a Manual Cycle Count Entry.
    3. Run program "Perform Complete Cycle Count" to generate generate cycle count request
    4. Post the count Entries using the by calling the API using your Script.
    Check the following MOS notes.
    Cycle Count Request Import (MTL_CCEOI_ACTION_PUB API) Fails When Using Serial Number Multiple Per Request [ID 1468453.1
    Cycle Count Api Not Working For Scheduled Counts [ID 786497.1]
    The Cycle Count Open Interface Is Not Working For The Stock In Api [ID 818977.1]
    Cheers,
    ND
    Use the "helpful" or "correct" buttons to award points to replies / Mark the thread as answered, if your question is answered.

  • Email via UDF

    HI Guys,
    I am trying to send email via UDF following the below blog.
    http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=90570965&focusedCommentId=268961447&#comment-268961447
    I am Trying to use the one via graphical mapping!!
    I have uploaded the files via Imported Archives and I am trying to execute the UDF.
    It doesnt work!!
    My question is am i missing something?
    what is the host that I can mention ? let us assume that receiver has some email with  gmail
    I hav just uploaded the file which is mentioned!!
    Thanks & Regards,
    VK

    Hey Man,
    Thanks a lot for your answer!!
    Here there is no complexity to go for Java mapping and also let us assume that tracing is not required
    as we are sending the trace only via email to some Admin or End User.
    I will try to check the one which you have mentioned.
    By the way what is the host that I should mention?????
    Thanks & Regards,
    VK

  • Determine Process ID at runtime via UDF

    Hello to all,
    I need to determine the process id (instance) of the workflow (ccBPM) at runtime within a transformation step (message mapping). Is there a way to access the BPE data via UDF similar to the runtime constants (e.g. MESSAGE_ID, ...)?
    Regards
    Gerhard

    [http://help.sap.com/saphelp_nw2004s/helpdata/en/b3/9a2aeb24dc4ab6b1855c99157529e4/content.htm]

  • Count of records input via MM01

    How can we do count of records input via MM01?
    Thanks,
    AP

    Hi,
    it depends of using MM01.
    MARA, MARC, MARD, MVKE etc.
    regards, Dieter

  • CYCLE COUNT ENTRIES화면에서 ADJUSTMENT TAB이 활성화되지 않음

    제품 : MFG_INV
    작성날짜 : 2004-05-20
    CYCLE COUNT ENTRIES화면에서 ADJUSTMENT TAB이 활성화되지 않음
    ================================================
    PURPOSE
    Problem Description
    Cycle Count Entries화면에서 Adjustment tab이 disable되어 있음.
    Workaround
    N/A
    Solution Description
    select cycle_count_header_id, cycle_count_header_name,
    onhand_visible_flag
    from mtl_cycle_count_headers
    where cycle_count_header_name like '&cc_name'
    위의 SQL을 수행하였을 때, on_hand_visible_flag이 '2'가 나온다면, Adjustment tabl이 disable되는 것이 정상입니다.
    Inventory->Counting->Cycle Counting->Cycle Counts에서 새로운 Cycle Count
    를 등록할 때, Scope and Control tab에 있는 Display System Qty를 체크하면 Adjustment tabl이 활성화됩니다.
    Reference Documents
    Bug 3039903

  • BAPI call via UDF in mapping - error handling/stopping processing

    Hi,
    We are calling a BAPI in an ECC system from a UDF in message mapping.  The BAPI then calls other BAPIs to perform translations and validations on the message data.  An error could occur during a translation (for example), and an error flag would be passed back to the UDF (the actual error is persisted and handled in ECC).  What should be done in the UDF to stop further processing of the message?
    Latest PI and ECC releases and service packs.
    Thanks in advance,
    Brian

    Bhavesh,
    Thanks for the replay.
    You guys are scaring me a little....I've reviewed a bunch of blogs, threads and docs about the RFC API...such as Alessandro's SAP XI Lookup API: the Killer .../3404 and the "Mapping Lookups - RFC API" document.  Why would we have something like an RFC API available via a UDF if we can't react to an error should it occur??  In my case, all I want to do is "cancel" the message, or perhaps cause a controlled failure in the mapping so that the message doesn't get to the next step (load into ECC).
    What happens in Alessandro's process if an error is caught (trace.addWarning.....)?  I see that null is returned, but how does that affect the mapping process?
    I appreciate any help
    Brian

  • Blog entry in iWeb via e-mail?

    Hello,
    I have an iWeb blog on MobileMe and wondering if it is possible to add blog entries via e-mail? (This feature would be very handy if one is away from his Mac...)
    Thanks,
    Attila

    Welcome to the Apple Discussions. If you don't have a lot of comments and posts to your current blog I urge you to give careful consideration to what Ethmoid suggests.
    The "commercial" blogging sites are so much more robust and versatile and have the capability of being posted to from any computer anywhere and from mobile devices, i.e. smart phones or iPads.
    You can design the site to approximate the design of your iWeb site and embed it into a page of your site like in this demo: Embed a Site Within an iWeb Page.
    In the long run I think you'll be much better off if you can convert now.
    OT

  • Creating action log entry for incident via SDK in C#

    Hi,
    Does anyone have any example code, or pointer to, of how to add an action log entry (with icon) to an incident? I can't work out what the target for the relationship should be or how to configure it...
    With Thanks,
    Rob

    Anton,
    Thanks for your response! I think the problem may be in how I'm creating "WorkItemMP". In the method below I'm trying to pass in an issue Id parameter to add an action log item to an Issue. 
    How are you creating the  "WorkItemMP"?
    public
    void
    UpdateActionLog(string
    nsId)
    EnterpriseManagementGroup
    emg1 = new
    EnterpriseManagementGroup("server01.xyx.com"
    ManagementPackClass
    classIncident = emg1.EntityTypes.GetClass(new
    Guid(SYSTEM_WORKITEM_INCIDENT_CLASSS));
    // A604B942-4C7B-2FB2-28DC-61DC6F465C68
    EnterpriseManagementObjectProjection
    incidentProjection = new
    EnterpriseManagementObjectProjection
    (emg1, classIncident);
    ManagementPack
    WorkItemMP = emg1.ManagementPacks.GetManagementPack(new
    Guid("DD26C521-7C2D-58C0-0980-DAC2DACB0900"));
    //System.WorkItem.Incident.Library MP
    CreatableEnterpriseManagementObject
    cemoIncident = new
    CreatableEnterpriseManagementObject(emg1,
    classIncident);
    cemoIncident[classIncident,
    "Id"
    ].Value = nsId;
    ManagementPackClass
    typeActionLog = emg1.EntityTypes.GetClass("System.WorkItem.TroubleTicket.ActionLog"
    , WorkItemMP);
    CreatableEnterpriseManagementObject
    objectActionLog = new
    CreatableEnterpriseManagementObject
    (emg1, typeActionLog);
    objectActionLog[typeActionLog,
    "Id"].Value
    = Guid
    .NewGuid().ToString();
    objectActionLog[typeActionLog,
    "Description"].Value
    = "Incident updated via SDK.\n"
    objectActionLog[typeActionLog,
    "Title"].Value
    = "Incident updated via SDK"
    objectActionLog[typeActionLog,
    "EnteredBy"].Value
    = "Administrator"
    objectActionLog[typeActionLog,
    "EnteredDate"].Value
    = DateTime
    .Now.ToUniversalTime();
    ManagementPackEnumeration
    enumeration6 = WorkItemMP.GetEnumerations().GetItem("System.WorkItem.ActionLogEnum.TaskExecuted"
    objectActionLog[typeActionLog,
    "ActionType"
    ].Value = enumeration6.Id;
    ManagementPackRelationship
    relationship2 = emg1.EntityTypes.GetRelationshipClass("System.WorkItem.TroubleTicketHasActionLog"
    , WorkItemMP);
    if
    (incidentProjection != null
    incidentProjection.Add(objectActionLog, relationship2.Target);
    incidentProjection.Commit();

  • Transport request prompted when insert new entries for ADCOMP via SM30?

    When I insert new entries for table ADCOMP via SM30, the system prompts me for a transport request number when I save the entries.  It never asks me the transport no. for any other tables via SM30 edit.  Is it something specific to table ADCOMP?
    The Table Maintenace Generator is delived by SAP with Authorization group assign to VC (SD User Control), will this cause the issue I have here?
    The user is responsible for updating the entries in Production, I had created a Z tcode to run SM30 on this table, at the end, it stills ask for a transport request no. 
    Can someone help me out on this?
    Thanks for your help in advance.

    I had searched OSS notes before I posted my question here.  Note# 726769 mentioned the maintenance view on ADCOMP.  As I mentioned in my last reply, I am NOT going to change anything on ADCOMP, I just create a custom view ZV_ADCOMP on top of it and change the attributes on the custom view.  
    I tried and it seems working.  I can enter data via SM30 on ZV_ADCOMP, it allows me to save the data without a transport request. 
    I think my problem has been solved.  Thanks for Rob and Suhas 's reply.  Points has been rewarded for both.

  • SAP PI7.31 : Mail with multiple attachments - how to process via UDF

    Hi
    wondering how I can approach this problem.   I have to read an Email with any number of attachments  - it can have between 1 and 4 or maybe more of different types (CSV,XLS,PDF,ZIP).  I need to read this email and extract the attachments to a folder.
    Just to let you know I have done this OK for an email that I know only has 2 attachments ! Works perfectly - just no good for ?n? attachments !
       Mail Sender has AF_Modules/MultipartHeaderBean to add payload Attributes
       The message is sent to 2 Receivers
       Each Receiver File adapter then uses AF_Modules/DynamicConfigurationBean and AF_Modules/PayloadSwapBean
    Problem is that when I do not know how many attachments there are.  So I will have to write a Java UDF mapping, perhaps using the classTransformationInput.
    My question is : To create a Java UDF what should be structure of a sent Email message Type look like so I can feed that into a UDF to check what payload attachments there are etc ?.

    As long as you use java mapping, you can have any dummy structures for your interfaces.
    But, if you prefer to use graphical mapping with UDF, then you should have some valid structures for your mail and file interfaces. e.g., mail pack XSD for mail interface as metioned by Indrajit Sarkar
    and again the same structure for the file interface as well so that you can have one to one mapping an then make use of UDF code from the article. Use payload swap bean in the receiver file channel to replace xml payload with Zipped attachments and then finally use script to unzip this zip file.
    Rgds,
    Praveen Gujjeti

  • Writing a query to count entries for all tables

    I'd like to write a query to count the number of rows in every table for a given database. For example, if I have two tables in a database called TEST1 and TEST2 with 20 and 30 rows respectively, I'd like the output of the query to be
    TABLE_NAME          ROW_COUNT
    TEST1               20
    TEST2               30
    Any ideas?

    or justin,
    How about this
    SQL> ed
    Wrote file afiedt.buf
      1  declare
      2  t_count number;
      3  begin
      4    dbms_output.put_line('table_name          Num_rows  ');
      5    dbms_output.put_line('----------         ---------- ');
      6   for i in (select table_name  from user_tables) loop
      7    execute immediate 'select count(*) from '||i.table_name into t_count;
      8    dbms_output.put_line(i.table_name||'       '||t_count);
      9    end loop;
    10* end;
    SQL> /
    table_name          Num_rows
    EMP_TEST         0
    BOOK            2
    MONTH           36
    BOOK_SALES           65
    CURRENCY          2
    EMP          18
    BONUS          0
    DEPT          5
    SALGRADE         0
    PLAN_TABLE         0
    PL/SQL procedure successfully completed.

  • Add new batch during count entry (for cycle count by quant LICC)

    Hi! We are using LICC for cycle counting by quant as we have mixed storage and do not want to count all the materials in a single bin. Most of the materials involved are batch-managed. One issue we have is we may discover other batches during stock take. In this case, how can we add this to the stock adjustment since we cannot add new item when we use cycle counting by quant?
    Appreciate your suggestion in this case.
    Cheers!
    SF

    Hi,
    Whenever you find discrappancies, in this case founds, you will note these down and first do an analysis whether this particular batch has been written off in the past as lost. When not, you will make a MB1À or MIGO booking to add this found batch to stock. When yes, you could do a reversal of the issue or do a new receipt.
    MdZ

  • No counting or cover-view via network

    hi folks!
    when using my iTunes library over our internal network, covers are not shown nor is the playback-counter updated for music titles or video.
    am I doing something wrong?

    No, nothing wrong. Cover Flow and Play Count are not supported on Shared Libraries.
    Hope it helps

Maybe you are looking for

  • Year end and Doc types

    Hi all, I have a question that just came up due to the year end: we use three doc types for top level adjustment: L1 - permanent, L2 - reverse next month, L3 - reverse next year. Every month we make a number of specific L2 entries. In december do we

  • Using a Tascam US-122L in an Aggregate Device

    I posted this question in the Logic Pro forum, but I suppose this one is also relevant. Any help would be appreciated. http://discussions.apple.com/thread.jspa?threadID=755072

  • The output values are showing different

    Hi, the infobject of 0FISCPER listcube output and the same infoobject is showing different values in query output . Some thing is problem in this infoobject . Can any one please give the solution i will award the points. Regards RK

  • Can someone help with setting up debugging?

    This is my first time trying to debug native methods. I have the "Essential JNI" book by Rob Gordon, which is good, but it is out of date and gives incomplete and incorrect information about debugging using Microsoft's VC++. Can someone give me guida

  • Information on enabled services and which ones I can safely disable

    Where is a good source of infomation for all of the enabled services (what they do, etc) and which ones I can safely disable. i.e. seaport.