Add one more field in MIGO

Dear Experts ,
I want to add one more I/o field at Invoice date tab in header and also want to change the name of this tab from invoice date to invoice detail.
Kindly suggest...
Thanks
Alok

Hi,
Use the badi "MB_MIGO_BADI".  See the sample code & BADI documentation for reference.
Regards
Vinod

Similar Messages

  • How to add one more field to an exist internal table

    hi abapers
    i am a very new abap programmer and just started learning it.
    i want to know How to add one more field to an exist internal table.
    lemme me put my question in a very simple way.
    i have a internal table having fields f1,f2,f3 and which also that internal also contains some data.
    now i want to add two more fields (mm & nn) to that internal table now.
    how can i do that.
    and i wanna know the websites names where i can find some brain teasing questions in abap programming.
    eagerly waiting for ur reply
    regards,
    Maqsood A Khan

    Hi, MAQSOOD.
    You can insert more fields in your internal table like this.
    refer this code snippet.
    DATA : BEGIN OF tbl_itab OCCURS 0.
            INCLUDE STRUCTURE zsdtc009.
    DATA :  vkorg   LIKE vbak-vkorg,  "inserted one
            vtweg   LIKE vbak-vtweg,  "inserted one
            vkbur   LIKE vbak-vkbur,  "inserted one
            vkgrp   LIKE vbak-vkgrp,  "inserted one
           END OF tbl_itab.
    you can also read the book "Teach yourself abap in 21 days"
    at http://cma.zdnet.com/book/abap/
    but that book is just about basic concept of abap and report program.
    it doesn't give a lecture for on-line program.
    you can get pdf version books(about abap, sap...things) from sap.
    http://help.sap.com/printdocu/core/Print46c/en/Data/htm/english.htm
    I wish I could help you.
    Regards
    Kyung Woo.

  • Infocube and ODS populated with DATA (need to add one more field?)

    Hi,
      If infocube and ODS have been populated with data for past 3 months. Then we need to add one more field to this cube. What is the impact? Please advise.
    The following is my understanding. Please correct me if I am wrong.
    1) Need to delete content of ODS and infocube.
    2) insert the new field at ODS and infocube.
    3) reload the data into ODS and infocube.
    Is there a way that the current data need not be deleted.
    Just add in this new field and only subsequent month, infocube will have this new field? Please advise what is the best approach without affecting existing data.

    Hi,
    Siggi is right. You dont need to delete the previously loaded data to CUBE or ODS. The only catch is that, your new field will be empty as far as history is concerned. But so long as you did map it to the datasource and the datasource is able to fill it up, then your new field will now have value for incoming DELTA Updates.
    Addition of a field is not that complicated compared to deletion of a field from CUBE or ODS.
    --Jkyle

  • QA: Designer's operation to Add one more Field to display in Query Result Web Part

    QUESTION ABOUT Query Result Web Part presentation +1 Field
    I'd be looking at a property of Web Part to look up Discussion Board through Query Result Web Part. Currently it displays 'Title' column of Discussion Board, and my caring requirement is presentation customization to hold double
    columns of 'Title'+'Updated Date'. How could I add one more field 'Updated Date' to display in addition to that preexisting 'Title' field?
    Any procedural steps to realize how to add Filed to display in Query Result Web Part?

    Hi Yoshihiro,
    As I understand, you want to add the field to display in Query Result Web Part in SharePoint 2013.
    Which web part does you use? Content query web part or search results web part?
    If you use search results web part, you could edit the discussion board result template and add the updated field in the template.
    You could go to Design Manager: Edit Display Templates (site setting-> look and feel->design manager->edit display template), download the Discussion Item.htm file, and edit the file. 
    After editing, upload the file.
    The articles below are about how to modify an existing Display Template in SharePoint 2013.
    http://www.learningsharepoint.com/2012/09/17/sharepoint-2013-the-new-display-templates-for-styling-your-content/
    http://blogs.technet.com/b/sharepoint_quick_reads/archive/2013/08/01/sharepoint-2013-customize-display-template-for-content-by-search-web-part-cswp-part-1.aspx
     If you use content query web part, you could edit the content query web part, in the Property Mappings section select the “Change the mapping of managed”, and add the “modifiedOWSDATE” (it means the last modified date) in the line, after
    that you could see the update date under the title.
    Best regards,
    Sara Fan
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to add one more field in Internal table

    Hi Experts
    i have declared an internal table
    DATA: lt_viqmel_iflos TYPE TABLE OF viqmel_iflos.
    viqmel_iflos is a Standared SAP Table,
    Now i want to add one more Text field in the internal table only, how to add in program. any one plz help.
    <REMOVED BY MODERATOR>
    Mohana
    Edited by: Alvaro Tejada Galindo on Feb 7, 2008 10:09 AM

    you can put this:
    types: begin of t_table_viqmel_iflos,
    include structure of viqmel_iflos,
    new_field type xxxx.
    types: end of viqmel_iflos.
    DATA: lt_viqmel_iflos TYPE TABLE OF t_table_viqmel_iflos.
    Luck.

  • Want to add one more field in the standard transation xk02 : screen exit

    Dear All ,
    I want to add one field in transation in Xk02 in withholding tax check box.
    run the transation xk02 and select check box Withholding tax and press enter after that you will get the screen having field
    WH Tax Country  in parellel to this i want one more field Country .
    Is there any screen exit available fot this or any other way to proceed .
    Please provide any solution .
    Regards
    Aryan

    use an iplicit enahnecemnt to call a function module in which you can call a screen popu up with the fields you want update them in the database and return back to the main program. If the the two exits available are not helpful to you.
    RFKRRANZ
    SAPMF02K.

  • How to add one more field in infotype and PA 30 screen

    Hi to all
    My requirement is to add a new field in infotype and that should be reflected in PA30 screen.
    Actually in my company one field require from which date the car allowance is started.
    For that one date field is require on PA30 screen ..
    Also suggest me which screen is suggestable for that. and also give me any othe way is possible.
    Thanks & Regards
    Anubhav

    Yes .. I added the field in the structure but that field is not reflecting in PA30 screen.
    please advice me .. what to do...
    Thanks..
    Anubhav

  • Need one more field in standard solman iview

    Hi All,
    I need to add one more field in my standard solman iview which gives only 4 fields and 1 radio button. I require 5 fields and one radio button.
    How can I add an additional field in standard iview?
    Is there any other solman iview which I can use?
    Please Advise.
    Thanks & Regards,

    Shreya,
    you should have system administrator role to work with par file.
    go to system administration -support-portal runtimeBrowse deployment-look for something com.sap.portalepsolman.par.bak and download it.
    you can import that into NWDS and start modifying the jsp files.
    When you import par files into NWDS jar file will be missing in the directory strucuture so you need to add it manually.once you do the changes deploy the par file from NWDS and upload it Portal using system administration-support-portal runtime-administration console-upload
    check these links for more info
    https://forums.sdn.sap.com/click.jspa?searchID=16632942&messageID=6128753
    https://forums.sdn.sap.com/click.jspa?searchID=16632942&messageID=6169428
    If any issue revert to me
    Thanks
    Bala Duvvuri

  • Need one more field in PO search help ..

    Hi,
    In ME22N, I try to search for a PO, press F4  and use the fields in the tab "Purchasing documents per collective number". Here I want to add one more field, i.e. document date. Existing input fields are ; Collective Number, Purch Org, Purch Doc.
    How to do this ?
    thnks

    Yes Alex. I verified all that and its perfect.
    But I found that when I tested MEKK_T from se12 (menu search help-> test) I was able to see the Document date !!!  This MEKK_T has my new Z_MEKKS search help, so that means my custom search help is working fine in test mode.
    So the assignments are as follows:
    EBELN has MEKK_C as the search help assigned.
    MEKK_C has MEKK_T in its included search help.
    MEKK_T has Z_MEKKS (my custom help) in included search helps list.
    What else could be wrong ?
    thnks

  • QA32 Tcode i want to one more field which is material Description .in our o

    In QA32 Tcode i want to one more field which is material Description .in our output . how to do it please guide .

    Only exit I am aware of is IWOC0004 / EXIT_SAPLIREP1_001 to change the layout, to add customer field, i dont know any exit/badi, so i suggest you copy the report, copy the structure QALS_D02 to a Z-structure, and complete the field catalog and fill the new field in the code of the copied report.
    You could append fields to the structure (QALS_D01 or D02) and use Enhancement method to adapt field catalog and filling new fields (in RQEEAL10 at END-OF-SELECTION or an adequate GET statement)
    Regards,
    Raymond

  • Need to add one extra field in to Purchase Order XSL-FO Template

    Hi All,
    I am working on Purchase order XSL-FO template. I need to Customize it. I want to add few more fields in XSL-FO template which are getting the values from database. May be these columns are not present in XML data file , which the printing purchase order concurrent program is using.
    Suggest me, what should i do?
    regards
    Ravi

    Hi Paul,
    I need to customise the standard PO XSL-FO template but my problem is, this xsl-fo template has to be used by the seeded Oracle rdf report for display purpose.
    As far as i know, the xsl-fo template for PO is called by a java conc program
    and the Printed PO report(portrait) program uses the normal rdf layout.
    I think the xml data structure/tags produced by the rdf is not similar to the one produced by the java conc program.So, the XSL-FO template can't use the rdf report for displaying.
    If you have any info on this please let me know.
    Thanks,
    Satrajit

  • How to add one more values in Search Criteria,

    Hi All,
    OAF page Search Criteria :
    Search By "name"only Available already have in the search criteria .we are need to add Description in search criteria .How to add one more filed “Description” in Search Criteria,
    Please Help Me
    Thanks
    Rajavel

    "Set the Search Allowed property to True for any LOV result items you want to present to the user as searchable values. These items are listed in the search poplist the user sees in the LOV window.
    At a minimum you must set the Search Allowed property to True for the the result table item corresponding to the LOV field on the base page.
    This is from the devguide, I suggest you read it once at least if you have started work on the framework.
    Tapash

  • Need one more field based on comparision of other fields

    Report Builder 6.0.8.11.3
    ORACLE Server Release 8.0.6.0.0
    Oracle Procedure Builder 6.0.8.11.0
    Oracle ORACLE PL/SQL V8.0.6.0.0 - Production
    Oracle CORE Version 4.0.6.0.0 - Production
    Oracle Tools Integration Services 6.0.8.10.2
    Oracle Tools Common Area 6.0.5.32.1
    Oracle Toolkit 2 for Windows 32-bit platforms 6.0.5.35.0
    Resource Object Store 6.0.5.0.1
    Oracle Help 6.0.5.35.0
    Oracle Sqlmgr 6.0.8.11.3
    Oracle Query Builder 6.0.7.0.0 - Production
    PL/SQL Editor (c) WinMain Software (www.winmain.com), v1.0 (Production)
    Oracle ZRC 6.0.8.11.3
    Oracle Express 6.0.8.3.5
    Oracle XML Parser     1.0.2.1.0     Production
    Oracle Virtual Graphics System 6.0.5.35.0
    Oracle Image 6.0.5.34.0
    Oracle Multimedia Widget 6.0.5.34.0
    Oracle Tools GUI Utilities 6.0.5.35.0
    Iam having report layout as below
    -- M_6
       -- M_10
          -- B_13
          -- F_94
       -- M_FOR_REP1
          -- R_SALESMAN
             -- M_39
                -- B_74
                -- F_113
             -- M_7
                -- B_33
                -- F_2
             -- M_CUSTOMER
                -- R_CUSTOMER
                   -- F_98
                   -- M_GNAME
                      -- R_5
                         -- M_12
                            -- F_41Above is my full layout of my report how it look like
    (B_33) Sales Men : F_2
    F_2 lists out the all the salesmen.(david, george .... so on)
    F_98 Lists out all the categories of products (Furniture , Automobiles .... so on)
    F_41 Lists out amount of particular category
    F_113 lists out the sum of F_41.
    Parameters that i pass is :
    From Date : 01-AUG-11
    To Date : 31-AUG-11
    Company Code : 110
    Orgn Name : Cytrex OU
    Sales Type :
    Salesmen From : DAVID FOO
    Salesmen To : DAVID FOO
    Customer From :
    Customer To :
    Year From Date : 01-JUN-11
    Year To Date : 31-AUG-11
    Report Detail : Yes
    And the output for my report is
    Item Type                      ProductFamily                  Quantity            Sales
    (MYR)
    Sales Men : DAVID FOO
    01FN
    01FN
    FNDM
    FNUM
    NEW CASA [BROWN (CS5839)]
    CELLINI LEATHER [BEIGE FL35A]
    CELLINI LEATHER [BLACK FL 10B]
    21,585.50i need one more field and the result should like to compare F_2, F-98, F_41
    For every salesman(F-2) there will be different category (F_98), i need to add the amount (F_41) for all the same category.
    like
    Customer :  David
             Sales men :     Thomas
    Furniture                100
    Automotives               50
    Textiles                  20
    Mobiles                   10
             Sales men :    Daniel
    Furniture                 30
    Textiles                  10
    Ship                      20
    Customer : George
             Sales men :      Thomas
    Furniture                 20
    Mobiles                   50
             Sales men :    Daniel
    Furniture                 10
    Mobiles                   20
    {code }
    result Salesmen : Thomas Daniel
    Furniture 120 40
    Automotives 50
    Textiles 20 10
    Mobiles 60 20
    Ship 20
    means all the based on the category for each salesman for different customers should be added.Please explain me how to place the extra field and write the logic for that. i am trying for this from past one month nobody is giving proper feedback, if you want to know anything more regarding this let me know i will provide you with the full fledge information.
    Edited by: user9093700 on Mar 12, 2012 1:08 AM

    your break is nt the better for this
    i think you can create a temporary table
    the fields salesman category and quantity
    insert and update for each record with a formula or create a new sql query and maybe use a matrix to show as you want

  • Adding one more field to the VL06O report

    Hi everybody
       When  u execute the TR code VL06O a screen will appear from that screen select list outbound deliveries and then provide some date and execute.
    The output will come having fields delivery,ship-to-party,name of ship-to-party like that 7 fields are there and now i want to see one more field called shipment number in the output along with the previuos 7 fields.
    what should i do it is a standard program?
    please guide me?

    Hello.
    See note 128150 to more details.
    There are user exists to add new fields (user fields).
    Regards.

  • Add one more column

    select
                    nvl(appr.APPROVER_NAME, org.APPROVER_NAME) as APPROVER_NAME,
                    nvl(appr.APPROVER, org.APPROVER) as APPROVER,
                    nvl(appr.APPROVER_TYPE, org.APPROVER_TYPE) as APPROVER_TYPE,
                    nvl(appr.ASSIGNED_DATE, org.ASSIGNED_DATE) as ASSIGNED_DATE,
                    nvl(appr.APPROVAL_DATE, '-') as APPROVAL_DATE,
                    nvl(appr.STATE, org.STATE) as STATE,
                                    org.SEQ as numberoftimesmodified,
                    nvl(appr.PROCESS, org.PROCESS) as PROCESS,
           -- appr.request_comment,
                    appr.seq2
                    from (
                        select a.seq,
                        b.usr_display_name as APPROVER_NAME,
                        b.usr_login as APPROVER,
                        'User' as APPROVER_TYPE,
                        '-' as ASSIGNED_DATE,
                        '-' as STATE,
                        a.seq as numberoftimesmodified,
                '-' as PROCESS
                        from(
                            SELECT 1 as seq, USR_UDF_MANAGER_LOGIN as GID, '' as approver_name, 'user' as approver_type FROM DEVT_OIM.USR WHERE USR_LOGIN =:BENEFICIARY_GID AND :APPLICATION = 'Oracle 11i On demand'
                            UNION
                            select rownum as seq, regexp_substr(:APPROVERPAYLOAD,'[^,]+', 1, level) as gid, '' as approver_name, 'user' as approver_type from dual
                            where :APPLICATION != 'Oracle 11i On demand'
                            connect by regexp_substr(:APPROVERPAYLOAD, '[^,]+', 1, level) is not null
                        ) a
                        inner join DEVT_OIM.usr b on a.gid = b.usr_login
                    ) org
                    left join(
                        select b.numberoftimesmodified as seq, rownum as seq2, a.*
                        from
                            select
                            LEAD(a.ASSIGNEES) OVER(ORDER BY a.numberoftimesmodified) as prev_gid,
                            LEAD(a.pushbacksequence) OVER(ORDER BY a.numberoftimesmodified) as prev_pushbacksequence,
                            a.ASSIGNEES as current_gid,
                            nvl(retrieveGidName(a.ASSIGNEES), '-') as APPROVER_NAME,
                            (DEVT_OIM.TOKNEW(REPLACE(a.ASSIGNEES, ',', ':'))) as APPROVER,
                            'User' as APPROVER_TYPE,
                            a.pushbacksequence,
                            TO_CHAR(a.assigneddate,'DD-Mon-YYYY HH:MI:SS AM') as ASSIGNED_DATE,
                            case when a.state = 'WITHDRAWN' then TO_CHAR(a.updateddate,'DD-Mon-YYYY HH:MI:SS AM') else TO_CHAR(d.updateddate,'DD-Mon-YYYY HH:MI:SS AM') end as APPROVAL_DATE,
                            a.numberoftimesmodified,
                            case when a.state = 'EXPIRED' then 'Expired' when a.approvalduration is null then 'Pending' when  a.outcome = 'REJECT' then 'Rejected' else 'Approved' end as PROCESS,
                            d.state as process2,
                            case when d.substate = 'REASSIGNED' then 'Reassigned' when d.state = 'INFO_REQUESTED' then 'Request Info' when a.state = 'EXPIRED' then 'Expired'
                                when  a.outcome = 'REJECT' then 'Rejected' when d.substate = 'INFO_SUBMITTED' then 'Submitted' when a.state = 'WITHDRAWN' then 'Withdrawn' when e.state is null then 'Pending' else 'Approved' end as state,
                            e.ASSIGNEES, d.substate
                            from DEVT_SOAINFRA.WFTASKHISTORY a
                            left join DEVT_SOAINFRA.WFTASKHISTORY d on d.IDENTIFICATIONKEY = a.IDENTIFICATIONKEY and d.numberoftimesmodified = (a.numberoftimesmodified+1)
                            left join DEVT_SOAINFRA.WFTASKHISTORY e on e.IDENTIFICATIONKEY = a.IDENTIFICATIONKEY and e.numberoftimesmodified = (a.numberoftimesmodified-1) and e.ASSIGNEES = a.ASSIGNEES
                            where a.IDENTIFICATIONKEY = :IDENTIFICATIONKEY and a.state is not null
                            order by a.numberoftimesmodified
                        ) a
                        inner join (select rownum as numberoftimesmodified, pushbacksequence from (select distinct pushbacksequence from DEVT_SOAINFRA.WFTASKHISTORY a where a.IDENTIFICATIONKEY = :IDENTIFICATIONKEY order by pushbacksequence)) b
                        on b.pushbacksequence = a.pushbacksequence
                        where a.prev_gid != a.current_gid or prev_gid is null
                        order by a.numberoftimesmodified
                    ) appr on org.seq = appr.seq
                union
                select
                    nvl(appr.APPROVER_NAME, org.APPROVER_NAME) as APPROVER_NAME,
                    nvl(appr.APPROVER, org.APPROVER) as APPROVER,
                    nvl(appr.APPROVER_TYPE, org.APPROVER_TYPE) as APPROVER_TYPE,
                    nvl(appr.ASSIGNED_DATE, '-') as ASSIGNED_DATE,
                    nvl(appr.APPROVAL_DATE, '-') as APPROVAL_DATE,
                    nvl(appr.STATE, '-') as STATE,
                                       999 as numberoftimesmodified,
                    nvl(appr.PROCESS, '-') as PROCESS,
                    999 as seq2
                    from(
                        select 999 as seq, '-' as APPROVER, ugp_name as APPROVER_NAME, 'group' as approver_type
                        from DEVT_OIM.UGP ugp
                        where  ugp_name in (
                        SELECT a.it_processor_group FROM ec_admin.ENTITLEMENT a
                            inner join ec_admin.application b on a.application_id = b.application_id
                            WHERE b.extra_field_2 = :APPLICATION
                            and a.module_name = :MODULE
                            and a.site_name = :SITE
                            and a.entitlement_name = DEVT_OIM.TOKNEW(:RESPONSIBILITY)
                            and b.auto_provisioning = 'FALSE')
                    ) org
                    left join(
                    select nvl(grp.APPROVER_NAME, usr.APPROVER_NAME) as APPROVER_NAME,
                    nvl(grp.APPROVER, usr.APPROVER) as APPROVER,
                    nvl(grp.APPROVER_TYPE, usr.APPROVER_TYPE) as APPROVER_TYPE,
                    TO_CHAR((select min(OSI_create) from DEVT_OIM.OSI where request_key = :IDENTIFICATIONKEY),'DD-Mon-YYYY HH:MI:SS AM') as ASSIGNED_DATE,
                    nvl(grp.APPROVAL_DATE, usr.APPROVAL_DATE) as APPROVAL_DATE,
                    'ASSIGNED' as STATE,
                    999 as numberoftimesmodified,
                    case when nvl(grp.APPROVAL_DATE, usr.APPROVAL_DATE) = '-' then 'Pending' else usr.ost_status end as PROCESS
                    from
                        select b.usr_display_name as APPROVER_NAME, b.usr_login as APPROVER,  'User' as APPROVER_TYPE,
                        TO_CHAR(a.OSI_create,'DD-Mon-YYYY HH:MI:SS AM') as APPROVAL_DATE, 'key' as tbl_key,
                        (select ost_status from DEVT_OIM.UPA_RESOURCE where UPA_RESOURCE_key in (
                                  select max(UPA_RESOURCE_key)
                                  from DEVT_OIM.UPA_RESOURCE a
                                  inner join DEVT_OIM.oiu b on a.oiu_key = b.oiu_key
                                  where b.request_key = :IDENTIFICATIONKEY )) as ost_status
                        from (
                          select osi_assigned_to_usr_key, OSI_create
                          from DEVT_OIM.OSI
                          where request_key = :IDENTIFICATIONKEY and osi_assigned_to_usr_key != 1
                          order by OSI_create desc
                        ) a
                        inner join DEVT_OIM.usr b on a.osi_assigned_to_usr_key = b.usr_key
                        where rownum between 0 and 1
                    ) usr
                    left join
                        select ugp.ugp_name as APPROVER_NAME, '-' as APPROVER, 'Group' as APPROVER_TYPE,
                        '-' as APPROVAL_DATE, 'key' as tbl_key
                        FROM DEVT_OIM.OTI itp
                        inner join DEVT_OIM.UGP ugp on ugp.ugp_key = itp.osi_assigned_to_ugp_key
                        where itp.request_key = :IDENTIFICATIONKEY
                        and :REQUEST_STATUS != 'Request Completed'
                    ) grp
                    on usr.tbl_key = grp.tbl_key
                    order by numberoftimesmodified
                    ) appr on 1=1
                order by numberoftimesmodified, seq2
                   Above is the script and i need to add one more column for the script column name request_comment from the table request_comments, anyone help me in doing so.

    /* Formatted on 2012/06/14 13:19 (Formatter Plus v4.8.8) */
    SELECT X.*, request_comments.request_comment
    FROM(
    SELECT   NVL (appr.approver_name, org.approver_name) AS approver_name, NVL (appr.approver, org.approver) AS approver,
             NVL (appr.approver_type, org.approver_type) AS approver_type, NVL (appr.assigned_date, org.assigned_date) AS assigned_date,
             NVL (appr.approval_date, '-') AS approval_date, NVL (appr.state, org.state) AS state, org.seq AS numberoftimesmodified,
             NVL (appr.process, org.process) AS process,
                                                        -- appr.request_comment,
                                                        appr.seq2
        FROM (SELECT a.seq, b.usr_display_name AS approver_name, b.usr_login AS approver, 'User' AS approver_type, '-' AS assigned_date,
                     '-' AS state, a.seq AS numberoftimesmodified, '-' AS process
                FROM (SELECT 1 AS seq, usr_udf_manager_login AS gid, '' AS approver_name, 'user' AS approver_type
                        FROM devt_oim.usr
                       WHERE usr_login = :beneficiary_gid AND :application = 'Oracle 11i On demand'
                      UNION
                      SELECT     ROWNUM AS seq, REGEXP_SUBSTR (:approverpayload, '[^,]+', 1, LEVEL) AS gid, '' AS approver_name,
                                 'user' AS approver_type
                            FROM DUAL
                           WHERE :application != 'Oracle 11i On demand'
                      CONNECT BY REGEXP_SUBSTR (:approverpayload, '[^,]+', 1, LEVEL) IS NOT NULL) a
                     INNER JOIN
                     devt_oim.usr b ON a.gid = b.usr_login
                     ) org
             LEFT JOIN
             (SELECT   b.numberoftimesmodified AS seq, ROWNUM AS seq2, a.*
                  FROM (SELECT   LEAD (a.assignees) OVER (ORDER BY a.numberoftimesmodified) AS prev_gid,
                                 LEAD (a.pushbacksequence) OVER (ORDER BY a.numberoftimesmodified) AS prev_pushbacksequence,
                                 a.assignees AS current_gid, NVL (retrievegidname (a.assignees), '-') AS approver_name,
                                 (devt_oim.toknew (REPLACE (a.assignees, ',', ':'))) AS approver, 'User' AS approver_type,
                                 a.pushbacksequence, TO_CHAR (a.assigneddate, 'DD-Mon-YYYY HH:MI:SS AM') AS assigned_date,
                                 CASE
                                   WHEN a.state = 'WITHDRAWN'
                                     THEN TO_CHAR (a.updateddate, 'DD-Mon-YYYY HH:MI:SS AM')
                                   ELSE TO_CHAR (d.updateddate, 'DD-Mon-YYYY HH:MI:SS AM')
                                 END AS approval_date,
                                 a.numberoftimesmodified,
                                 CASE
                                   WHEN a.state = 'EXPIRED'
                                     THEN 'Expired'
                                   WHEN a.approvalduration IS NULL
                                     THEN 'Pending'
                                   WHEN a.outcome = 'REJECT'
                                     THEN 'Rejected'
                                   ELSE 'Approved'
                                 END AS process,
                                 d.state AS process2,
                                 CASE
                                   WHEN d.substate = 'REASSIGNED'
                                     THEN 'Reassigned'
                                   WHEN d.state = 'INFO_REQUESTED'
                                     THEN 'Request Info'
                                   WHEN a.state = 'EXPIRED'
                                     THEN 'Expired'
                                   WHEN a.outcome = 'REJECT'
                                     THEN 'Rejected'
                                   WHEN d.substate = 'INFO_SUBMITTED'
                                     THEN 'Submitted'
                                   WHEN a.state = 'WITHDRAWN'
                                     THEN 'Withdrawn'
                                   WHEN e.state IS NULL
                                     THEN 'Pending'
                                   ELSE 'Approved'
                                 END AS state,
                                 e.assignees, d.substate
                            FROM devt_soainfra.wftaskhistory a LEFT JOIN devt_soainfra.wftaskhistory d
                                 ON d.identificationkey = a.identificationkey AND d.numberoftimesmodified = (a.numberoftimesmodified + 1)
                                 LEFT JOIN devt_soainfra.wftaskhistory e
                                 ON e.identificationkey = a.identificationkey
                               AND e.numberoftimesmodified = (a.numberoftimesmodified - 1)
                               AND e.assignees = a.assignees
                           WHERE a.identificationkey = :identificationkey AND a.state IS NOT NULL
                        ORDER BY a.numberoftimesmodified) a
                       INNER JOIN
                       (SELECT ROWNUM AS numberoftimesmodified, pushbacksequence
                          FROM (SELECT DISTINCT pushbacksequence
                                           FROM devt_soainfra.wftaskhistory a
                                          WHERE a.identificationkey = :identificationkey
                                       ORDER BY pushbacksequence)) b ON b.pushbacksequence = a.pushbacksequence
                 WHERE a.prev_gid != a.current_gid OR prev_gid IS NULL
              ORDER BY a.numberoftimesmodified) appr ON org.seq = appr.seq
    UNION
    SELECT   NVL (appr.approver_name, org.approver_name) AS approver_name, NVL (appr.approver, org.approver) AS approver,
             NVL (appr.approver_type, org.approver_type) AS approver_type, NVL (appr.assigned_date, '-') AS assigned_date,
             NVL (appr.approval_date, '-') AS approval_date, NVL (appr.state, '-') AS state, 999 AS numberoftimesmodified,
             NVL (appr.process, '-') AS process, 999 AS seq2
        FROM (SELECT 999 AS seq, '-' AS approver, ugp_name AS approver_name, 'group' AS approver_type
                FROM devt_oim.ugp ugp
               WHERE ugp_name IN (
                       SELECT a.it_processor_group
                         FROM ec_admin.entitlement a INNER JOIN ec_admin.application b ON a.application_id = b.application_id
                        WHERE b.extra_field_2 = :application
                          AND a.module_name = :module
                          AND a.site_name = :site
                          AND a.entitlement_name = devt_oim.toknew (:responsibility)
                          AND b.auto_provisioning = 'FALSE')) org
             LEFT JOIN
             (SELECT   NVL (grp.approver_name, usr.approver_name) AS approver_name, NVL (grp.approver, usr.approver) AS approver,
                       NVL (grp.approver_type, usr.approver_type) AS approver_type,
                       TO_CHAR ((SELECT MIN (osi_create)
                                   FROM devt_oim.osi
                                  WHERE request_key = :identificationkey), 'DD-Mon-YYYY HH:MI:SS AM') AS assigned_date,
                       NVL (grp.approval_date, usr.approval_date) AS approval_date, 'ASSIGNED' AS state, 999 AS numberoftimesmodified,
                       CASE
                         WHEN NVL (grp.approval_date, usr.approval_date) = '-'
                           THEN 'Pending'
                         ELSE usr.ost_status
                       END AS process
                  FROM (SELECT b.usr_display_name AS approver_name, b.usr_login AS approver, 'User' AS approver_type,
                               TO_CHAR (a.osi_create, 'DD-Mon-YYYY HH:MI:SS AM') AS approval_date, 'key' AS tbl_key,
                               (SELECT ost_status
                                  FROM devt_oim.upa_resource
                                 WHERE upa_resource_key IN (SELECT MAX (upa_resource_key)
                                                              FROM devt_oim.upa_resource a INNER JOIN devt_oim.oiu b
                                                                   ON a.oiu_key = b.oiu_key
                                                             WHERE b.request_key = :identificationkey)) AS ost_status
                          FROM (SELECT   osi_assigned_to_usr_key, osi_create
                                    FROM devt_oim.osi
                                   WHERE request_key = :identificationkey AND osi_assigned_to_usr_key != 1
                                ORDER BY osi_create DESC) a
                               INNER JOIN
                               devt_oim.usr b ON a.osi_assigned_to_usr_key = b.usr_key
                         WHERE ROWNUM BETWEEN 0 AND 1) usr
                       LEFT JOIN
                       (SELECT ugp.ugp_name AS approver_name, '-' AS approver, 'Group' AS approver_type, '-' AS approval_date,
                               'key' AS tbl_key
                          FROM devt_oim.oti itp INNER JOIN devt_oim.ugp ugp ON ugp.ugp_key = itp.osi_assigned_to_ugp_key
                         WHERE itp.request_key = :identificationkey AND :request_status != 'Request Completed') grp
                       ON usr.tbl_key = grp.tbl_key
              ORDER BY numberoftimesmodified) appr ON 1 = 1
    ORDER BY numberoftimesmodified, seq2
    ) X, request_comments
    WHERE...

Maybe you are looking for