Extract Process Chain ID/Name that an embedded ABAP program is run from?

Hi all,
I have created some Process Chains in SAP BW where I have incorporated some ABAP program Process Types that uses the same ABAP program.
In these embedded ABAP program Process Types I need to extract the name of the Process Chain it runs from (ID, Technical Name, Descirption).
Is there any way this is possible to do?
One solutions that is not possible to implement (due to parallell runs of process chains that uses the same ABAP program) is the following:
search in table RSPCVARIANT for your program as follows
- field TYPE = "ABAP"
- field FNAM = "PROGRAM"
- field LOW = <program name>
take the value of field VARIANTE and use this in table RSPCPROCESSLOG (enter a date selection for BATCHDATE as well)
take the most recent entry (should be the one you're actually running at that moment)
via field LOG_ID, retrieve CHAIN_ID (technical name of your process chain) in table RSPCLOGCHAIN
So my question here is:
-Is there any way to extract the Process Chain ID/Name that an embedded ABAP program Process Type is run from?
Thanks beforhand for your feedback!
regards
Oddmar

Hi Erik,
I am stuck up with a similar requirement, wherein I have an ABAP program in my process chain and I need the technical name of the process chain in the ABAP program at run-time.
Did you get a solution or work-around for this scenario?
Thanks in advance.
Regards,
Chetana.

Similar Messages

  • Is a save step neccessary in a Process Chain when loading hierarchies with an ABAP program?

    We are loading hierarchies using the ABAP routine found here in the SDN. 
    We have come accross the issue where the process chain loads successfully, but does not update the hierarchy (this problem is documented in the SDN).  It is not a consistent issue, but it causes problems when it does occur.
    OSS note 652856 points out that a SAVE HIERARCHY step is needed after the load and before the Change Attribute run.
    We have added the step to the process chain, which leads me to the question.
         In using the ABAP program to load hierarchies is the addition of the Save Hierarchy step necessary?
         Will that resolve the issue with hierarchies not updating?

    Hi Bill,
    Yes, SAVE HIERARCHY step is required when hierarchies are loaded as part of process chain. This step ensures that the hierarchy data loaded to BW has been saved. Then we have to run ACR so that these hierarchies will be activated and adjusted.
    This is the reason why even the hierarchy data loaded using infopackage needs this step. This step is not required if the Infopackage is triggered manually.
    This link will help you in better understanding
    http://help.sap.com/saphelp_nw04/helpdata/en/3d/320e3d89195c59e10000000a114084/content.htm
    Regards
    Chandu

  • ABAP PROGRAM to run a process chain

    Hello all,
    What is the ABAP program to run a process chain after a step that has failed but is manually corrected?
    In short a std ABAP program to run a pc.
    Regards,
    NIKEKAB

    Hi.
    Plz see my answer to similar question in [this thread|Re: Manage a message at the end of process chain on Web planning Application].
    Regards.

  • Get name of Chain in the embedded ABAP program

    Dear all,
    Following situation:
    There is in a process chain a step with ABAP (which is executing a report).
    Is it possible for the ABAP program to resolve the name of the process chain, by which the program was started?
    (Without inserting in the variant a hard input parameter.)
    Best regards,
    Alex

    search in table RSPCVARIANT for your program as follows
    - field TYPE  = "ABAP"
    - field FNAM = "PROGRAM"
    - field LOW   = <program name>
    take the value of field VARIANTE and use this in table RSPCPROCESSLOG (enter a date selection for BATCHDATE as well)
    take the most recent entry (should be the one you're actually running at that moment)
    via field LOG_ID, retrieve CHAIN_ID (technical name of your process chain) in table RSPCLOGCHAIN

  • Extract forecast results and accuracy (errors) in an ABAP program

    Hi Experts,
    We are executing forecast in background using planning jobs in a process chain. We are doing this in 2 stages - 1. at Product group & Location level and 2. at Product & Location level. The selection ids that we have created for these jobs contain multiple product & locaton combinations or product group & locaton combinations.
    We can see the forecast reults, messages and errors in the job logs and messages (in the process chain ad spool). I would like to extract this same information into an ABAP program. We are basically tryig to find out the Product group and location combinations for which the MAPE is greater tha 50%.
    There is a table /SAPAPO/FCSTACCU which gives the MAPE and other forecast errors. There is a fileld "Pointer for forecast results", I'm not able to relate this with our Product group & Location codes. Can anyone give me any ideas on how to proceed?
    Thank you indeed for your contribution.
    Best regards,
    Fasial Ali

    Hi
    All the background job are getting stored in the following tables
    /SAPAPO/LISLOG
    /SAPAPO/LISMAP
    I think here you should able to find out all the information per product , location. As the respective information is available in tables, you can use them in ABAP program.
    I hope this will help you.
    Amol

  • How to get the name of an executing ABAP query in run time

    Hi ABAP Gurus,
    I need to get the ABAP query name when it's running. For example we can get the current executing ABAP program name from SY-REPID.
    My tried logic - every query generates an ABAP program like AQZZUGQUERY. 'UG' stands for user-group name and the length specified for it is 12, if the length of the user-group name is less than 12, then the rest will be filled by '='. Next 'QUERY' stands for ABAP query name and the length specified for it is 14, if less, then the rest will be filled in with '=' in the right. I've tried to extract the query name by using cut and trip (offset) operations.
    But somehow this logic is not working - always it's picking up the function name as checked in debug mode.
    Guys - Can you please provide me the solution on this.
    Thanks & regards,
    Jayanta Bej.

    Guys,
    I've cracked the issue. Instead of retrieving the query name from sy-repid, I've retrieved it from sy-cprog and the problem is resolved.
    Thanks guys for your quick responses.
    Thanks and regards,
    Jayanta Bej.

  • Extraction problem - selection conditions for data load using abap program

    Hi All,
           I have a problem loading data over a selected period where the selection of date range is done using ABAP routine (type 6). Here though in the request header tab in monitor screen i'm able to see the selection date range populated correctly, no records are being extracted. But if i delete the abap filter and directly give the same date range for selection we are able to extract data. if any body has faced similar problem and have a solution for it please help me with yur suggestion.
    Thanks,
    nithin.

    It seems the the data range is not properly set in the routine.
    You can check the value of selection period generated by routine in the data selection tab-> execute button is there .
    Click it to to test the selection values generated by the ABAP routine..
    If the value here seems correct one then paste the code of the routine that u have written with brief logic details that u have applied.
    Sonal.....

  • Process chain and Control M

    Hi Gurus
    We are designing process chain for our BW solution.
    We have identified the dependancies of various loads which includes flat file loads and loads from R/3.
    Now we would like to control ERP and BW jobs by Control M .
    I have the following questions:
    1. Which portion of BW process chain do we need to plug in to Control M. ? Do we need to connect the Meta chain to control M or different process chains to Control M?
    2.When we create Process chain for BW, what is the best practice? Is it good to create small chains and connect them via Meta chain? or we have to create small chains only?
    3. Can we include R/3 extraction Jobs and V3 Jobs in our BW process chain? so that they will trigger when we run the process chain?
    4. If we decide to run V 3 jobs after every half an hour on R3 side then how often we have to extract data to BW? and how to catch correct delta without missing single record?
    I would appreciate if you can help me with your knowledge.
    Thanks
    Kris

    Hi Kris,
    Control M is a third party scheduling tool provided by BMC software.
    1) You have option to either include a meta chain or individual chains in Control  M .
    2) It depends on how your data is extracted. If you have any dependecy jobs on sourcre system, then it is better to create small process chians and include them along with your dependecy jobs in Control M
    3)you can include R/3 dependency jobs and V3 jobs in Control M. Once those jobs are finished you can run BW process chains via Control M.
    4)You have several scheduling options availalbe in control M to take care of your BW and R/3 jobs.
    V3 jobs collect data from R/3 application tables and fill R/3 delta queue(RSA7). when you run BW process chain it will collect all the data available from R/3 delta queue.
    If both jobs are running at same time, then it is better to apply some wait time on BW jobs(in process chians).
    hope this helps

  • Process Chain Review Question: function module/ABAP program/Event

    Hi,
    1. Can you tell me a bit more about function modules such as RSPC_CHAIN_ACTIVATE_REMOTE
    2. What are function modules in general terms. i.e.  What is their role?
    3. How do I see all function module available?
    4. When is function module used instead of ABAP program?
    5. How do they help in the support and monitoring of Process Chains?
    6. I am getting confused over the following under process chains “job”, “event”, “function module” and “ABAP Program”
    Thanks

    2. What are function modules in general terms. i.e. What is their role?
    Function module return a value ( most of the time), they return some value either a single value of rane of value or even a table. Example: FM to return fiscal period gieven the fiscal vaeiant and system date.
    3. How do I see all function module available?
    Go to Se37 and this is function builder. You will find FM starting with RS* more useful. You cna also create your own in Se37.
    4. When is function module used instead of ABAP program?
    In addtion to answer I gave in 3 above, program is used to check some logic and update some tables or give screen output.
    You may note FM is also a program.
    5. How do they help in the support and monitoring of Process Chains?
    As I said, for monitoring chains, use Sm37  and logs in RSPC.
    6. I am getting confused over the following under process chains “job”, “event”, “function module” and “ABAP Program”
    I am not clear what are you looking for.
    You cna schedule a FM or a program to run in a chain. Is that what you mean?
    Ravi Thothadri

  • 50 Parallel Processing through Process Chain

    Hello Experts,
    Here is what I am trying to do.
    I want to create Process Chain which run 50(for ex.) Abap Program in parallel. I can create one by one through Process Types and select 'ABAP Program' and drag in the chain which is really very time consuming and tidious.
    Does anybody have better approach to do that ?? Any table where I can create all this parallel steps and put it in a chain ?? or copy each step and put it in parallel in chain ??
    Quick reply will be appreciated.
    Points are guaranteed for Right Resolution.
    Thanks in Advance.

    Hi "Believe in Jainism",
    Do you need to execute other process chain steps after executing the 50 abap programs? If not, why not just do the following:
    1) Create an ABAP program
    2) Inside the ABAP program, use the SUBMIT statement to execute the 50 ABAP programs in a background task.
    If you need to execute steps after the 50 abap programs, you can try to create a custom process type that executes the 50 ABAP programs in a background task and then monitors the statuses and then terminate only once all of these programs have executed successfully or if 1 has failed.
    Hope this helps.
    P.S. If you don't mind, may I ask why do you need to execute 50 ABAP programs in parallel?

  • Access Process Chain Runtime Information

    Hi,  I'd like to add an ABAP program to the end of a process chain.  I'd like the ABAP program to be able to tell what Process Chain is currently being run and what Log ID is currently open or being written to.  Any Ideas how to do this?
    Thanks!
    Nevermind
    I think this would be where a custom process type would be appropriate..
    Thanks!

    Hi Kenneth,
    The table RSPCLOGCHAIN would give you the information regarding which chains are running/completed/failed etc.
    The table RSPCPROCESSLOG would give you, which process step in the process chain is actually executing.
    Once you know the Chain Name, for which you want to get the status, use the following function modules
    RSPC_API_CHAIN_GET_STATUS
    Gives you if a chain is running/completed/failed.
    RSPC_API_CHAIN_GET_LOG
    Gives you a detailed log of the process chain(Each steps)
    The tables mentioned above would give you the following information
    R     Ended with errors
    G     Successfully completed
    F     Completed
    A     Active
    X     Canceled
    P     Planned
    S     Skipped at restart
    Q     Released
    Y     Ready
         Undefined
    J     Framework Error When Ending (e.g. Subsequent Job Missing)
    Regards,
    Praveen.

  • How to include Query extractor in process chain

    Hi All,
    According to th requirement I have created Query Extractor using RSCRM_BAPI to upload Query data to application server. 
    Now it has to be included in PROCESS CHAIN.
    Is there any way to include Query Extractor in process chain.
    Or is there any ABAP program which can be used to trigger the my Query Extractor and later this program can be used in process chain.
    Quick reply is much appreciable.
    Thanks,
    Uday.

    s

  • Passing parameter to process chain - logical file name

    Hi,
    Is there a way to pass a parameter to a process chain? Iu2019m trying to define logical file name (via transaction FILE) allowing to point on physical files name containing a parameter to be defined at run time. Is it possible?
    Example, consider receiving file ending by a number representing its source system origin:
    Filename_1      (file coming from syst 1)
    Filename_2      (file coming from syst 2)
    As both file have the same structure I would like to specify a single datasource Filename_n and a single process chain in which I would set the parameter n at run time. Is there a way to implement that?
    I first thought about an Abap routine reading parameter in a table but than Filename_n canu2019t be treated in parallel u2026 Any other idea?
    Cheers,
    Benoit

    Hi Benoit,
    yes, it is possible to call the file paths with routine at infopackage.
    if you have only 2 file and file names are constant, then you can create 2 infopackages and keep thse two in process chain.
    Start
    I
    infopackage 1
    I
    Infopackage 2
    and from applcation sever, these files will be loaded.
    if upi have more files, you can write a routine at the selection of file path, in infopackage.
    Regards
    Daya Sagar

  • Extracting pdf that's embedded in xml

    I'm needing to extract/parse a pdf file that is embedded in an xml file. I'm able to do it with Microsoft XML Parser, but want to do it on unix using java.
    I've tried FOP - only good for creating pdf's out of text, but not able to handle embedded binary ???
    Any help would be appreciated.

    Your question is confused. You have a PDF file embedded in your XML? If that's so, then FOP would be useless because its purpose is to create PDF files, not to read them. And embedded binary? Most binary values in the 0x00 to 0x1f range are invalid XML characters, so no XML parser should handle them. (Although Microsoft hasn't always been good at implementing other people's standards.)
    Perhaps you could restate your question. If you just have a PDF file embedded as a giant text node in XML, then it shouldn't be too hard to extract it using any DOM technology. But somehow I don't think that's what you have.

  • Issues with a program,that exetutes SEM BPS sequence, into a Process Chain

    We have a process chain with a step which launches a program. That program executes a SEM BPS sequence. To set that request into green we have a step with other program which changes the planning cube to batch.
    Our two problems are:
    1) We cannot check in the process chain monitor if sequence finished all right because the step always finishes ok even if the sequence falls.
    2) Our SEM BPS sequence takes a long time and the process chain continues its execution without SEM BPS sequence is ended.
    Thanks a lot!
    Mario

    I am not sure if there is a solution to this in BW 3.x or SEM BPS. But if you can model the same planning sequence in BI-IP, then you can excute it in a process chain using a process chain variant.

Maybe you are looking for