Workflow Id Hardcoding in ABAP programs

Folks,
I have always been wondering why don't we have an option of using custom workflow templates for some of the ESS services and couple other places.
For example, If using Salary and Employment Verification ESS service, we have to use the workflow WS01000045 because workflow id is hardcoded in one of the standard SAP programs. If the standard workflow does not meet the client requirements, we either have to change the standard template or change the abap code where the standard workflow template id is hardcoded and I hate to change any SAP standard stuff.
I would appreciate any response justifying the hardcoding of workflow templates. wouldn't it be nice to have a place in configuration to replace standard SAP workfloe template with a custom version like we have for the PCR scenarios?
Thanks,
Saurabh

As an ABAP (and Business Workflow) developer I can offer three explanations.
1) no time
2) no fun
3) forgotten
1) Creating a flexible solution costs more in terms of programming effort, so if the project has problems meeting deadlines it is simpler to hardcode, and then fix this hardcoding later if there is time.
2) Adding flexibility in the form of customizing options to a working solution is definitely not the same fun as working on a new solution.
3) The developer intended to add customizing options later, actually had the time to do it, but forgot it (or forgot putting it on the to-do list).
Sorry, but developers are humans too.... even the übergeek ones

Similar Messages

  • How to find hardcoded in ABAP programs

    Dear Experts,
    Please tell me how to find hardcoded in ABAP programs.

    Hi Sam,
    Generally in Abap program hardcoded strings are declared in single quotes '         .
    for ex :
    write : 'Report heading'. " search for  '   in the entire program.
    press FIND button in menu bar and type single quote  '  . and select radio button ' IN MAIN PROGRAM '
    Regards,
    Aby.

  • How to call the abap program in workflow

    HI Exeprts,
    I need to call one abap program in workflow.
    can any tell me how to call the abap program in workflow.
    thanks &regards
    ramesh

    Dear Ramesh,
    U can use REPORT business object.
    Method : EXECUTE_2
    Regards,
    Sagar

  • Call workflow from ABAP program

    created a zbusiness object (ZPRODH)with
    one key field product hierarchy,
    one attribute level number and
    one method display.
    I tested that zobject and using this object created workflow to display product hierarchy ,it is displaying it. now I have to call it from one abap program.
    In the abap program I am calling the funcion module, I
    CALL FUNCTION 'SWW_WI_START_SIMPLE'
    EXPORTING
    TASK = TASK
    IMPORTING
    WI_ID = WI_ID
    TABLES
    AGENTS = AGENTS
    WI_CONTAINER = WI_CONTAINER.
    It is calling the workflow and subrc is 0, but not passing the value to the workflow. Because of that the method is not working, any idea?
    Thanks in advance

    ttpa,
    Please check this thread:
    Re: Workflow from abap program
    Also check that your Fm do requires any explicit commit or not?
    Hope it will help u
    Cheers
    Jai

  • Procedure to Call Workflow Object from ABAP program in Se38

    Hi All,
    I have one scenario like i have to call one Workflow object from ABAP program in SE38.The scenario is like below.....
    I have to select some records from database table.For example there are 100 records in the internal table.
    For all that records i have to invoke Workflow for getting approval from the authorized persons. Once Approval has come to program, It will post one document in SAP and process ends.
    Please suggest me how to move forward with this scenario.
    Regards
    Manas Ranjan Panda

    Hi,
    So you want to start a workflow from an ABAP, if an event exists for that particular workflow then the best way is to use fm SAP_WAPI_CREATE_EVENT,
    to start a workflow from an ABAP you can use fm SAP_WAPI_START_WORKFLOW.
    Kind regards, Rob Dielemans

  • How to trigger GP workflow through ABAP Program.

    Hi All.
    i have one scnerio , i want to create BOM through Custom Ztransaction that will be developed in ABAP Modulepool.
    User will create BOM  from this ztransaction through  Transactional Iview in PORTAL,Once the user save transaction , i want to trigger a GP(Guided Procedure ) workflow,from ABAP Program.
    is it possible to trigger GP workflow?
    if yes how  to  do it , please suggest the way out.
    Regards,
    Shyam.

    Hi lingana,
    As u see in my requriment that, Workflow is not designed within SAP , But the Workflow will be designing
    in SAP Netweaver, its a GP Workflow. And Ztransaction(Developed by ABAP) will  be seen by user through portal  and
    he save transaction on PORTAL, In backend  ABAP program will run , and after meeting certain condition, it should create
    or(Initiate) GP workflow(process).
    So my question is , how ABAP Program will call GP workflow, How the connection will be made in between ABAP Code and GP workflow framework.
    If any doubt regarding requriment let me know,
    Regards,
    Shyam.

  • Workflow vs Abap Program

    Hello Frienz,
    There is a typical business scenario with one of our client, I would like to get inputs from all of u..........
    Could u guys tells me is it possible to Call a Abap Program through a Workflow mail which has come to the supervisor's Lotus Notes Inbox for his/her action????????????????????
    Which means When supervisor opens the mail in LN is it possible to run a abap program when a radio button or any weblink is incorporated he or she clicks in the mail???????
    Requesting all of u to provide their valuable inputs.
    Regards
    Pavani G

    Hello Frienz,
    Thanks for all your valuable inputs................
    Sheeta / Manikya Raju: We had already tried the insertion of HTTP link but when we click on the link we r not able to run the program.......
    SAP HCM:
    1. S email received by supervisor is trigerred through Workflow only...........
    2. Unfortunately our LN Guy has not got any idea abt this..........
    Will very much appreciate for your quick response
    Regards
    Pavani G
    Edited by: G Pavani on Jul 28, 2009 2:04 PM

  • Workflow from abap program

    I created one workflow with a zbusines object. I did not create any event for the business object. only key fields and method.
    now my question is, how can I call or trigger the workflow from the abap program. please adive

    Hi Mat,
    u can use FM SAP_WAPI_START_WORKFLOW.
    Please find sample coding
    data: z_bus2080 type swc_object.
    data: begin of bus2080_key,
    id like viqmel-qmnum,
    end of bus2080_key.
    data: wf_cont type SWR_CONT occurs 0 with header line.
    parameters: qmnum like viqmel-qmnum.
    bus2080_key-id = qmnum.
    swc_create_object z_bus2080 'BUS2080' bus2080_key.
    Populate first container element - object type BUS2080
    clear wf_cont.
    move: 'BUS2080' to wf_cont-element,
    z_bus2080 to wf_cont-value.
    append wf_cont.
    Populate second container element - char variable USERNAME
    clear wf_cont.
    move: 'USERNAME' to wf_cont-element,
    sy-uname to wf_cont-value.
    append wf_cont.
    Call WAPI function
    CALL FUNCTION 'SAP_WAPI_START_WORKFLOW'
    EXPORTING
    TASK = 'WS94600159' "<-- Your workflow ID
    LANGUAGE = SY-LANGU
    IMPORTING
    RETURN_CODE =
    WORKITEM_ID =
    TABLES
    INPUT_CONTAINER = wf_cont
    MESSAGE_LINES =
    MESSAGE_STRUCT =

  • PASS DATA FROM ABAP PROGRAM TO WORKFLOW CONTAINER

    Hello Everybody,
    I am a workflow beginner and I want to pass a data from my ABAP code to a workflow container. This workflow container is used in the Send Mail step.
    The ABAP  Program is:
    REPORT  zdb_work_flow.
    tables : vbak.
    DATA : k TYPE sweinstcou-objkey,
                e TYPE swetypecou-event.
    DATA : st TYPE swcont,
                itab TYPE STANDARD TABLE OF swcont.
    PARAMETERS : vbeln TYPE vbak-vbeln.
    start-of-selection.
      st-element = 'VBELN'.   "This is my WORKFLOW CONTAINER
      st-tab_index = 1.
      st-elemlength = 10.
      st-type = 'C'.
      st-value = vbeln.
      append st to itab.
      k = vbeln.
      e = 'TRIGGER'               "This is an event in my BUS OBJ ZDB_WFLOW
      CALL FUNCTION 'SWE_EVENT_CREATE'
        EXPORTING
          objtype                               = 'ZDB_WFLOW'   "My BUS OBJ
          objkey                                 = k
          event                                  = e    "Event TRIGGER in ZDB_WFLOW
        tables
          event_container               = itab
        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.         .
      COMMIT WORK.
    Now I have created a workflow in SWDD as ZDB_WF_SW.
    In this WF I have created a container as VBELN.
    In the SEND MAIL I have given a header as "Worflow Triggered for &VBELN&"
    PROBLEM.
    The Workflow is getting triggered. I am also getting a mail "Workflow Triggered for" in my mailbox but the &VBELN& is missing from the header.
    I have set the IMPORT EXPORT flag of the WF CONTAINER "VBELN"
    Please Help.
    Edited by: Deepankar.B on Feb 22, 2011 4:08 PM
    Edited by: Deepankar.B on Feb 22, 2011 4:10 PM

    You wouldn't use a SMA as an assistance class - but refer to one within it.
    I would use Shared Memory Area classes - but I'd also build a SMA that could talk across multiple application servers.
    Thomas Jung proposed this in a forum reply some time ago.
    It shouldn't be too difficult to use RFC's to access the content of SMA's in multiple app servers - ensuring synchronisation across multi app servers. I've not yet had the need, so haven't attempted.
    The long polling in 7.02 apparently uses this approach, so in a 7.02 system there may even be standard components/ SMAs that you could use.
    I do not think global areas in FM's are available across sessions - I don't think you could use that as a data transport.

  • Trigerring workflows in an ABAP program

    Can somebody please tell me the best way to trigger a workflow in an ABAP program. And if possible please send me some sample code how it can be done. I need it urgently so if possible please reply to this ASAP.
    Thanks in advance,
    Mohsin

    Check the following Code to trigger the Workflow form custom program.
    Data for workflow trigger
      DATA: objtype    LIKE  swetypecou-objtype,
            objkey     LIKE  sweinstcou-objkey,
            event      LIKE  swetypecou-event,
            event_container LIKE  swcont OCCURS 0 WITH HEADER LINE.
      objtype = 'ZBUS1001'. "Material [sub object of BUS1001]
      MOVE v_wfmatnr TO objkey. "V_WFMATNR is material number
      event = 'CreatePLMMaterial'."Custom Event defined in
    ZBUS1001 [Tcode SWO1]
      REFRESH event_container.
    *Following are the Event parameters required in the *Workflow
      swc_set_element event_container 'Attachment' v_wfattachment.
       swc_set_element event_container 'Material' v_wfmatnr.
      swc_set_element event_container 'TisGroup' v_wftisgroup.
      swc_set_element event_container 'SchDate' v_schdate.
      CALL FUNCTION 'SWE_EVENT_CREATE'
           EXPORTING
                objtype           = objtype
                objkey            = objkey
                event             = event
           TABLES
                event_container   = 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.
      COMMIT WORK.
    In TCode SWETYPV Create entry for Object type Event and Workflow ID.
    In my case Object type is ZBUS1001
    Event CreatePLMMaterial
    Rec type = <Workflow ID>

  • Import issue for ABAP program in Production Server ?

    Hi Experts,
    I have an ABAP program which gets executed properly in BW Development server but getting the following error when I am trying to execute it in the BW Production while  I could activate the program successfully.
    Kindly help me to resolve this issue.
    Thanks in advance !!!
    Regards,
    Gokulkumar RD

    Hi Golkul,
    Can you debug the program while execute?
    I think there is some hardcoding in the program for checkiing the client and then raised a custom message in the program.
    Can you share the coding of the prorgam if possible?
    Try to check for any messages raised in the program. Also click on the on the message pop up and see the details on the message and let us know.
    Thanks
    Amit

  • ABAP Program to delete the WDSO contents from active data table & Manage Re

    Hi,
    We have requirement where we have to delete the request id from manage screen and data from Active table of WDSO.
    I have gone through this weblink where we have to hardcode the DSO name in the table (Deletion of WDSO (Write-optimized DataStore object) Load requests and active table data without deleting it from targetSAPNetworkWeblogs%2528SAPNetworkWeblogs%2529)
    Apart from that is there any suggestions or input where i can have selection screen for DSO and execute that will help us to delete the Request IDs and content of active table from WDSO.
    Suggestions or input programs really appreciated.
    Kindly do the needful.
    Regrads,
    Prem
    Edited by: pannalde on Nov 22, 2011 8:24 AM

    Hi,
    http://help.sap.com/saphelp_nw04/helpdata/en/2d/677b3c513d3311e10000000a114084/content.htm
    With program RSSM_DELETE_WO_DSO_REQUESTS it is possible to delete old requests in the Write-Optimized DSO, exactly like we are used to do with PSA requests via a Process Chain.
    This program is available as of SAP NetWeaver BW 7.01 SP07. See note 1437407 for details.
    You can automate the deletion of old WO requests by using the ABAP program step in the Process Chain.
    Regards,
    rvc

  • How to get the decision key in abap program

    Hi guys.
    I have a user decision workflow that have two options: Accept or Reject. This options has some type of id, right? Like '0001', '0002', right?
    How i get this ids decisions through a abap program.
    I need to know this because i have to pass this id to a Z Function Model.
    Thanks!

    The result is found in the workitem container in the '_RESULT' or '_WI_RESULT' elements, you can use the SAP_WAPI_READ_CONTAINER function module to read the data (read the element from the simple container returned table).
    CALL FUNCTION 'SAP_WAPI_READ_CONTAINER'
      EXPORTING
        workitem_id                    = im_wi_id
      TABLES
        simple_container             = lt_container
    READ TABLE lt_container WITH KEY element = '_WI_RESULT' into ls_container.
    If you what to get the possible decisions description you can use the SAP_WAPI_DECISION_READ function module,
    CALL FUNCTION 'SAP_WAPI_DECISION_READ'
    EXPORTING
    workitem_id  = im_wi_id
    TABLES
    alternatives = lt_alts.

  • SAP HR ABAP programming

    Hi,
    Can anyone kindly help, by providing any links or sending me some learning material for HR-ABAP programming.
    Many thanks,
    Tomuri.

    Hi Experts,
    Please help me...
    I am new to SAP HR ABAP Programming.. Here I need to develop a Expenses claim form( ESS)
    I require a custom report to get the employee details in form and they can fill their travel expenses and other expenses manually in the form and that should be send to manager for approval.
    I don't know from which  Infotype I can get these details for the specific employee who are logged in to ESS, what are the Function Modules and which workflow process we can use for the approval ...Etc
    I am providing detail form below please give me some information about the report and workflow..
    Please someone help me to overcome this situation..
    Regards,
    Sudheer

  • Problem with the active version of the transfer rule ABAP program with sour

    Hi,
    I have a problem with the active version of the transfer rule ABAP program with source system EXCEL. 
    The system does not react to changes done in the transfer rule coding. For FISCPER I have hardcoded the result 'BABABA' and still the results delivered are those from the CSV.
    Resetting the system buffers does not help. The problem is systematic in combination with source system EXCEL (i.e. not only 1 InfoSource).  Checking the active program Extras->Display Program shows the coding (result='BABABA') being there, but
    as stated, the system does not produce the result BABABA, but instead the result of the CSV.
    It seems as if the original version from the very first activation of the transfer rule program remains somewhere and continues to be used.  Does anybody know how to flush it out and get the system to actually use the coding appearing as the active program.
    I have posted an OSS note, but SAP takes it time to answer and I am under time pressure so I figured that maybe one of you know who to solve it before SAP does.
    Greetings and thanks,
    Martin

    Hi martin,
    just try to go out the RSA1 and then return to your infopac. ...
    sometimes there some "cache" trouble

Maybe you are looking for

  • Predictive typing problem in ios 8.1.2

    I think predictive typing is not good after updating ios 8.1.3. What's happening ? I turned on and off again and again, but still the same. Why?

  • Painfully Slow

    This isn't just an InDesign issue, but I wasn't sure where to go, and since InDesign is my most used application I thought I'd start here. The same applies to my entire CS3 suite. I am running a new 21.5" iMac 3.06 GHz with 4GB memory on Snow Leopard

  • PP CC 2014 & Memory RAM - BUG?

    Hello Everyone I have some problems with PP CC 2014 that were not previously One. Problem of memory after a few hours the computer's memory jumps gradually to a maximum 16G Two. 'Auto Save' to Cloud does NOT work - I get a message that I need to inst

  • Flash CS5 file crashes upon opening

    Yesterday at work I was working on a CS5 flash file, and had no problems with it. Saved it, and today it crashes Flash CS5 whenever I open it. is there any way to recover the file? I do have backed up versions, but I'd be losing days of work if I wen

  • Waiving Lines, Please any suggestion??

    Hello , I have the following problem with the waiving lines across the screen when I dim the brightness. Now this is the second MACBOOK I swapped after the first one had the same problem, now this has the same problem again and the issue is that I go