BADI for CJ20N to get the WBS status when changed

Hi all,
Here's the requirement:
I have to capture the previous status and currently changed status of the WBS element in CJ20N T-CODE and save this in the ZTABLE.
Every time the STATUS of WBS element changes..the ZTABLE has to get updated.
Will you please help me out to do this.
I have tried with BADI - WORKBREAKDOWN_UPDATE, could find that the status part is updated after the call to WORKBREAKDOWN_UPDATE.
Thanks and Regards,
Krishna Chaitanya G
Edited by: Krishna Chaitanya  G on Apr 27, 2009 6:30 PM

Use BADI WORKBREAKDOWN_UPDATE method AT_SAVE.  The WBS elements are in internal table IT_WBS_ELEMENT which has structure PRPS.  Use OBJNR to find status with function module
CALL FUNCTION 'STATUS_READ'
  EXPORTING
  CLIENT                 = SY-MANDT
    objnr                  = gs_wbs_element-objnr
    ONLY_ACTIVE            = ' '
  TABLES
    STATUS                 = et_status
  EXCEPTIONS
    OBJECT_NOT_FOUND       = 1
    OTHERS                 = 2
The statuses are buffered in a separate memory area so be careful if you call any function modules that affect statuses e.g one to create Sales Orders as this initializes the buffered statuses and they are not changed when you save the WBS element.  To get round this problem put the current status in a separate memory area carry out the processing that initializes the statuses and then recall the status from memory.
  CALL FUNCTION 'STATUS_BUFFER_EXPORT_TO_MEMORY'
    EXPORTING
      i_memory_id = 'ZPSS_STATUS'.
  LOOP AT gt_pss_01 ASSIGNING <ls_pss_01>.
    AT NEW sold_to_party.
      CLEAR: ls_order_header,
             lt_order_items,
             ls_order_partners,
             lt_order_partners.
      "Header
      ls_order_header-doc_type = c_rsbill_order_type.
      CALL METHOD <ls_pss_01>-o_pss01->get_sales_area
        IMPORTING
          e_sales_org  = ls_order_header-sales_org
          e_division   = ls_order_header-division
          e_distr_chan = ls_order_header-distr_chan
        EXCEPTIONS
          not_found    = 1.
      IF sy-subrc NE 0.
        CONTINUE.
      ENDIF.
      "Partner
      IF <ls_pss_01>-sold_to_party IS INITIAL.
        CONTINUE.
      ENDIF.
      ls_order_partners-partn_role = 'AG'.
      ls_order_partners-partn_numb = <ls_pss_01>-sold_to_party.
      APPEND ls_order_partners TO lt_order_partners.
    ENDAT.
    "Items
    CLEAR ls_order_items.
    ls_order_items-itm_number = <ls_pss_01>-posnr.
    ls_order_items-material = c_rsbill_material.
    ls_order_items-wbs_elem = <ls_pss_01>-posid.
    APPEND ls_order_items TO lt_order_items.
    AT END OF sold_to_party.
      CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
        EXPORTING
          order_header_in   = ls_order_header
          behave_when_error = space "'P' "Save when error occurs
          testrun           = space
        IMPORTING
          salesdocument     = <ls_pss_01>-sales_order
        TABLES
          return            = <ls_pss_01>-bapireturn
          order_items_in    = lt_order_items
          order_partners    = lt_order_partners.
    ENDAT.
  ENDLOOP.
*--Re-fill status from memory
  CALL FUNCTION 'STATUS_BUFFER_IMPORT_FROM_MEMO'
    EXPORTING
      i_memory_id = 'ZPSS_STATUS'.
Hope this is of some use

Similar Messages

  • FM for getting the SYSTEM STATUS in pp order.

    hi,
    i wnat to know what is the FM used to get the SYSTEM STATUS in pp order.
    and the parametes needed t be passed.

    HI,
    1. go to tcode BS22 (Maintain: System Status) 
    2. look for the system status TECO. 
    3. Double click the field "TECO". 
    4. in the transaction control tab look for the business transaction "RMWA" or goods movement (you can type it in the lower left corner buttom box). 
    5. select the radio button from "Allowed" to Disallowed". 
    6. save your changes. 
    Here are the function moduels:
    SYSTEM_STATUS
    UPGI22_GET_SYSTEM_STATUS
    UPG_GET_SYSTEM_STATUS
    TMS_CFG_GET_SYSTEM_STATE
    Regards
    Sudheer

  • Please restore e-mail or at least give us some real information.  Tech support is almost smug in their response for additional information.  The iCloud status page has said the same thing since yesterday.  A real dis-service.  My business depends on this!

    Please restore e-mail or at least give us some real information.  Tech support is almost smug in their response for additional information.  The iCloud status page has said the same thing since yesterday.  A real dis-service.  My business depends on this!  Any one have any suggestions not being offerd by tech support or Apple?  Anything at all?

    mdjb wrote:
    I just lost a big opportunity to get a new client because of this!!   almost 24 hours now without any email service. I was one of the original.mac customers.  I am over this time to move on. It is an inferior product.
    My sympathy, but, this is what you agreed to when you chose to use a free system: (From terms of service agreement, iCloud)
    APPLE DOES NOT GUARANTEE, REPRESENT, OR WARRANT THAT YOUR USE OF THE SERVICE WILL BE UNINTERRUPTED OR ERROR-FREE, AND YOU AGREE THAT FROM TIME TO TIME APPLE MAY REMOVE THE SERVICE FOR INDEFINITE PERIODS OF TIME, OR CANCEL THE SERVICE IN ACCORDANCE WITH THE TERMS OF THIS AGREEMENT.
    And this is no different from any other free service I'm afraid. Pay for your mail, then you have the right to expect service.

  • Getting the below error when running the Baseline.grf for the first time

    I am getting the below error when running the Baseline.grf for the first time.
    Appreciate your support in resolving it.
    Error below:
    INFO [main] - *** CloverETL framework/transformation graph, (c) 2002-2012 Javlin a.s, released under GNU Lesser General Public License ***
    INFO [main] - Running with CloverETL library version 3.2.1 build#63 compiled 04/01/2012 12:53:21
    INFO [main] - Running on 4 CPU(s), OS Windows 7, architecture amd64, Java version 1.6.0_20, max available memory for JVM 901120 KB
    INFO [main] - Loading default properties from: defaultProperties
    INFO [main] - Graph definition file: graph/Baseline.grf
    INFO [main] - Graph revision: 1.114 Modified by: mkressirer Modified: Thu Apr 12 13:27:18 EDT 2012
    INFO [main] - Checking graph configuration...
    INFO [main] - Graph configuration is valid.
    INFO [main] - Graph initialization (Baseline)
    INFO [main] - [Clover] Initializing phase: 0
    INFO [main] - [Clover] phase: 0 initialized successfully.
    INFO [main] - register MBean with name:org.jetel.graph.runtime:type=CLOVERJMX_1306871483270_0
    INFO [WatchDog] - Starting up all nodes in phase [0]
    INFO [WatchDog] - Successfully started all nodes in phase!
    INFO [RUN_GRAPH1_0] - Running graph ./graph/InitDataStore.grf in the same instance.
    INFO [RUN_GRAPH1_0] - Checking graph configuration...
    INFO [RUN_GRAPH1_0] - Graph configuration is valid.
    INFO [RUN_GRAPH1_0] - Graph initialization (InitDataStore)
    INFO [RUN_GRAPH1_0] - [Clover] Initializing phase: 0
    WARN [RUN_GRAPH1_0] - WS messenger cleanup failed.
    java.lang.NullPointerException
         at org.apache.axis2.client.Stub.cleanup(Stub.java:134)
         at com.opensys.cloveretl.component.WebServiceClient.free(Unknown Source)
         at org.jetel.graph.Phase.free(Phase.java:487)
         at org.jetel.graph.TransformationGraph.freeResources(TransformationGraph.java:681)
         at org.jetel.graph.TransformationGraph.free(TransformationGraph.java:955)
         at org.jetel.graph.runtime.PrimitiveAuthorityProxy.executeGraph(PrimitiveAuthorityProxy.java:149)
         at org.jetel.component.RunGraph.runGraphThisInstance(RunGraph.java:511)
         at org.jetel.component.RunGraph.runSingleGraph(RunGraph.java:409)
         at org.jetel.component.RunGraph.execute(RunGraph.java:302)
         at org.jetel.graph.Node.run(Node.java:414)
         at java.lang.Thread.run(Thread.java:619)
    WARN [RUN_GRAPH1_0] - Some graphs wasn't executed (because graph "./graph/InitDataStore.grf" finished with error).
    WARN [RUN_GRAPH1_0] - Some graph(s) finished with error.
    ERROR [WatchDog] - Graph execution finished with error
    ERROR [WatchDog] - Node RUN_GRAPH1 finished with status: ERROR caused by: Graph './graph/InitDataStore.grf' failed!
    ERROR [WatchDog] - Node RUN_GRAPH1 error details:
    org.jetel.exception.JetelException: Graph './graph/InitDataStore.grf' failed!
         at org.jetel.component.RunGraph.execute(RunGraph.java:324)
         at org.jetel.graph.Node.run(Node.java:414)
         at java.lang.Thread.run(Thread.java:619)
    INFO [WatchDog] - [Clover] Post-execute phase finalization: 0
    INFO [WatchDog] - [Clover] phase: 0 post-execute finalization successfully.
    INFO [WatchDog] - Execution of phase [0] finished with error - elapsed time(sec): 2
    ERROR [WatchDog] - !!! Phase finished with error - stopping graph run !!!
    INFO [WatchDog] - -----------------------** Summary of Phases execution **---------------------
    INFO [WatchDog] - Phase# Finished Status RunTime(sec) MemoryAllocation(KB)
    INFO [WatchDog] - 0 ERROR 2 20132
    INFO [WatchDog] - ------------------------------** End of Summary **---------------------------
    WARN [exNode_0_1306871483270_RUN_GRAPH1] - Attempt to unregister non-registered thread in the ContextProvider.
    ./graph/InitDataStore.grf: Execution of graph failed! Error during graph initialization: Phase 0 can't be initilized.
    INFO [WatchDog] - WatchDog thread finished - total execution time: 2 (sec)
    INFO [main] - Freeing graph resources.
    ERROR [main] - Execution of graph failed !

    It can't find an Endeca specific class when running via the clover command line utility. Thus, the classpath being set in that shell script is not incorporating the .jar files where the endeca-specific classes are packaged. I would start by adding an line to see what your classpath is set to. There are actually already some lines of shell script in clover that you can uncomment to see what .jars are getting loaded:
    #echo $CLOVER_LIB/*
    for i in $CLOVER_LIB/*.jar $CLOVER_LIB/*.zip; do
         LOCAL_CLASSPATH="$LOCAL_CLASSPATH:$i"
    done;
    #for i in `ls $CLOVER_LIB/*.jar`; do
    #echo $i
    #done;
    You could also echo LOCAL_CLASSPATH to see what is getting set there. At the end of the day, you will need the endeca-specific jars to load which can be found here: /Endeca/Discovery/2.3.0/Integrator/plugins/com.endeca.latitude_1.0.0/*
    HTH,
    Dan
    http://branchbird.com

  • Which PO and PR table can be used to get the WBS element field.

    Which PO and PR table can be used to get the WBS element field. Thanks.

    HI,
    In the PO the concerned field for WBS element shall be tracked in the Item details and the account assignment tab in PO.
    It shall be checked from EKKO table with PS_POSI feld.
    The same shall also be tracked in PR from EBAN table .please refer the account assignment tab in the PR item details.
    Hope this helps.
    Regards,
    Prasanna
    Award pls if helpful.

  • Query to get the Deployment Status of an application - SCCM 2012

    Hi,
    Do we have any query/report to get the detailed status report & machine name, user name of a deployment in sccm 2012 as in sccm 2007, instead of clicking on each deployment status to find the machine names and status details?
    Regards,
    Mike.

    Hi,
    You could have a look the report -"All system resources for a specified package and program deployment in a specified state".
    Best Regards,
    Joyce
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Getting the Latest status with respect to DATE entered

    Hi guyz, kindly help me in this scenario:
    I have a DSO and a CUBE....
    DSO:
    cust
    status code
    status date
    RAW DATA
    cust               status code               status date
    payer1                    1                      12/31/2013
    payer1                    3                       1/3/2014
    payer2                    4                       12/15/2013
    payer2                    2                        1/10/2014
    CUBE:
    cust
    0calday
    qty (KF)
    RAW DATA
    cust                    0calday                    qty
    payer1                1/1/2014                    10
    payer1                1/2/2014                    20
    payer1                1/3/2014                    30
    payer1                1/4/2014                    40
    payer1                1/5/2014                    50
    payer2                1/1/2014                    60
    payer2                1/2/2014                    70
    payer2                1/3/2014                    80
    payer2                1/4/2014                    90
    payer2                1/5/2014                    100
    I need to have this report: (for example I entered 1/1/2014 - 1/5/2014)
    cust               status code               0calday              qty
    payer1                   1                       1/1/2014              10
    payer1                   1                       1/2/2014              20
    payer1                   3                       1/3/2014              30
    payer1                   3                       1/4/2014              40
    payer1                   3                       1/5/2014              50
    payer2                   4                       1/1/2014              60
    payer2                   4                       1/2/2014              70
    payer2                   4                       1/3/2014              80
    payer2                   4                       1/4/2014              90
    payer2                   4                       1/5/2014              100
    Is this possible in query? Or do I need to do this in start routine?
    By the way, I can already show the QTY figures, I used CONSTANT SELECTION..My problem now is how to the STATUS CODE..How will I do this?
    Thank you!
    Loed

    Loed,If you are flexible with modeling level changes then i would suggest to stamp the values of status and status date against payer in cube.
    Add the two objects ion cube.Do a lookup on the DSO from cube in End routine and based on payer fetch the value of status and status date against each payer.
    Now once you have the complete data in the cube then at reporting level to get the correct status based on the validity dates you can refer my blog.
    Status of Tickets based on their Dates
    PS:If you need assistance in the coding part then let me know.
    Regards,
    AL

  • Get the inherited status of attributes

    Hi All,,
    I have a requirement as below:
    o     Every time the program reaches a line where the attribute ID and/or position ID is different from the previous line or for the first line, all attribute values for the dedicated position and attribute ID that are not marked as Inherited need to be deleted.
    For this i want to get the inherited status of the attributes(Whihc is present in my input file)
    can anyone help me in this?
    Moderator Message: Specs-dumping is not allowed.
    Edited by: kishan P on Apr 12, 2011 2:12 PM

    Hi,
    Use function module "FTR_IDOC_READ", Output structure "PE_IDOC_STATUS" holds the current status of IDOC number
    Regards
    Vinod

  • User exit /Badi for CJ20N

    Hi All,
    Can anyone plz tell me if there is any User exit /Badi for CJ20N which triggers at the time of releasing the project or after releasing saving the project.
    Thanks
    Pragya

    Hi,
    Put a breakpoint in the class cl_exithandler in method get_instance.
    Check any BADI is triggering at the time of release or save
    Regards
    Praveen

  • Can't get itunes.  I get the following message when I click on either the shortcut or the program.  It says ITunes has stopped working and I can either check on line for a solution and close the program or just close the program.

    When I click on the itunes shortcut or the program  I get the following message:
    ITunes has stopped working.  My two options are:  Windows can check on line for a solution to the problem or close the program. 
    It seems that my entire library is not there.  If I sync my ipod will it add it back into my library on the computer? 
    I've even tried installing again and nothing works.  Tried the "repair" and it says that ITunes is loaded but I stil get the above error when I try to open the program.
    Thanks

    Let's try the following user tip with that one:
    iTunes for Windows 10.7.0.21: "iTunes has stopped working" error messages when playing videos, video podcasts, movies and TV shows

  • I get the following message when installing 11.0.5 "The feature you are trying to use is on a network resource that is unavailable" for windows install

    I get the following message when installing 11.0.5 "The feature you are trying to use is on a network resource that is unavailable" for windows install

    I just found a way to get Fixit to Run.  Go to http://support.microsoft.com/fixit/ and then pick "Install or upgrade software or hardware" and run Fixit from the "Run" button on the webpage.  I just picked run, instead of save, and ran it directly from the web page for each of the apple software.  If the window doesn't come up full size, hit "Tab" twice and then "Return".  You'll be able to see the prompts from there.  Have it attempt to uninstall iTunes on its own.  Repeat the process for any of the other Apple products, including Bonjour and iCloud.  Then, go to the iTunes website and install from there.  I had a downloaded copy and installed from there, but it came up with an error about missing the apple help, or something like that.  It allowed me to uninstall, and I reinstalled direclty from the website, and it all works now.

  • Problem updating to iphoto 9.6 after upgrading to Yoesmite  I am getting the following message when I try top date iPhoto This update is not available for this Apple ID either because it was bought by a different user or the item was refunded or canc

    problem updating to iphoto 9.6 after upgrading to Yoesmite  I am getting the following message when I try top date iPhoto This update is not available for this Apple ID either because it was bought by a different user or the item was refunded or canc

    "This update is not available for this Apple ID either because it was bought by a different user or the item was refunded or cancelled." ?
    This error message will appear erraneously, if you skipped the update to Mavericks and iPhoto 9.5.1 and went straight from an earlier MacOS X version to Yosemite, without first updating to iPhoto 9.5.1 and associating iPhoto to your AppleID.
    Try first to buy iPhoto with your AppleID instead of updating. Delete iPhoto from Applications, but don't empty the Trash, then go to the main page of the App Store and search for iPhoto. If you are lucky, it will show as free and you can buy it directly.
    If iPhoto  is not showing as free, there is no help but contacting the App Store Support: Ask for a redemption code. You will need to provide a prove of purchase for your mac with iPhoto preinstalled.
    http://www.apple.com/support/mac/app-store/contact/

  • I get the following message, when trying to check for updates on itunes:-  "The iTunes update server could not be contacted. Please check your internet connection or try again later".

    I get the following message when I go to "check for updates" on iTunes (I have XP on windows). Error message: "The iTunes update server could not be contacted. Please check your internet connection or try again later".
    My firewall (both anti virus firewall and windows firewall, are set up to allow itunes programme to work) - I also have set both internet explorer and chrome to allow
    apple website as an exception.
    However, I still get the same error message... can anyone help?
    Thanks

    Try updating your iTunes using an iTunesSetup.exe (or iTunes64Setup.exe) installer file downloaded from the Apple website:
    http://www.apple.com/itunes/download/

  • How to get the Shipping status of a Invoice items in SAP?

    Hi All,
    Is there any way to get the Shipping status of a Invoiced Item ?
    While i extracting Sales Invoice lines,i can get the shipping method and the shipping date,how can i confirm whether the item is shipped or not?.
    Is there any table which contains the shipping status or any column in Invoice lines(INV1) which contains the shipping status?
    Please help me to come out from that problem
    Thanks
    JanakiRaman

    Hello Gilbert,
    The column what you specified INV1.TRNSCODE is to know how the shipping was done. My question, Is there any field to specify the material was shipped or not?
    Thanks
    Janakiraman

  • My macbook seems to be going crazy. At certain points (and for hours) I get the oh snap page on chrome, safari doesnt work, macbook wont let me create any files or for example upload music to itunes. I restored my mac so im sure its not a malware problem.

    My macbook seems to be going crazy. At certain points (and for hours) I get the oh snap page on chrome, safari doesnt work, macbook wont let me create any files or for example upload music to itunes. I restored my mac so im sure its not a malware problem. The only thing that solves it is switching off and on , but sometimes I have to do that for 6-7 times before its ok or wait for a few hours. Some help please

    Please read this whole message before doing anything.
    This procedure is a test, not a solution. Don’t be disappointed when you find that nothing has changed after you complete it.
    Step 1
    The purpose of this step is to determine whether the problem is localized to your user account.
    Enable guest logins* and log in as Guest. Don't use the Safari-only “Guest User” login created by “Find My Mac.”
    While logged in as Guest, you won’t have access to any of your personal files or settings. Applications will behave as if you were running them for the first time. Don’t be alarmed by this; it’s normal. If you need any passwords or other personal data in order to complete the test, memorize, print, or write them down before you begin.
    Test while logged in as Guest. Same problem?
    After testing, log out of the guest account and, in your own account, disable it if you wish. Any files you created in the guest account will be deleted automatically when you log out of it.
    *Note: If you’ve activated “Find My Mac” or FileVault, then you can’t enable the Guest account. The “Guest User” login created by “Find My Mac” is not the same. Create a new account in which to test, and delete it, including its home folder, after testing.
    Step 2
    The purpose of this step is to determine whether the problem is caused by third-party system modifications that load automatically at startup or login, by a peripheral device, by a font conflict, or by corruption of the file system or of certain system caches.
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards, if applicable. Start up in safe mode and log in to the account with the problem. You must hold down the shift key twice: once when you turn on the computer, and again when you log in.
    Note: If FileVault is enabled, or if a firmware password is set, or if the startup volume is a Fusion Drive or a software RAID, you can’t do this. Ask for further instructions.
    Safe mode is much slower to start up and run than normal, with limited graphics performance, and some things won’t work at all, including sound output and Wi-Fi on certain models. The next normal startup may also be somewhat slow.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    Test while in safe mode. Same problem?
    After testing, restart as usual (not in safe mode) and verify that you still have the problem. Post the results of Steps 1 and 2.

Maybe you are looking for

  • Need help in finding the root cause the error 'Could not find function:'

    Hi fokls, In my workflow notification , when I click on the notification to process it , it says ' 'Could not find function:' error. I found the this message is coming out from the Fnd_new_messages table from the message_name 'FND_FUNCTION_NOT_FOUND'

  • No service for system sap*** client *** , sm58 error

    Hi Friends When I am trying to send message from My Xi system to R/3 system I am getting error., No service for system SAPSXD, client 001 in Integration Directory I had searched it on sdn n found that this is very common error. I had gone through blo

  • Weird Framework item in dock.  Can't stop it!

    Just setup a new MacPro dual 2.8 OSX 10.5.3. On startup, an item appears in the dock named 'CoreMIDIServer.framework'. It shows as an open application, but there is nothing open or running. It is not in the startup folder. Where does it come from? I

  • Sql query to get the given output

    Hi Friends My table data is given below user transaction_date transaction_type 1 01-Aug-2011 a 1 02-Aug-2011 c 1 03-Aug-2011 a 1 03-Aug-2011 b 1 04-Aug-2011 a 1 04-Aug-2011 b 2 03-Aug-2011 a 2 03-Aug-2011 b 2 04-Aug-2011 c 2 04-Aug-2011 b 2 05-Aug-20

  • Customized Control shape varies in Windows XP to Windows 7

    Hello all  I have created few customized control icon and used in my application,for development i using windows XP ,screen resolution -1280X1024,when i use the Exe created in Windows7 system with screen resolution 1280X1024, the customized control i