Not linked tot he Event

Hi friends,
I am facing a problem in triggering the event.
My problem is " When a form is created in the EP and when the SUBMIT button is clicked i am calling a RFC in which i am using the function module "SWE_EVENT_CREATE" where the exporting parameter are the business object 'YBUS1065' objectkey 'EMPPERNR' and the event 'POSITION CHANGED'.
Using this RFC call only my event is going to get triggered. I have done my worflow setting in "SWE2" and i execute the workflow but i cant see the even log in my "SWEL".
When i diagonis the workflow in "SWUD" it says that "NOT LINKED TO THE EVENT".
i dont know where i made the error. Please helpout it is very urgent issue.
regrds
Balaji

hi Gareth,
i send you the code what i written in the RFC, and give me some suggestions.
MY CODE
FUNCTION Z_WF_TRIGGER_SEVERANCE1.
""Local Interface:
*"  IMPORTING
*"     VALUE(EMPPERNR) TYPE  RP50G-PERNR
TABLES ZSEVERANCE.
TYPES: BEGIN OF ITSEVERANCE,
        MANDT TYPE MANDT,
        EMPPERNR TYPE PERSNO,
        MESP TYPE ZNUMC,
        MEBC TYPE ZNUMC,
        OUTPLALEVEL TYPE ZNUMC,
        CSD TYPE ZCSD,
        COMMENTS TYPE ZCOMM,
        END OF ITSEVERANCE.
*DATA: SEVERANCE TYPE STANDARD TABLE OF ZSEVERANCE  WITH HEADER LINE.
DATA : event type SWEDUMEVID-EVTID.
*DATA: EMPPERNR TYPE  SWEINSTCOU-OBJKEY.
*SEVERANCE-MANDT = SY-MANDT.
*SEVERANCE-EMPPERNR = EMPPERNR.
*SEVERANCE-MESP = MESP.
*SEVERANCE-MEBC = MEBC.
*SEVERANCE-OUTPLALEVEL = OUTPLALEVEL.
*SEVERANCE-CSD = CSD.
*SEVERANCE-INITIATOR = SY-UNAME.
*SEVERANCE-COMMENTS = COMMENTS.
*APPEND SEVERANCE.
*MODIFY ZSEVERANCE FROM SEVERANCE.
  CALL FUNCTION 'SWE_EVENT_CREATE'
    EXPORTING
      OBJTYPE                       = 'BUS1065'
      OBJKEY                        =  'EMPPERNR'
      EVENT                         = 'POSITIONCHANGED'
   CREATOR                       = ' '
   TAKE_WORKITEM_REQUESTER       = ' '
   START_WITH_DELAY              = ' '
   START_RECFB_SYNCHRON          = ' '
   NO_COMMIT_FOR_QUEUE           = ' '
   DEBUG_FLAG                    = ' '
   NO_LOGGING                    = ' '
   IDENT                         =
IMPORTING
   EVENT_ID                       =
TABLES
   EVENT_CONTAINER               =
EXCEPTIONS
   OBJTYPE_NOT_FOUND             = 1
   OTHERS                        = 2
  IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
  CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
  WAIT          =
IMPORTING
  RETURN        =
commit work.
Regards
Balaji

Similar Messages

  • ICal events disappeared (not linked to MobileMe or iCloud)

    Hello,
    I run iCal 4.0.4 with MacOSX 10.6.8.
    I recently noted that all events before 6 May 2011 have disappeared and I don't know why.
    The preferences are not set with the 'Delete events ?? days after they have passed' (the box is not ticked).
    I did a test yesterday looking if the events where disappearing but that is not the case, so this morning events after the 6 May 2011 still there.
    My iCal is not linked to ModileMe or iCloud in any way.
    Where are the events before 6 May have gone? Can I retrieve them? Would events continue to disappear?
    Any help is much appreciated.
    Thanks

    You need to ensure that each device (including the MBP) is using iCal from iCloud (NOT a local version of iCal).  Using the MBP as an example, click on the Calendars icon in the upper left corner and look for something similar to the following:
    If it does not say ICLOUD at the top, there's your problem.  Post back and we'll go from there.

  • E-mail links from iCal event - not working in Yosemite

    My workflow has always depended on dragging e-mails from Mail to iCal
    This generates link in ical event "Show in mail" - giving me option to find the e-mail with one click from iCal
    Since Yosemite install the links go wrong!
    I can generate several events from several e-mails and all links point me to the same random e-mail. I haven't yet found clear pattern in this randomness, but it seems to link to the first mail-to-iCal created after sleep/restart, but not always...
    Anybody experiencing similar bug?
    Tried "mailbox" > "rebuid" with no result.
    Any more ideas?
    I'm on MB Pro 2009 using POP-accounts for mail but the random-link behavior is just same when dragging mails from my icloud account.

    Well it's good news i'm not alone in this - frustrating indeed!
    Searching for solutions with no result so far.
    I've been migrating my user library from one opsys to other since Leopard i guess, so probably i should just do a clean install one day - this MUST help
    My workaround after a week of being just unable to manage my incoming information was to use Notes
    Dragging emails to notes content still works, and in a way i kind of like it - u can keep a single note with several links to different emails etc. At least for now it seems like a decent substitute. Organizing notes to folders is helpful too, but i guess you can't organize folders in iOS which is really bad.
    So - still hoping to move back to my iCal

  • Mid-process Receive (onEvent) is not picking up published event

    We have a composite (CompositeA), which has 2 BPEL processes (bpelprocess1 and bpelprocess2). bpelprocess1 is synchronous and bpelprocess2 is a one-way. bpelprocess1 receives a message from the client - then sends the message using a one-way Invoke action to bpelprocess2 - bpelprocess2 transforms the message and assigns some values - then sends the message to Event1 through an Invoke action - bpelprocess1 has a Receive activity waiting for an event from Event1 - then it will send the message back to the client as the Reply. Everything works up to the point where the bpelprocess1 Receive(onEvent) activity is waiting for an event, it sits in this "Pending" state until the SyncMaxWaitTime value has expired and then we get a timeout error (see below).
    "Waiting for response has timed out. The conversation id is null. Please check the process instance for detail."
    So our question is, why does the Receive(onEvent) in bpelprocess1 never pick up the published event? We've run some additional tests to ensure the event is being published, and that has been confirmed.
    Is it possible to receive an event that was published during the current instance of the process (i.e., since bpelprocess1 invoked bpelprocess2 which invoked the Event1 publish, can bpelprocess1 perform a mid-process Receive of the event that was just published?
    Please let us know if this makes sense or if you have any additional questions.
    On a side note, if we create an independent mediator component in the same composite and have it subscribe to Event1 as well, then just write the message out to a file. It would not pick up the message from the EDN in the scenario described above, if we set the property nonBlockingInvoke=true or bpel.config.transaction=requiresNew on the bpelprocess2 partnerlink from bpelprocess1, the Mediator would get the message from the EDN, but bpelprocess1 still timed out waiting for the event. If we setup another BPEL process (bpelprocess3) in the same composite (though not linked to bpelprocess1 and bpelprocess2) and it has a mid-process receive onEvent listening for Event1, it does not pick up the published event either, so seems to be an issue with the mid-process receive onEvent in the synchronous BPEL process.
    Any help is appreciated.

    Thanks for the reply, but there is no issue with the one-way from bpel1 to bpel2, we do not expect nor want a response from bpel2, it should just publish the event and complete. The bpel1 should continue it's flow (which it does) and the next action is a Receive action listening for an event (that was published by bpel2), but the Receive never finds the event.
    Here's a less complex use case:
    1. bpelprocess1 is a synchronous process which publishes to Event1 (this completes successful and returns a success message to the client)
    2. bpelprocess2 is an asynchronous process which has a mid-process Receive action that is listening for Event1
    3. bpelprocess3 is a process which is initiated by Event 1
    If we execute bpelprocess2 it will set at the mid-process Receive action in a PENDING state, waiting for Event1 to occur.
    If we then execute bpelprocess1 the Event1 is published and we receive a "SUCCESS" response back.
    At this point bpelprocess3 is initiated (b/c it's initial Receive is triggered by Event1)
    We would also expect the mid-process Receive in bpelprocess2, which is in a PENDING state to trigger, but it never does.
    Hopefully this use case makes more sense.

  • Add a note to a Calendar event that was created from Mac Mail

    When I create a Calendar event by clicking on a date within a Mac Mail message (you hover over a date in an email it draws a dashed box around the date and gives an option to create a Calendar event).  It creates an Event in my Calendar with the following fields:  Subject, Location, Date Time and alert fields, Invitees and a link to the mail message.  But - I can't seem to add a Note Field.  The only work-around seems to be to manually create a new calendar entry.
    Does anyone know how to modify an event created from Mac Mail to add a Note Field?
    iMac Retina 5K 27-inch Late 2014, OS X Yosemite Version 10.10.3, Calendar Version 8.0 (2034.9), Mail  Version 8.2 (2098).

    Thanks Brett for replying, but this doesn't work if the event is created by Mac Mail - which is my issue.  Sure it works with any other event but not one that has been created from within Mail.  If this is a bug I'm sure the Calendar people point the blame at the Mail people and vice versa but that doesn't help me.  But before I submit a report to Apple I thought I would see if I might be missing something obvious.
    See the attached screenshot of an event that was created by Mac Mail. There is no Add Notes field when the event is Double Clicked, Right Clicked or any other form of click.
    Graeme.

  • Why OID Connector User Search Reconciliation Sch. Job  Does Not Link Users?

    Hi,
    I provisioned a user to the resource successfully; then I ran OID Connector User Search Reconciliation Sch. Job sucessfully. When i check the Reconcillation Event results, i can see the event related with my Sch. Job but in the details of the event Linked To part is empty. I am expecting to see linking result but unfortunately no linking result represented. It says Not linked to any user as result of Linked User field.
    Do u have any idea?

    In Form, i have the following Additional Column with the following Field Label --> KK
    In the ReconAttrMap, i have the following mapping --> Code: KK Decode: uid
    In the Reconcillation Rule, i have the following Rule --> User Profile Data: User Login
    Operator: Equals
                                                 Attribute: Kullanici Kodu
                                                      Transform: None
                                                      Case-Sensitive: Unchecked
                                                      Properties Set: Checked
    Rule is Valid and Active and Using AND Operator
    In the Resource Object, i have the following Reconcillation Field --> *KK [String], Required*
    In the Resource Object, i have the following Reconcillation Action Rules --> Rule Condition: One Entity Match Found Action: Establish Link
                                                                          Rule Condition: One Process Match Found Action: Establish Link
    Then i click to the Create Reconcillation Profile.
    Job still does not link Users. Any missing settings?

  • Project files not linking

    Hi,
    I needed to go back to a project I left last summer, 10 different videos on a specific topic, and to my shock, the project files aren´t showing up in Final Cut. The original files / Event files seem to be all there and I have saved master files of the movies I made, but some were only saved at 480.
    Searching the hard drive, I´m pretty sure I can see them - if they are the Render Files / High Quality Media etc...? But they´re in the Movie folder, not in FCX projects and they´re not linking to the Project Library in the editing software.
    The reason for this I can think of, is that I possibly edited them in the Trial version of FCX, and now have installed the full upgrade. Or, I could simply have moved them over when I didn´t understand how it all worked (and still don´t ;-) and the link has been lost.
    I assume I should just be able to transfer them in to the Project folder in Final Cut Pro...?
    If it´s something to do with the Trial version - I seem to not have deleted it yet - should I start with deleting it or could that do further damage (can´t see what help it´s doing now anyway!)
    I´m petrified of losing the files completely as I´m not very savvy with how the data links between files and project etc, any advice warmly welcome!!
    I can send screen capture of file extensions etc if that helps clarify what files they are and how they should be linked back.
    Thanks!

    If your project files aren't being seen by the app, it's likely that they were moved.
    If located on the start-up drive, they should be in Movies>Final Cut Projects>your project. Otherwise FCP won't see them. The actual project file is named CurrentVersion.fcp.
    On a non-start-up drive, the Final Cut Projects folder needs to be at the root level for FCP to see it.
    The same thing goes for the Final Cut Events folder.
    So check those folders to make sure they're in the right places on your system.
    Russ

  • IPad not linking to correct Skype account

    I have a premium Skype account and just purchased a new iPad and downloaded the Skype app but it did not link to my premium account and I can't seem to correct this even when I log in with the correct user information.  I spent over 90 minutes on chat with Skype and they could not even figure out what my question was (very sad) but since I already paid for this, I would like to use it.  Any ideas here?
    Thanks!
    sb

    HI,
    The lInkedButton always links items to the Primary Key.
    It means, that the documents the DocEntry field is linked! Not the DocNum !
    If you have a multiple document numering, or more series defined over the same time/period/year, you have to cover the linkto property by the following:
    execute the following query to check the DocEntry and Docnum field:
    SELECT *  FROM NNM1 T0 WHERE T0.[ObjectCode]  = '22' -- Document numbering
    select DocNum, DocEntry from OPOR  -- DocNum and DocEntry relationShip
    Select * from
    So  do the following:
    1. Create an EditText for DocNUm and DocEntry
    2. Hide the docentry textbox (left = -20000)
    3. Set the linkto Property into the DocEntry Item ID
    4. USe CFL to get the DocEntry and DocNUm field values (use can use database field names getting the value when you receiving data from chooseFromList Event
    Now you are correct.
    Regards,
    J.

  • "Not linked to another item"    Error  show in   TestTools  formchecker

    Hi all ,
              I have a UDO form with a textBox . A link button added in this text box using Screenpaint .
              i have set  Linkto ="TextBoxUniqID"  , LinkedObject ="4"  in Link button property   and  set Alias ='Table    Columnname'        ,DataBound='true',TableName ='@abcd'  .link button work properly but error Textbox is  "Not linked to another item"  show   in   'B1TE Tools'  formchecker for the  TextBox.
    please any one help  why this error  show that TextBox not link to another item .
    thanks in advance
    surajit

    Hi
    I have pasted Your XML and for my appl 8.8.1 pl 08 this works Great.
    You have to chech if You dont have any event handling in Your addon that caused this error.
    <datasource type="9" size="20" uid="TST" />
       <item uid="LNK_itmmst" type="116" left="390" tab_order="0" width="10" top="400" height="9" visible="1" enabled="1" from_pane="0" to_pane="0" disp_desc="0" right_just="0" description="" linkto="ET_itmcd" forecolor="-1" backcolor="-1" text_style="0" font_size="-1" supp_zeros="0" AffectsFormMode="1">
                  <AutoManagedAttribute/>
                  <specific linkedObject="4" LinkedObjectType="4"/>
                </item>
                   <item uid="ET_itmcd" type="16" left="400" tab_order="1" width="110" top="400" height="14" visible="1" enabled="1" from_pane="0" to_pane="0" disp_desc="0" right_just="0" description="" linkto="" forecolor="-1" backcolor="-1" text_style="0" font_size="-1" supp_zeros="0" AffectsFormMode="1">
                    <AutoManagedAttribute/>
                    <specific TabOrder="1" ChooseFromListUID="">
                      <databind databound="1" table="" alias="TST"/>
                    </specific>
                  </item>
    Regards

  • Popularity trend/usage report is not working in sp2013. Data was not being processed to EVENT STORE folder which was present under the Analytics_GUID folder.

    Hi
     I am working in a sharepoint migration project. We have migrated one SharePoint project from moss2007 to sp2013. Issue is when we are clicking on Popularity trend > usage report,  it is throwing an error.
    Issue: The data was not being processed to EVENT STORE folder which was present under the
    Analytics_GUID folder. Also data was not present in the Analytical Store database.
    In log viewer I have found the bellow error.
    HIGH -
    SearchServiceApplicationProxy::GetAnalyticsEventTypeDefinitions--Error occured: System.ServiceModel.Security.MessageSecurityException: An unsecured or incorrectly
    secured fault was received from the other party.
    UNEXPECTED - System.ServiceModel.FaultException`1[[System.ServiceModel.ExceptionDetail,
    System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]: We're sorry, we weren't able to complete the operation, please try again in a few minutes.
    HIGH - Getting Error Message for Exception System.Web.HttpUnhandledException
    (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.ServiceModel.Security.MessageSecurityException: An unsecured or incorrectly secured fault was received from the other party.
    CRITICAL - A failure was reported when trying to invoke a service application:
    EndpointFailure Process Name: w3wp Process ID: 13960 AppDomain Name: /LM/W3SVC/767692721/ROOT-1-130480636828071139 AppDomain ID: 2 Service Application Uri: urn:schemas-microsoft-
    UNEXPECTED - Could not retrieve analytics event definitions for
    https://XXX System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: We're sorry, we weren't able to complete the operation, please try again in a few minutes.
    UNEXPECTED - System.ServiceModel.FaultException`1[[System.ServiceModel.ExceptionDetail,
    System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]: We're sorry, we weren't able to complete the operation, please try again in a few minutes.
    I have verified few things in server which are mentioned below
    Two timer jobs (Microsoft SharePoint Foundation Usage Data Processing, Microsoft SharePoint Foundation Usage Data Import) are running fine.
    APPFabric Caching service has been started.
    Analytics_GUID folder has been
    shared with
    WSS_ADMIN_WPG and WSS_WPG and Read/Write access was granted
    .usage files are getting created and also the temporary(.tmp) file has been created.
    uasage  logging database for uasage data being transported. The data is available.
    Please provide pointers on what needs to be done.

    Hi Nabhendu,
    According to your description, my understanding is that you could not use popularity trend after you migrated SharePoint 2007 to SharePoint 2013.
    In SharePoint 2013, the analytics functionality is a part of the search component. There is an article for troubleshooting SharePoint 2013 Web Analytics, please take a look at:
    Troubleshooting SharePoint 2013 Web Analytics
    http://blog.fpweb.net/troubleshooting-sharepoint-2013-web-analytics/#.U8NyA_kabp4
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • Tutor: Adding a Prior Activity that does not link to a document

    When the docs are published, the Prior Activities come across as broken links if a document filename is not included in the formatting.
    Is there a way around this so that if someone clicks on a prior activity which is not linked to a document, it doesn't do anything - rather than appearing as a broken link?
    Thank you.

    Can you provide the exact text that you are putting under the Prior Activity heading?
    Kind regards,
    Emily

  • Not Running on the Event Dispatch thread, but UI still freezes

    The environment: I am currently working on an application that requires some heavy lifting in response to user input on a UI. To do this I am using a version of SwingWorker that was backported from java 1.6 to java 1.5 in conjunction with a slew of custom threads.
    The problem: I am currently running into an issue where I am not operating on the Event Dispatch thread (checked by doing a javax.swing.SwingUtilities.isEventDispatchThread()) but the UI is still freezing during this section. The operation involves a loop with about 2000 iterations and contains several file accesses. I have thought about how to make a new thread to perform the same operation, but I do not see how it would be any different since as it is I am not on the EDT. The call is being made from doInBackground and specifically the piece that is slowing things down is the File Accesses (2 for every iteration of the loop). At this point I am not sure how to go about resolving the issue. Any one have any suggestions?

    I am not operating on the Event Dispatch threadThat is the problem. Use multiple threads for GUI, which should delegates to the EDT, and your app logic.

  • How to find documents which are not linked to a project?

    Hi all,
    i'm just looking for a variant to search for documents which are not linked to a project within ta SOLAR_EVAL.
    I need a way to report how much documents are not linked to a project; just stored in KW.
    Can anyone give a hint?
    Thanks a lot!
    Jan

    Hi Jan,
    This report SOLMAN_UNUSED_DOCUMENTS will help you identify the documents which are not linked to the project.
    (OR) Use Tcode: SI80 to find any document in SAP Solution Manager KW.
    Regards,
    Sanjai

  • Data is not linked to material wise

    Hi experts,
    In this Report data is not linked to material wise.
    it comming merge the all the materials in one material.
    TYPE-POOLS: SLIS.
    TABLES: MKPF,LFA1,MSEG,EKET,T001L,MAKT,S031,S032,MARA,LIPS,LIKP,T001W.
    DATA  FLAG TYPE I.
    DATA : MENGE_RE LIKE MSEG-MENGE,
           MENGE_IS LIKE MSEG-MENGE,
           MENGE_O LIKE MSEG-MENGE,
           MENGE_BAL LIKE MSEG-MENGE.
    DATA  MAGBB LIKE S031-MAGBB.
    DATA : F_LNO LIKE SY-LINNO,
           S_LNO LIKE SY-LINNO,
           V_LNO LIKE SY-LINNO.
    DATA  MZUBB LIKE S031-MZUBB.
    DATA  V_MONTH LIKE S031-SPMON.
    DATA  XBLNR LIKE MKPF-XBLNR.
    DATA : BEGIN OF ITAB1 OCCURS 100,
           MATNR LIKE MAKT-MATNR,
           END OF ITAB1.
    DATA : BEGIN OF ITAB2 OCCURS 100,
    MATNR LIKE MAKT-MATNR,
    WERKS LIKE MARD-WERKS,
    LGORT LIKE MARD-LGORT,
    BUSTW LIKE MSEG-BUSTW,
    BWART LIKE MSEG-BWART,
    SHKZG LIKE MSEG-SHKZG,
    MENGE LIKE MSEG-MENGE,
    END OF ITAB2.
    DATA: PAGNO(5) TYPE C.
    DATA : PAGENO LIKE SY-PAGNO.
    DATA: STR1 TYPE DATS,
          STR2(14) TYPE C,
          STR3(10) TYPE C.
    DATA : V_MONUM LIKE T015M-MONUM,
           V_MONAM LIKE T015M-MONAM.
    DATA : V_PAGENO LIKE SY-PAGNO.
    TYPES:  FARBE TYPE SLIS_T_SPECIALCOL_ALV.
    DATA  V_STOCK LIKE MSEG-MENGE.
    DATA  V_STOCK1 LIKE MSEG-MENGE.
    DATA: V_MONTH1 LIKE S031-SPMON.
    DATA: OSTOCK LIKE MSEG-MENGE.
    DATA : FLAG6 TYPE C,
      V_PAGENO1 LIKE SY-PAGNO,
      V_PAGENO2 LIKE SY-PAGNO.
    DATA: FLD(15).
    DATA: TXT(50).
    DATA: FLAG5.
    I N I T I A L I Z A T I O N
    *GT_REPID = SY-REPID.
    PAGNO = SY-PAGNO.
    A T  S E L E C T I O N  S C R E E N
    AT SELECTION-SCREEN.
    *AT SELECTION-SCREEN ON BUDAT.
    PERFORM VALIDATION.
    S T A R T O F S E L E C T I O N
    START-OF-SELECTION.
    SET MARGIN 5.
    PERFORM FETCH_DATA.
    PERFORM WRITE_REPORT.
    PERFORM STOCK.
    E N D O F S E L E C T I O N
    END-OF-SELECTION.
    Report Selections
      DATA: BEGIN OF IT_HEADER OCCURS 10,
      WERKS LIKE MSEG-WERKS,
      NAME1 LIKE T001W-NAME1,
      MAKTX LIKE MAKT-MAKTX,
      MATNR LIKE MSEG-MATNR,
      MENGE_O LIKE MSEG-MENGE,
      END OF IT_HEADER.
      DATA: BEGIN OF ITAB OCCURS 50,
            WERKS LIKE MSEG-WERKS,
            MATNR LIKE MSEG-MATNR,
            BWART LIKE MSEG-BWART,
            LGORT LIKE MSEG-LGORT,
            EBELN LIKE MSEG-EBELN,
            XBLNR LIKE MKPF-XBLNR,
            BUDAT LIKE MKPF-BUDAT,
            MBLNR LIKE MSEG-MBLNR,
            MENGE LIKE MSEG-MENGE,
            MAKTX LIKE MAKT-MAKTX,
            XAUTO LIKE MSEG-XAUTO,
            NAME1 LIKE T001W-NAME1,
            MENGE_O LIKE MSEG-MENGE,
            SHKZG LIKE MSEG-SHKZG,
            MENGE_IS LIKE MSEG-MENGE,
            MENGE_RE LIKE MSEG-MENGE,
      END OF ITAB.
      DATA: BEGIN OF INT_DATA OCCURS 50,
            WERKS LIKE MSEG-WERKS,
            MATNR LIKE MSEG-MATNR,
            BWART LIKE MSEG-BWART,
            XBLNR LIKE MKPF-XBLNR,
            MBLNR LIKE MSEG-MBLNR,
            BUDAT LIKE MKPF-BUDAT,
            MAKTX LIKE MAKT-MAKTX,
            MENGE_O LIKE MSEG-MENGE,
            MENGE_R LIKE MSEG-MENGE,
            MENGE_TO LIKE MSEG-MENGE,
            MENGE_TI LIKE MSEG-MENGE,
            MENGE_S LIKE MSEG-MENGE,
            MENGE_ST LIKE MSEG-MENGE,
            MENGE_AD LIKE MSEG-MENGE,
            MENGE_RT LIKE MSEG-MENGE,
            MENGE_C LIKE MSEG-MENGE,
            MENGE_CL LIKE MSEG-MENGE,
            MENGE_BAL LIKE MSEG-MENGE,
            MENGE_CR LIKE MSEG-MENGE,
            NAME1 LIKE T001W-NAME1,
            MENGE_RE LIKE MSEG-MENGE,
            MENGE_IS LIKE MSEG-MENGE,
            MENGE_BAL1 LIKE MSEG-MENGE,
            SHKZG LIKE MSEG-SHKZG,
             MENGE LIKE MSEG-MENGE,
             LGORT LIKE MSEG-LGORT,
            END OF INT_DATA.
      DATA: BEGIN OF INT_DATA1 OCCURS 50,
             WERKS LIKE MSEG-WERKS,
             MATNR LIKE MSEG-MATNR,
             BWART LIKE MSEG-BWART,
             MENGE_ST LIKE MSEG-MENGE,
             MENGE_O LIKE MSEG-MENGE,
             WAMNG LIKE EKET-WAMNG,
             WEMNG LIKE EKET-WEMNG,
             MENGE LIKE MSEG-MENGE,
             RETPO LIKE EKPO-RETPO,
             UMREN LIKE EKPO-UMREN,
             UMREZ LIKE EKPO-UMREZ,
             BSTMG LIKE EKPO-MENGE,
             XBLNR LIKE MKPF-XBLNR,
       END OF INT_DATA1.
      DATA: BEGIN OF INT_DATA2 OCCURS 50,
             WERKS LIKE MSEG-WERKS,
             LGORT LIKE S031-LGORT,
             MATNR LIKE MSEG-MATNR,
             BWART LIKE MSEG-BWART,
             MENGE_IS LIKE MSEG-MENGE,
             MBWBEST LIKE S032-MBWBEST,
             MAKTX LIKE MAKT-MAKTX,
       END OF INT_DATA2.
      DATA:V_GJAHR LIKE MKPF-BUDAT.
      SELECTION-SCREEN BEGIN OF BLOCK 0 WITH FRAME TITLE TEXT-064.
      SELECT-OPTIONS:
      MATNR FOR MSEG-MATNR,
      MATKL FOR MARA-MATKL OBLIGATORY,
      WERKS FOR MSEG-WERKS OBLIGATORY,
      LGORT FOR MSEG-LGORT,
    *CHARG FOR MSEG-CHARG,
      BWART FOR MSEG-BWART,
    *LIFNR FOR LFA1-LIFNR,
    *WADAT FOR LIKP-WADAT_IST,
      S_DATE FOR MKPF-BUDAT.
      SELECTION-SCREEN END OF BLOCK 0.
    TOP-OF-PAGE.
    PERFORM HEADER_WRITE.
    FORM FETCH_DATA .
    SELECT
         MATNR            " Material Number
         WERKS            " Plant
      INTO TABLE IT_HEADER
      FROM MSEG
      WHERE MATNR = IT_HEADER-MATNR AND
      WERKS = IT_HEADER-WERKS.
      STR3 = S_DATE-LOW+0(4).
      SELECT * FROM MARA INTO CORRESPONDING FIELDS OF TABLE ITAB1
                         WHERE MATNR IN MATNR AND
                         MATKL IN MATKL.
      SELECT MATNR WERKS LGORT
                         INTO TABLE ITAB2
                         FROM MARD FOR ALL ENTRIES IN ITAB1
                         WHERE WERKS IN WERKS AND
                               LGORT IN LGORT AND
                               MATNR = ITAB1-MATNR.
      SELECT SINGLE NAME1 FROM T001W INTO INT_DATA-NAME1
           WHERE WERKS = INT_DATA-WERKS.
      LOOP AT ITAB2.
        SELECT M~MATNR M~WERKS M~LGORT M~MENGE M~MBLNR  M~MJAHR M~XAUTO M~SHKZG
                       M~BWART M~EBELN N~BUDAT N~XBLNR S~NAME1
                       INTO CORRESPONDING FIELDS OF ITAB
                       FROM   MSEG AS M INNER JOIN MKPF AS N ON
                              M~MBLNR = N~MBLNR
                              AND M~MJAHR = N~MJAHR
                            INNER JOIN T001W AS S ON
                              M~WERKS = S~WERKS
                          WHERE N~BUDAT IN S_DATE AND
                             M~WERKS = ITAB2-WERKS AND
                             M~LGORT = ITAB2-LGORT AND
                             M~MATNR = ITAB2-MATNR AND
                    M~BWART IN BWART.
          APPEND ITAB.
          CLEAR ITAB.
        ENDSELECT.
        IF SY-SUBRC NE 0.
          ITAB-MATNR = ITAB2-MATNR.
          ITAB-WERKS = ITAB2-WERKS.
          ITAB-LGORT = ITAB2-LGORT.
          ITAB-BWART = ITAB2-BWART.
          APPEND ITAB.
        ENDIF.
        CLEAR: ITAB2,ITAB.
      ENDLOOP.
      DELETE ADJACENT DUPLICATES FROM ITAB2 COMPARING MATNR WERKS .
      V_MONTH = S_DATE-LOW+0(6).
      SELECT * INTO CORRESPONDING FIELDS OF TABLE INT_DATA2
               FROM S032 FOR ALL ENTRIES IN ITAB2
               WHERE MATNR = ITAB2-MATNR
                     AND WERKS   = ITAB2-WERKS
                     AND LGORT   = SPACE
                     AND   MBWBEST <> SPACE.
      LOOP AT INT_DATA2 .
        SELECT SINGLE *  FROM S031
                         WHERE MATNR = INT_DATA2-MATNR AND
                               WERKS = INT_DATA2-WERKS AND
                               LGORT = SPACE AND
                               SPMON GT V_MONTH.
        MODIFY INT_DATA2.
        CLEAR: INT_DATA2, S031.
      ENDLOOP.
      DELETE INT_DATA WHERE MENGE_O IS INITIAL .
      DELETE ADJACENT DUPLICATES FROM INT_DATA COMPARING XBLNR MATNR MAKTX.
      V_MONTH1 = S_DATE-LOW+0(6).
      SORT ITAB BY  MATNR  WERKS  XBLNR .
      LOOP AT ITAB.
        XBLNR = ITAB-XBLNR.
        INT_DATA-MENGE = ITAB-MENGE.
        INT_DATA-BWART = ITAB-BWART.
        INT_DATA-XBLNR = ITAB-XBLNR.
        INT_DATA-BUDAT = ITAB-BUDAT.
        INT_DATA-MATNR = ITAB-MATNR.
        INT_DATA-MBLNR = ITAB-MBLNR.
        INT_DATA-MENGE = ITAB-MENGE.
        INT_DATA-SHKZG = ITAB-SHKZG.
        INT_DATA-MENGE_IS = ITAB-MENGE_IS.
        INT_DATA-MENGE_RE = ITAB-MENGE_RE.
        INT_DATA-MENGE_O = ITAB-MENGE_O.
        INT_DATA-NAME1 = ITAB-NAME1.
        IF FLAG = 1.
          PERFORM GET_OPENING_STOCK.
        ENDIF.
        INT_DATA-MENGE_O = OSTOCK.
        CASE ITAB-BWART.
          WHEN '101'.
            IF INT_DATA-SHKZG = 'S'.
              INT_DATA-MENGE_R = INT_DATA-MENGE_R + ITAB-MENGE.
            ENDIF.
          WHEN  '453'.
            IF INT_DATA-SHKZG = 'S'.
              IF ITAB-XAUTO = 'X'.
                INT_DATA-MENGE_RT = INT_DATA-MENGE_RT + ITAB-MENGE.
              ENDIF.
            ENDIF.
          WHEN '351' OR '641'.
           IF ITAB-LGORT = 0.
             INT_DATA-MENGE_R = INT_DATA-MENGE_R + ITAB-MENGE.
           ELSE.
             INT_DATA-MENGE_TO = INT_DATA-MENGE_TO + ITAB-MENGE.
           ENDIF.
          WHEN '602' OR '642'.
            IF INT_DATA-SHKZG = 'S'.
              IF ITAB-LGORT = 0.
                INT_DATA-MENGE_CL = INT_DATA-MENGE_CL + ITAB-MENGE.
              ENDIF.
            ENDIF.
          WHEN '552' OR '310'.
            IF INT_DATA-SHKZG = 'S'.
              INT_DATA-MENGE_AD = INT_DATA-MENGE_AD - ITAB-MENGE.
            ENDIF.
          WHEN '601'.
            IF INT_DATA-SHKZG = 'H'.
              INT_DATA-MENGE_S = INT_DATA-MENGE_S + ITAB-MENGE.
            ENDIF.
          WHEN  '641' .
            IF INT_DATA-SHKZG = 'H'.
              IF ITAB-LGORT = 0.
                INT_DATA-MENGE_TO = INT_DATA-MENGE_TO + ITAB-MENGE.
              ENDIF.
            ENDIF.
          WHEN  '454' OR '102'.
            IF INT_DATA-SHKZG = 'H'.
              IF ITAB-XAUTO = 'X'.
                INT_DATA-MENGE_CR = INT_DATA-MENGE_CR - ITAB-MENGE.
              ENDIF.
            ENDIF.
          WHEN '551' OR '309'.
            IF INT_DATA-SHKZG = 'H'.
              INT_DATA-MENGE_AD = INT_DATA-MENGE_AD + ITAB-MENGE.
            ENDIF.
    ENDCASE.
    PERFORM BALANCE.
    COLLECT INT_DATA.
        CLEAR: INT_DATA,XBLNR, FLAG, OSTOCK.
    IF INT_DATA-SHKZG = 'S'.
          MENGE_RE = INT_DATA-MENGE_R + INT_DATA-MENGE_RT + INT_DATA-MENGE_CL
          + INT_DATA-MENGE_AD.
        ENDIF.
        IF INT_DATA-SHKZG = 'H'.
          MENGE_IS =  INT_DATA-MENGE_S + INT_DATA-MENGE_TO +
                        INT_DATA-MENGE_CR + INT_DATA-MENGE_AD.
        ENDIF.
      ENDLOOP.
      SORT INT_DATA BY XBLNR BUDAT WERKS MATNR.
    LOOP AT INT_DATA.
    AT NEW MATNR.
         FLAG = 1.
          IT_HEADER-MATNR = INT_DATA-MATNR.
          SELECT SINGLE MAKTX FROM MAKT INTO IT_HEADER-MAKTX WHERE
          MATNR = IT_HEADER-MATNR and spras = 'E'.
          APPEND IT_HEADER.
          CLEAR IT_HEADER.
      endat.
    ENDLOOP.
    LOOP AT INT_DATA.
       READ TABLE INT_DATA2 WITH KEY MATNR = INT_DATA-MATNR
                                     WERKS = INT_DATA-WERKS.
       SELECT SINGLE * FROM MAKT WHERE MATNR = INT_DATA-MATNR.
       INT_DATA-MAKTX = MAKT-MAKTX.
       MODIFY INT_DATA.
       CLEAR: INT_DATA, INT_DATA2.
    ENDLOOP.
      LOOP AT INT_DATA WHERE  MENGE_O = 0 AND MENGE_RT = 0 AND
                            MENGE_CL = 0 AND MENGE_AD = 0 AND
                            MENGE_S = 0 AND MENGE_TO = 0 AND
                            MENGE_CR = 0 AND MENGE_R = 0 AND MENGE_BAL = 0.
        DELETE IT_HEADER WHERE MATNR = INT_DATA-MATNR.
      ENDLOOP.
      DELETE INT_DATA WHERE MENGE_O = 0 AND MENGE_RT = 0 AND
                            MENGE_CL = 0 AND MENGE_AD = 0 AND
                            MENGE_S = 0 AND MENGE_TO = 0 AND
                            MENGE_CR = 0 AND MENGE_R = 0 AND MENGE_BAL = 0.
    PERFORM WRITE_REPORT.
    INT_DATA-MENGE_O = OSTOCK.
    PERFORM GET_OPENING_STOCK.
    FORMAT COLOR 4 INTENSIFIED OFF.
           WRITE:/1 SY-VLINE,
                 106 'Opening Balance' CENTERED,
                 130 SY-VLINE,
                 156 SY-VLINE.
    WRITE: 130(8) OSTOCK.
    WRITE:/1(156) SY-ULINE.
    FORMAT RESET.
    LOOP AT INT_DATA.
    FORMAT COLOR 2 INTENSIFIED OFF.
    WRITE:/1 SY-VLINE,
                 2 INT_DATA-XBLNR,
                 14 SY-VLINE,
                 15 INT_DATA-BUDAT,
                 27 SY-VLINE,
                 28 INT_DATA-BWART,
                 40 SY-VLINE,
                 43(9) INT_DATA-MENGE_R,
                 51 SY-VLINE,
                 52(9) INT_DATA-MENGE_RT,
                 65 SY-VLINE,
                 66(9) INT_DATA-MENGE_CL,
                 82 SY-VLINE,
                 83(7) INT_DATA-MENGE_AD,
                 89 SY-VLINE,
                 90(9) INT_DATA-MENGE_S,
                 97 SY-VLINE,
                 98(9) INT_DATA-MENGE_TO,
                 106 SY-VLINE,
                 107(9) INT_DATA-MENGE_CR,
                 120 SY-VLINE,
                 121(9) INT_DATA-MENGE_AD,
                 130 SY-VLINE,
                 131(9) INT_DATA-MENGE_BAL,
                 144 SY-VLINE,
                 145 INT_DATA-MBLNR,
                 156 SY-VLINE.
    FORMAT RESET.
    ENDLOOP.
    WRITE:/1(156) SY-ULINE.
    ENDFORM.
    FORM WRITE_REPORT.
      SORT IT_HEADER BY MATNR.
      LOOP AT IT_HEADER.
        SKIP .
        AT NEW MATNR.
         WRITE:/1(60) SY-ULINE.
         READ TABLE IT_HEADER INDEX SY-TABIX.
          WRITE:/1 SY-VLINE,
             2 'Material  :'(006),14(7) IT_HEADER-MATNR NO-GAP,'-',
                   IT_HEADER-MAKTX,
                     60 SY-VLINE.
          WRITE:/1(60) SY-ULINE.
          SKIP.
          SET LEFT SCROLL-BOUNDARY COLUMN 50.
          WRITE:/1(156) SY-ULINE.
           FORMAT COLOR 1 INTENSIFIED OFF.
           WRITE:/1 SY-VLINE,
                    2 'Doc. No' CENTERED,
                   14 SY-VLINE,
                   15(14) 'Doc.Date' CENTERED,
                   27 SY-VLINE,
                  28(10) 'MVT' CENTERED,
                   40 SY-VLINE,
                 41(57) 'Receipts' CENTERED,
                 89 SY-VLINE, 90(47) 'Issues' CENTERED,130 SY-VLINE,131(12) 'Balance' CENTERED,144 SY-VLINE,
                 145 'MAT.DOC NO' CENTERED,156 SY-VLINE,
                /41 SY-VLINE,1 SY-VLINE,14 SY-VLINE,27 SY-VLINE,40 SY-VLINE,89 SY-VLINE,130 SY-VLINE,144 SY-VLINE,156 SY-VLINE,
                 40 SY-ULINE,
                 /40 SY-VLINE,
                 43 'STO-In' CENTERED , 51 SY-VLINE,
                 52 'Sales Returns' CENTERED , 65 SY-VLINE,
                 66 'Canc of Invoice' CENTERED, 82 SY-VLINE,
                 83 'Adj' CENTERED, 89 SY-VLINE,
                 90 'Sales' CENTERED, 97 SY-VLINE,
                 98 'STO-Out' CENTERED, 106 SY-VLINE,
                 107 'Canc of Sales' CENTERED, 120 SY-VLINE,
                 121 'Adj' CENTERED, 130 SY-VLINE,144 SY-VLINE,156 SY-VLINE,
                 1 SY-VLINE,14 SY-VLINE,27 SY-VLINE,40 SY-VLINE.
    WRITE:/1(156) SY-ULINE.
    *LOOP AT INT_DATA.
    *PERFORM GET_OPENING_STOCK.
    *APPEND INT_DATA.
    *ENDLOOP.
    FORMAT RESET.
        ENDAT.
      ENDLOOP.
    ENDFORM.
    *&      Form  BALANCE
          text
    -->  p1        text
    <--  p2        text
    FORM BALANCE.
      IF INT_DATA-SHKZG = 'S'.
        MENGE_RE = INT_DATA-MENGE_O + INT_DATA-MENGE.
        INT_DATA-MENGE_BAL = MENGE_RE.
        INT_DATA-MENGE_RE = INT_DATA-MENGE.
      ELSEIF INT_DATA-SHKZG = 'H'.
        MENGE_RE =  MENGE_RE - INT_DATA-MENGE.
        INT_DATA-MENGE_BAL = MENGE_RE.
        INT_DATA-MENGE_IS = INT_DATA-MENGE.
      ENDIF.
    ENDFORM.                    " BALANCE
    FORM HEADER_WRITE.
    SKIP.
      WRITE: /1(156) SY-ULINE.
      WRITE: /1 SY-VLINE,
              2(144) 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
                  INTENSIFIED CENTERED," INVERSE ON
              156 SY-VLINE.
      WRITE: /1(156) SY-ULINE.
      WRITE: /1 SY-VLINE,
              2(156) 'STOCK LEDGER' INTENSIFIED CENTERED,
               "INVERSE ON,
              156 SY-VLINE.
      WRITE: /1(156) SY-ULINE.
    SELECT SINGLE * FROM T001W WHERE
                      WERKS IN WERKS.
    IF WERKS-HIGH EQ SPACE.
        CONCATENATE 'Plant :  ' WERKS-LOW INTO TXT.
      ELSE.
        CONCATENATE 'FROM PLANT : ' WERKS-LOW 'TO PLANT : ' WERKS-HIGH INTO TXT SEPARATED  BY SPACE.
      ENDIF.
    WRITE:/ 'Plant :', WERKS-LOW,SPACE ,'-', T001W-NAME1,
    82 'As Of Date :', 95 sy-datum.
    IF NOT S_DATE IS INITIAL.
        WRITE: / 'From:'(004), S_DATE-LOW, SPACE, 'To:'(006), S_DATE-HIGH,82 'PAGE No:', 91 SY-PAGNO..
      ENDIF.
    *IF FLAG5 = 'E'.
       PERFORM WRITE_REPORT.
    *ENDIF.
    FORMAT RESET.
    endform.
    *&      Form  GET_OPENING_STOCK
          text
    FORM GET_OPENING_STOCK.
      SELECT SUM( MZUBB ) SUM( MAGBB )  INTO (V_STOCK, V_STOCK1)
                    FROM S031 WHERE MATNR = ITAB-MATNR AND
                                    WERKS = ITAB-WERKS AND
                                    SPMON LT V_MONTH1 AND LGORT = ITAB-LGORT.
      OSTOCK = V_STOCK1 - V_STOCK.
      IF OSTOCK < 0.
        OSTOCK = OSTOCK * -1.
      ENDIF.
    ENDFORM.                               " GET_OPENING_STOCK
    Thanks & Regards,
    Sreedhar.

    Hi,
    Check if the data is there in the data target on which your report is based.
    Check to see if this data is available for reporting.
    Check to see if you have auth to view this data.
    Check if there are any filters or restrictions in the query that would prevent the data from being displayed.
    Check the data through LISTCUBE transaction.
    Hope this helps...

  • My calendar will no longer let me add new event or delete them, it comes up with an error saying "cannot save event, no end date set" or "event does not belong to that event store". can anyone help with this?

    my calendar will no longer let me add new event or delete them, it comes up with an error saying "cannot save event, no end date set" or "event does not belong to that event store". can anyone help with this?

    Hi,
    To configure your ODBC DataSource, go to Control Panel ---> DataSources(ODBC) (If you are in a Windows environment).
    Select the tab System DSN. If you have not added your data source, then do so by clicking on the Add button. If you have added the datasource, click on the Configure button to configure it.
    Give the datasource name, then the database name.
    You have to give the hostname, service name and server name. I guess, in most cases, the datasource name and host name will be the same, service name and server name will be the same. If you are using TCP/IP, the protocol will be onsoctcp.
    There will be a file named Services under C:\WINNT\system32\drivers\etc where you have to give the port number for accessing this server.
    It will be like this <service name> <portnumber>/tcp
    Hope this helps...
    best wishes,
    Nish

Maybe you are looking for

  • How many apps can you build with ADP Single Edition?

    DPS Single Edition means that you can only create ONE app through the App Builder? If you need to create 2 or 3 what are your options? Creative Cloud, Prodfesional Edition? Creative Cloud suscribers need to buy the DPS anyway?

  • Plugin error when trying to open older indesign files

    Ive been looking through old posts etc, but I cant seem toe find out how I can update this mysterious plugin that will allow me to open files from older versions of indesign in my cs5.5 version of indesign. Is this even possible? If so, please could

  • How to access Excel files from different locations?

    Hello, I have successfully tested the Excel sample on WLS 7, and trying to run it on the WLS 8.1. Anyways, the common question for both is, how to access an excel files from different locations (e.g. c:\path\1.xls, \\domain1\finance\fin.xls, \\domain

  • More Than 7 Fonts?

    I think Buzzwords is great. Right up until I try to customize the look beyond the seven fonts hard-wired to the system. Does anyone have any idea how to upload, choose, install or otherwise expand the font selection beyond Minion, Myriad, Tekton, etc

  • Stuck on apple logo

    Facebook goofed this up. The new Facebook app wouldn't start. I deleted it and now the phone just gets stuck on the Apple logo. Wouldn't reboot. Tried resetting and it got stuck on the Apple logo. Same thing trying to get it into recovery mode. Ideas