ABAP Code to delete old PSA requests

Hi Friends,
I have a requirement where I am loading two different types of data through two different InfoPackages. Both the InfoPackages are scheduled to load data daily to a DataSource. Now the issue is I have to delete data every day from PSA, related to just one InfoPackage before I load data and leave the data coming from other InfoPackage as it is in the PSA.
In other words I want to delete PSA data based on an InfoPackage. I am not sure if we have a standard SAP program to achieve this or it involves custom ABAP code.
Any help will be appreciated.

Hi
two info packages are loading data from from same source system or same source system..?
If this 2 info packages are loading from different source systems, then you can achieve this using "Delete PSA" process type.In this process type we can delete PSA based on source system.
If 2 info packages are loading from same source system, then we need to look for ABAP program.
check the below document for ABAP Code
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/00be6ce4-aa1c-2e10-df81-856c1ffec357?QuickLink=index&overridelayout=true
how to create delete PSA process type in PC
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a02ba9e7-bb6f-2c10-09b4-e86b9fcbad41?QuickLink=index&overridelayout=true
Regards,
Venkatesh

Similar Messages

  • How to delete old PSA requests?

    Hello Experts,
    We are using apo bw 3.0B version.
    I tried deleting the old PSA requests  using a  process chain for "deletion of requests from psa ".It has deleted all the old requests as expected in PSA tree,But i am seeing these requests in Monitor -Administartion workbench from past  5 years (All Successfull and incorrect requests) which i want to clean up.Is there a way to clean up all these old requests ?
    Thanks.

    Hi
    Please go to RSA1 PSA
    Select the respective infosource and PSA which you want delete.
    Dobule click on PSA, you will able to see all the requests which were loaded in PSA earlier.
    You can select these request one by one and also delete via delete option from bottom of tool bar.
    You can also delete the PSAs with regular & scheduled job.
    Please go to RSA1 PSA . Right click on the respective infosource, you will get option to delete the data from PSA.
    Here you can schedule the frequency and delete the PSA on regular basis.
    I hope this will help you.
    Amol

  • The correct way to delete old transport request record ?

    Dear all,
    We want to delete old transport request record before 2008 (two years before) of our system.
    We learn that we should delete the records in the below two path:
    /usr/sap/trans/data
    /usr/sap/trans/cofiles
    Our target is that we will not see the old record after deleting in our PRD system.
    Normally, we see the transport request record in system by this way:
    STMS -->  import overview --> PRD --> Import Queue   system PRD --> Import history
    Our question is do we need to restart our system after delete the record to refresh the Import history?
    We have not delete the record now.
    Any experienced or expert, please kindly give advice.
    Regards,
    Allen

    Hello Allen,
    there are some notes and documentations for this process. Deleting the files from /cofiles and /data will not erase the request from the import history, as you already know.
    You should follow note #41732 to have the requests/data completely deleted from your system. There is a lot of complementary reading in notes #7224, #556734, #189841, etc.
    Note that you can remove the request from the import queue, import history, data and cofiles subdirectory, but still have it on the <SID> buffer (located in  /usr/sap/trans/buffer/<SID>). If this happens to you, please save a copy of the buffer file <SID>, then create a new, blank file named <SID> at a time when the import queue is empty (VERY IMPORTANT). Or, alternatively, please excute the tp cleanbuffer FIL command (which will erase the requests that are not found in /data and /cofiles directories).
    --> Please test this first on a test system, not directly on a productive environment.
    This should be enough to delete old transport requests on your system.
    Best regards,
    Tomas Black

  • How to delete old transfer requests

    Hi,
    I need to delete old transfer requests from dev, do you have idea, how to do it?
    Thanks
        Radka

    Radka, If the transport request has not yet been moved up the chain, first you have to delete the individual objects after diplaying the request in SE09/SE10 that are in the request and then delete the request. It might give you a warning message that the object is currently locked but you can ignore that.
    One word of caution, If someone else is trying to change the objects again in DEV please note that they will be changing the already changed objects in DEV which is not in line with what is currently in QA or PROD.
    -Vinod Swarnapuri

  • How I set the auto delete old spool request

    Hi
    I would like to know , how to auto delete old spool request. Have any option in SAP.
    I want spool requests on server for 3 days only.
    Pls suggest.
    Tapovardhan

    As a default background job SAP schedules<b> RSPO0041</b> program in background, this program's variant has the <b>Minimum age in days</b> value.
    Can you check with what variant this program is running. 
    This program needs to be scheduled daily with <b>Minimum age in days</b> field.
    Regds
    Manohar

  • Abap Code to Delete the Duplicate Entries in Datasource

    hI Friends I have a code that I am writing to delete the duplicate entries from CRM Custom Datasource  but it is throwing me error that INVERNO The specified type has no structure and therefore no component called INVERNO Should i define the structure please correct my code below so that it will work to delete the duplicate entries          
    Please help
    Data: l_s_ZOXD530051 like ZOXD530051. ***Extract Structure of Data source
    Case i_DATASOURCE.
    when 'ZZ_DS_CUSTOM_CRM_VALUES'.
    Sort C_T_DATA by INVERNO ZMKT_TYP.
    *write this Statement.
    DELETE ADJACENT DUPLICATES FROM C_T_DATA COMPARING INVERNO ZMKT_TYP.
    endcase.
    Thanks
    Soniya
    null

    Hi
    It means there's no field called INVERNO:
    Data: l_s_ZOXD530051 like ZOXD530051. ***Extract Structure of Data source
    Case i_DATASOURCE.
    when 'ZZ_DS_CUSTOM_CRM_VALUES'.
    <b>*Sort C_T_DATA by INVERNO ZMKT_TYP. <------</b>
    Sort C_T_DATA by INTRENO ZINS_TYP.
    *write this Statement.
    DELETE ADJACENT DUPLICATES FROM C_T_DATA COMPARING INTRENO ZINS_TYP.
    endcase.
    Max

  • How to find out which job delete old spool requests?

    Dear Experts,
    We have a problem with spool requests being deleted automatically, we've checked job RSPO1041 and made sure it was not scheduled to run, but somehow spool requests are gone. We also checked all the jobs on the day requests were deleted but nothing stands out. I would really appreciate it if any of you can help us find out which job is doing this or how to avoid requests being deleted.
    Thank you!
    Ling

    Hi,
    Please check the value of parameter 'rspo/req_lifetime' as it decides the lifetime of the spool requests which are generally stored in TemSe.Go through note 48400,this may help you understand how spool requests are stored and reorganized.
    Thanks

  • Error while deleting PSA Request Manually

    Hi Experts,
    I am trying to delete Older PSA Request, but it is throwing an Error "Internal Error occured during Authorization Check"....
    Also, when i tried to see the Monitor, it is not showing any records anything...Its showing as no logs found...
    I have used the Function Module "RSAR_PSA_CLEANUP_DIRECTORY_MS", but it is not working.
    Can anybody suggest if there is any solution to delete PSA Request?
    Regards,
    Anuja

    I don't believe this has anything to do with Crystal Reports. Please post in the SAP classic forums.
    Don

  • Problem in Delete PSA Request

    Hello Guys,
    I have come across a strange behavior of Delete PSA Request variant in Process Chains. When I am trying to delete PSA through Process Chain, I could delete PSA of all datasources except 0CO_OM_WBS_1.
    I tried it through different combinations, but could not delete data in 0CO_OM_WBS_1 through Process Chain. Can anyone help me through this, or any valid explanations on this front.
    Thanks,
    Saurabh

    Hi saurabh,
      It seems that you have some inconsistent requests in your PSA. Try running the program RSAR_PSA_CLEANUP_DIRECTORY/_MS and give your PSA technical name there which can be easliy found out once you click on the manage tab of you PSA at the top.
    Just put that technical name & run the program in repair mode. One the program is success full, your chain should be able to delete the requests there after.
    Check the Below thread, on how to delete the inconsistent requests from PSA.
    Finding out the details of the user who deleted a PSA request manually
    hope that the info helps you.
    Thanks

  • Delete PSA request from ODS

    Hello Guys,
    I need to know how can I delete the PSA request number generated when request is activated
    This request is type:  ODSR_*
    I need to delete this request in order to activate again the data of my ODS reuqest ID, because a problem the activation terminated unsuccessfully, and know I see the request in red, and with the request for reporting available.
    I want to delete it, because if I activate the request again, there is going to consume more space in my table space of ODSD.
    thanks in advance

    Ok, thanks for your help.
    One more question.
    The first activation failed, and when I saw the table space for ODSD, it decreased for about 1GB, my question is, if I reactivate the request, is going to consume another 1GB for the table space???
    Thats why I want to first delete the PSA request that generates when activated data, in order to recover that space that was consume in the first failed activation.

  • Delete PSA Request

    Hi Experts,
    1. I need to delete PSA request(50 request) in BI 7.0  production system.
    2. Also need to include the process type 'deletion of PSA request' to the existing process chain.
    Pls provide me the steps to follow to perform the above activities.
    Regards,
    Anand

    Hi,
    I found this answer for deleting the psa request.
    1.      Select the DataSource that you want to delete requests from the PSA for and choose Manage.
           2.      On the next screen, select one or more requests from the list and choose  Delete Request from DB.
           3.      When asked whether you want to delete the request(s), confirm.
    The system deletes the requests from the PSA table.
    You can also delete requests in DataSource maintenance. Choose Goto ®   Manage PSA (pushbutton). Follow the instructions above, starting from step 2.
    Can i follow the same in production. Pls confirm.
    Regards,
    Anand.

  • How to delete a specific request from ODS

    Hi all,
    We have an ODS which we're loading invoices from legacy system. In legacy system, there are two tables for invoices. First one is daily records which is archived on last day of each month. As you guess, second table is  for archive records. We need all of the records from  both tables. Because of performance issue , we don't want to load both tables everyday . So we created two transformation. Since there is no delta option, we need to delete the first table request from data targets before extraction. And delete the request from the second table only last day of month. We're created process chain. But there is no option for deleting only the request from a specific data source or transformation. Are there any solution for this?
    thanks,
    Yigit

    Hi,
    Thanks for your code. But is there any function module to delete most recent request from the ODS.
    I had 2 requirements...One in need to delete from ODS & Other one from Cube.
    FM - 'RSSM_DELETE_REQUEST' will be used to delete from Cube only.
    Can please you send FM & ABAP Code to delete request from ODS.
    Thanks in advance.
    Yigit
    Message was edited by:
            Yigit

  • Deletion of Spool Request

    Hello,
    My spool is full Could i delete old spool request if i deleted is there any impact on system ??/
    the spool request now reached into 31,901  so what steps i have to take please guide.
    Regards
    Deepak
    Edited by: DEEPAK Somvanshi on Jul 6, 2010 6:35 PM

    Hi Deepak,
    1. Check whether background job SAP_REORG_SPOOL with the report RSPO0041/RSPO1041 is running properly or not.
    2. If running properly, Goto t-code SP01, enter from and to dates for "Date Created" and execute. Spool requests get displayed. Select any one spool request and check the request attributes(F8). If you're able to see date under "deleted on" as either 12/31/2099 or 01/01/2100, this is due to kernel problem. For this you've to apply the new kernel as per the below note.
    Note 1423484 - Wrong date on cover page for spool requests
    Hope this would help you.
    Thanks & regards,
    Mogileeswar

  • ABAP Routine for Deleting and creating index for ODS in Process chains

    Any pointers for the ABAP Routine code for deleting and creating index for ODS in Process chains.

    Hi Sachin,
    find the following ABAP code to delete ODS ondex.
    data : v_ods type RSDODSOBJECT.
    move 'ODSname' to v_ods .
    CALL FUNCTION 'RSSM_PROCESS_ODS_DROP_INDEXES'
      EXPORTING
        I_ODS = v_ods.
    To create index:
    data : v_ods type RSDODSOBJECT.
    move 'ODSname' to v_ods .
    CALL FUNCTION 'RSSM_PROCESS_ODS_CREA_INDEXES'
      EXPORTING
        I_ODS = v_ods.
    hope it helps....
    regards,
    Raju

  • Program to delete a specific request from a Cube

    Hi Everyone,
    I've been trying to delete a certain DTP request from a cube but I'm unable to delete it. Is there any ABAP program to delete a specific request from a cube by provinfing requeset ID as the input.
    Thanks,
    Ram

    HI
    SE37RSSM_DELETE_REQUESTGIVE YOUR REQUEST NO & INFOCUBE NAME here. and execute.
    Table is :RSBKDTP contains DTP and target details.
    Hope it helps

Maybe you are looking for