Update Routine ... Help me Please--VERY URGENT

Hi All ,
I Moving data from Cube to ODS . Let me explain abt the records in the cube .
There are 6 key figures in the cube as well as dimensions, UNIQKEY TRANSACTION is One Dimension and ARTICLE is another dimension which is having an Navigational attribute called CORE ELEMENT.
I am showing the data with those two dimension and the key figures which are to be used in the routine.
Charc----
Key Figures
UNIQKEY-ARTICLE-Coreelement--
billqty     
in base unit
A00N----1006330--1--
10.5
A00M -
1006320----2--
2.5
A00P-----1006330--1--
10.5  
A00P-----1006320--2--
2.5
A00Q-----1006320--2--
2.5
A00Q-----1006340--3--
10.5
Now Lets see what the core element numbers mean,
core element 1 means -- fuel .
Core elemnet other 1 -- food .   
I need to move these data into ODS Which will have an extra field called No of items in the transaction --ITEMS.For this i need to write  a routine .
The Logic is ...
1.if Materail is of type 1(Means if the core element - 1)
I need to Populate the No of items in tnx = 1 .--ITEMS.
2.If Material is of type(Means if the core element)2or 3 I need to populate the billing quantity to the no of transcations.--ITEMS
3. If the Uniqkey tanscation contains two line items as  suppose that you have 20 litres of fuel and 2 cans of coke, then No of Items in the transaction should be 3 and Billing Quantity in BUoM 22
billing quantity in BUoM = 20 litres for the first line item and 2 for the second line item...
then as the first line item is fuel, field No OF Items in the Transcation should be 1 (replacing the 20) + 2 = 3
so the final result in the ODS should be billing quantity in BUoM = 22 and The Items in the Transcation= 3
So the ODS Data should look like this.
UNIQKEY--billqty--
ITEMS
in base unit 
A00N--10.5--
1
A00M--2.5--
2.5
A00P--13--
3.5
A00Q--13--
12.5  
NOTE : IN the ODS only the UNIQKEY IS THE KEY FIELD and the rest are DATA FIELDS.
I Posted this one before also. But didnt get proper responses.
I am Pasting the piece of code which I have written . This code will work for the first two records in the cube , But it is failing for the UNIQKEY Transcation having Line items.
PROGRAM UPDATE_ROUTINE.
$$ begin of global - insert your declaration only below this line  -
TABLES: /BI0/PMATERIAL.
DATA: TITEMS LIKE /BIC/AZPOCODS00-/BIC/ZTITEMS,
       CORE_ELEMENT like /BI0/PMATERIAL-RPA_WGH1.
$$ end of global - insert your declaration only before this line   -
FORM compute_data_field
  TABLES   MONITOR STRUCTURE RSMONITOR "user defined monitoring
  USING    COMM_STRUCTURE LIKE /BIC/CS8ZPOCTUS04
           RECORD_NO LIKE SY-TABIX
           RECORD_ALL LIKE SY-TABIX
           SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
  CHANGING RESULT LIKE /BIC/AZPOCODS00-/BIC/ZTITEMS
           RETURNCODE LIKE SY-SUBRC "Do not use!
           ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
$$ begin of routine - insert your code only below this line        -
fill the internal table "MONITOR", to make monitor entries
check not COMM_STRUCTURE-material is initial.
  select SINGLE RPA_WGH1
        INTO CORE_ELEMENT
        from /BI0/PMATERIAL
        where
        material = COMM_STRUCTURE-material
        and  OBJVERS <>'D'.
   IF CORE_ELEMENT EQ '1'.
   TITEMS = '1'.
     CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
       EXPORTING
         input         = titems
      IMPORTING
        OUTPUT        = titems
   ELSE.
   TITEMS = COMM_STRUCTURE-BILL_QTY.
   ENDIF.
result value of the routine
  RESULT = TITEMS..
if abort is not equal zero, the update process will be canceled
  ABORT = 0.
$$ end of routine - insert your code only before this line         -
PLease give me ideas on how to acheive this . As I am not Aware of ABAP very well.. PLease try to give me the code. I hope one of you may got the same requirement before.
Its very urgent and I need to deliver it today itself.
Thanks in advance , you can mail me to [email protected]. If anybody intersted to discuss this Issue they can reach at +91 9845922955.

Hi ,
While I am moving the data from cube to ods . I need to create the update rules with cube -- 8cube . WHen i am doing this the billqty is a key figure in cube so that is not a problem but the ITEMS is not there in the cube ,SO for that I need to write a routine to populate that one.
Its strange but the user what to analyse with the UNIQKEY transaction. And these objects will be added as navigational attributes to the Characteristic. as it acts as another dimension.
He wants to laod these from ODS to Master data -Characteristic.
to say for each transcation hpw many items are getting sold.
Message was edited by: Nagarjuna Reddy
ONce again thanks for the qucik replies
Message was edited by: Nagarjuna Reddy

Similar Messages

  • How can i get ios 7 in my ipad 2? i have tried to update it but in my setting general there is no icon for software update.so help me please!

    how can i get ios 7 in my ipad 2? i have tried to update it but in my setting>general there is no icon for software update.so help me please!

    If you are using iOS 4 (or earlier) there is no Software Update in Settings. That feature was first added in iOS 5.
    To update you will have to connect your iPad to iTunes on a computer (preferably the one you sync with and backup to).
    See here: http://support.apple.com/kb/HT4972

  • ITunes showing error 29 and not updating iOS help me please

    iphone 4s  showing apple symbol so i tried to connect to itunes .iTunestrying to update but later  showing error 29 and not updating iOS help me please.

    Read this - it should help
    http://support.apple.com/kb/TS5254?viewlocale=en_US

  • Pls Help...VERY URGENT

    Hi all,
    I am unable to get a certain output from the code I have written: Below is the code.
    public class project extends JApplet
         private JLabel promptLabel;
         private JTextField inputField,displayField;
         private JTextArea outputArea;
         public void init()
              Container container = getContentPane();
              String s1 = JOptionPane.showInputDialog("Enter a few alphabets");
              String.valueOf(s1);
              outputArea = new JTextArea();
              container.add(outputArea);
              outputArea.setText("The alphabets that you have entered are: "+s1);
    I am suppose to get the output below:
    The user will be prompted to enter a few alphabets.After the user clicks on 'OK' a java applet is suppose to popout with the alphabets the user has typed like in below. the user has to enter a message using the alphabets he gave(e.g abcd)
    please enter a message using the alphabets entered:___________
    a
    b
    c
    d
    I am unable to get the output.. I dunno how to go about getting the output above.. Another query, below is a Histogram class.
    class Histogram
         int frequency[];
         String alphabet;
         Histogram(String alphabet)
              this.alphabet=alphabet;
              frequency=new int[alphabet.length()];
         void scan(String message)
              for(int i=0;i<message.length;i++)
                   frequncy[alphabet.IndexOf(message.charAt(i))]++;
         void setfrequency(int frequency[])
              for(int i=0;i<alphabet.length;i++)
              this.frequency=frequency[i];
         double entropy()
              int total=0;
              double probablity;
              log2=Math.log(2.0);
              for(int i=0;i<alphabet.length;i++)
                   total+=freguency[i];
    If I want to get the frequency of each alphabet displayed in the applet, how do i go about implementing the setfrequency method in the java applet.. I hope some one can help me.. Pls it is very urgent.. Thanx

    Hi Thanx, your code helped. I have got another question. How do i implement a method from another method class into the applet. say, i want to implemen set frequency from the below code into my applet you wrote above?
    class Histogram
         int frequency[];
         String alphabet;
         Histogram(String alphabet)
              this.alphabet=alphabet;
              frequency=new int[alphabet.length()];
         void scan(String message)
              for(int i=0;i<message.length;i++)
                   frequncy[alphabet.IndexOf(message.charAt(i))]++;
         void setfrequency(int frequency[])
              for(int i=0;i<alphabet.length;i++)
              this.frequency=frequency[i];
         double entropy()
              int total=0;
              double probablity;
              log2=Math.log(2.0);
              for(int i=0;i<alphabet.length;i++)
                   total+=freguency[i];

  • Need help in Idoc--very urgent.

    Hi guys,
    i am working on an object where i need to post the data from legacy system to F-27 transaction using Idoc.i hv found two idocs input_idoc_fidcc1 and input_idoc_fidcc2 for posting the data..
    Can anyone help in finding the right idoc for triggering the f-27 transaction with the reason...
    coz both are perfoming almost the same functionalities...
    its very urgent guys..
    kindly help me full marks wud be given...
    regards
    Sahil

    Hi,
    The function module is related to post the idoc type FIDCPP01
    and posts the complete FI document. and as coming to second function module along with Tax you can post item wise with holding tax dataalso. So you choose the required function module based on the data you need to post. If you need not post with holding tax details dont fo for second function modules.
    Reward if find useful

  • PARSING HTML ELEMNETS IN XML FILE?,Help please very urgent

    I am getting the input in this form
    <ul>
    <li>Strategies</li>
    <li>Planning</li>
    <li>Value</li>
    <li>Total Investment</li>
    </ul>
    I want to convert it into below format so that ContentHandler parse the HTML tages.The HTML elements are dynamic,
    contentHandler.startElement("", "ul", "ul", attrs);
    contentHandler.startElement("", "li", "li", attrs);
    contentHandler.characters(value.toCharArray(), 0, value.length());
    contentHandler.startElement("", "li", "li", attrs);
    contentHandler.startElement("", "li", "li", attrs);
    contentHandler.characters(value.toCharArray(), 0, value.length());
    contentHandler.startElement("", "li", "li", attrs);
    contentHandler.startElement("", "li", "li", attrs);
    contentHandler.characters(value.toCharArray(), 0, value.length());
    contentHandler.startElement("", "li", "li", attrs);
    contentHandler.startElement("", "li", "li", attrs);
    contentHandler.characters(value.toCharArray(), 0, value.length());
    contentHandler.startElement("", "li", "li", attrs);
    contentHandler.endElement("", "ul", "ul");
    Is their any library through which we can convert HTML tags into ContentHandler elements.
    Thanks in Advance
    Thanks
    Lakhi

    Actually i am parsing XML file,but i have HTML elements inside XML elements:
    <section id='2'><header><line>Agenda( Slide2 )</line></header>
    <line>
    <h3>Agenda</h3>
    <ol>
    <li>Overview of ABC Company inc.</li>
    <li>Defining and Measuring Employee Engagement</li>
    <li>Foresight's Survey Methodology</li>
    <li>Online Tools</li>
    <li>Standard and Custom Reporting Capabilities</li>
    <li>Action Planning and Best Practices</li>
    </ol></line></section>
    And i am using Contenthandler interface to parse,
              attrs.addCDATAAttribute("id",""+i);
                   contentHandler.startElement("", "section", "section", attrs);
                   attrs.clear();
                   contentHandler.startElement("", "header", "header", attrs);
                   contentHandler.startElement("", "line", "line", attrs);
                   contentHandler.characters(key.toCharArray(), 0, key.length());
                   contentHandler.endElement("", "line", "line");
                   contentHandler.endElement("", "header", "header");
                   contentHandler.startElement("", "line", "line", attrs);
    /*HERE I need to Generate java instruction for HTML elements as i mailed before.for elements like <li>Overview of ABC Company inc.</li>
    <li>Defining and Measuring Employee Engagement</li>...................</ol>
                   contentHandler.characters(value.toCharArray(), 0, value.length());
                   contentHandler.endElement("", "line", "line");
                   contentHandler.endElement("", "section", "section");

  • Need to update table from Maintenance view (Very Urgent !!!)

    Hi Abap Guru's,
    I got a requirement where in I need to create a new Zprog so that it shld give  a call to view v_abc and thru this view I need to update the table abc if any duplicate entries are entered then I shld popup a message.
    Cld u plz help me out how to go further with this requirement and any suggestions...
    if we create a table maintenance generator for the table abc then it will check for the duplicate entries are not ? if it checks for the duplicate entries then my job is done esaily but how to assign the zt-code to the table maintenance ?
    awaiting for u r answer's and realyy appreciated with lots of points.
    Regards,
    Ravi V Ganji

    Hi,
       table generator will check duplicate entries as any
       other table .
        table maintanance Generator is used to manually
        input values using transaction sm30
        follow below steps
       1) go to se11 check table maintanance check box under
          attributes tab
       2) utilities-table maintanance Generator->
          create function group and assign it under
          function group input box.
          also assign authorization group default &NC& .
       3)
        select standard recording routine radio in table
        table mainitainence generator to move table
        contents to quality and production by assigning
        it to request.
       4) select maintaience type as single step.
       5) maintainence screen as system generated numbers
          this dialog box appears when you click on create
         button
        6) save and activate table
       using sm30 you can create entries manually.
    also check below thread to assign transaction code to
    table generator
    Re: Table Maintanance Generator  
    create transaction use se93
    select parameter transaction and give below attributes
      Transaction code      ZTX1                                                                               
    Transaction text      Maintain View ZSDCZTVIEW                                                                               
    Transaction        SM30            Screen             0           
                                              From module pool                                                                               
    Name of screen field           Value                                
       VIEWNAME                       ZSDCZTVIEW                           
       UPDATE                         X

  • BBM icon missing after update. need help asap please

    Hi I'm using a bb bold 9780 and my bbm is 5.0.1.45 and when I tried updating it, it hangs whenever it finishes installing. And when I tired a battery pull, my bbm icon goes missing. Any idea how to solve this issue? Could really need some help here cos its quite impt. Thank you in advance
    Solved!
    Go to Solution.

    When you get a chance, do a battery pull.  When the red light goes away on the front of the phone, hold down the back button the entire time while the phone is booting up.  When the boot is complete, the phone will enter safe mode.
    http://btsc.webapps.blackberry.com/btsc/search.do?cmd=displayKC&docType=kc&externalId=KB17877
    Try to delete it from there and do another battery pull / reinstall.
    Please click the Thumbs Up icon if this comment has helped you!
    If your issue is resolved, please click the solution button on the resolution!
    Every BlackBerry should have BlackBerry Protect, get it now! | Follow me on Twitter | Bring Back BBM Music!

  • Crashes when i try to update! Help me please!

    I have the fifth generation ipod. Ive been having this problem with itunes ever since i got 6.0 or whatever. I got 7.0 thinking they fixed the problem. I can open itunes by itself fine, but when i try to update my ipod it just crashes! I sent in the report thing and it says it has something to do with Quicktime. Please someone help me! I really want to start watching videos and uploading my photos again!

    could be configuration or date/time settings.  double check your date, time and time zone (if this is wrong you will not be able to access the Apple update server). also go through the 'blocked by configuration' section of Apple support article TS3297: http://support.apple.com/kb/TS3297?viewlocale=en_US

  • Update routine help

    Hi Frieds
    My requirement is
    1 have 6 internal tables taken.Lets say x-soldto x-shipto y-soldto y-shipto and z-soltdo z-shipto
    As per the design the logic is
    ase xbusline-/bic/MRKPARTNR.
          when 'SO'.  "Sold-to
            move DATA_PACK1-sold_to to xcustomer.
          when 'SH'.  "Ship-to
            move DATA_PACK1-ship_to to xcustomer.
          when others.  "Default is the sold-to
        endcase.
    The problem is when the condition is SO
       i need to use the data in x-soldtoy-soldto z-solto
    when condition is SH
       i need to use the data in x-shipto y-shipto z-shipto
    How can i dynamically change that internal table name .
    In the data packege loop i need to loop throough
    loop at ( Internal table should change based on condition we are checking above )where
              where fiscper    eq data_pack1-xfiscper
              and material     eq DATA_PACK1-material
              and sold_to      eq xcustomer.
    Please let me know how should i proceed.
    Regards
    vijay

    Hi Vijay,
    Your problem is a little bit difficult to understand... but I believe it's easy to solve.
    Why don't you just use an IF or CASE before your loop? That way you can write three different loops for each case (or two, because you only use sold-to, and ship-to otherwise.
    Maybe I'm not understanding the problem...
    Hope it helps,
    David.

  • Can someone competent help me? Very Urgent help Much Apreciated

    does anyone know what the
    java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]Optional feature not implemented
    error refers to? i cannot wee why i am getting this error when ever i run a SQL query through JDBC
    PLEASE HELP ME OR EVE IF YOU ARE UNSURE POST ME A SUGGESTION AND I WILL TY IT OUT
    thank you

    Can you post the code inside the try-catch block that is tossing this exception? Especially post the code containing whatever SQL statement is causing it, and tell us what kind of database it is hitting.

  • Inventory aging report,  plz help me its very urgent

    Hi experts,
    i have a problem in reporting, yesterday i got requirement form uesrs for Inventory Aging report,
    the report fields Contains
    1) Plant
    2) Meterial
    3) Stock as on date( closing stock) with both  fields Quantity & value fields
    4) Average Useage in 6 months  with both fields Quantity & Value
    5) Month on Hand in units
    6)Inventory Aging  30 days with Units and quantity
                               60 days with Units and quantity
                               90 days with Units and Quantity
                               120 days
                                150days
                                 180 days
                                  270 days
                                   365 + days
    we are using bw 3.5 version
    note:  we are u using standard Business Content Cube ( 0IC_C03)  with is coming fron standard Business content DataSources 2Lis_03_BX, 2Lis_03_BF, 2Lis_03_UM
    please suggest me to make this report, please send process in clearly.
    i will assign full points
    Advance thanks,
    Sudheer

    hello Sudheer,
    I remember once creating an Inventory aging document whcih had somwhat the same requirment of going back 6weeks and the other was like 18 weeks from the current week.Do you have cubes regarding the diffrent types of orders, like Planned order, Purchase order, production order and purchase requistion or a multi on top of it.If so then create  query on top of this multiprovider like Inventory aging 30days, inventory aging 60days etc.then  in that query create a variable on calweek (Single value,mandatory and customer exit), this variable should be able to get the current week (depending on when your table was loaded in R3 and if you can get that info thru rfc in BI), this is so that you can determine current week and then specify variable off set in diffrent queries with diffrent requirements of going back, ex: -4 (for 4 weeks ie 1 month) etc, or just create your variable on calmonth and then you need to set an offset just one month back ex -1.
    Create APDs and then load the data in transactional DSOs.Excecute the APD one at a time into the diffrent cubes .Create a multiprovider if you want on top of it.
    Hope this can get you started....
    Krrish

  • Please very urgent........

    hi i am new to ABAP.
    my requirement is :
    create a ALV report to display material number and sales order using tables MARA and VBAP
    using REUSE_ALV_GRID_DISPLAY.
    points will be rewarded.

    hi nani,
    try this code,this is for displaying billing document number and other relevant details.you can put your required fields and check for help.
    TABLES: vbrp,vbrk.
    Global data definitions
    DATA: ok_code LIKE sy-ucomm,
          it_tab TYPE TABLE OF zstruct1,
    Name of the custom control added to the screen
          g_container TYPE scrfname VALUE 'CUSTOM_SCREEN',
    ALV Grid instance reference
           grid TYPE REF TO cl_gui_alv_grid,
    Custom container instance referance
          g_custom_container TYPE REF TO cl_gui_custom_container.
    To display the billing document no and customer no at the selection screen.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE t001.
    SELECT-OPTIONS  s_vbeln FOR vbrk-vbeln OBLIGATORY.
    SELECT-OPTIONS s_kunrg FOR vbrk-kunrg OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK b1.
    Validating the entries in the selection screen.
    AT SELECTION-SCREEN.
      SELECT SINGLE vbeln FROM vbrk INTO vbrk WHERE vbeln IN s_vbeln.
      IF sy-subrc <> 0.
        MESSAGE e000.
      ENDIF.
      SELECT SINGLE kunrg FROM vbrk INTO vbrk WHERE kunrg IN s_kunrg.
      IF sy-subrc <> 0.
        MESSAGE e001.
      ENDIF.
    Start-Of-Selection Event
    START-OF-SELECTION.
      PERFORM fetch.
    END-OF-SELECTION.
      CALL SCREEN 100.
    *&      Module  STATUS_0100  OUTPUT
          text
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'STATUS100'.
    *SET TITLEBAR 'xxx'.
      PERFORM display_alv_billing.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE user_command_0100 INPUT.
      CASE ok_code.
        WHEN 'EXIT'(001).
          PERFORM exit.
        WHEN OTHERS.
          CALL SCREEN 100.
      ENDCASE.
      CLEAR ok_code.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Form  EXIT
          text
    -->  p1        text
    <--  p2        text
    FORM exit .
      LEAVE PROGRAM.
    ENDFORM.                    " EXIT
    *&      Form  fetch
          text
    -->  p1        text
    <--  p2        text
    FORM fetch .
      SELECT kvbeln kkunrg pposnr pfkimg p~matnr INTO CORRESPONDING FIELDS OF TABLE it_tab
      FROM vbrk AS k JOIN vbrp AS p ON kvbeln = pvbeln WHERE k~vbeln IN s_vbeln AND
                                                               k~kunrg IN s_kunrg.
    ENDFORM.                    " fetch
    *&      Form  DISPLAY_ALV_BILLING
          text
    -->  p1        text
    <--  p2        text
    FORM display_alv_billing .
      IF grid IS INITIAL .
    Creating custom container instance
        CREATE OBJECT g_custom_container
        EXPORTING
             container_name = g_container
        EXCEPTIONS
             cntl_error = 1
             cntl_system_error = 2
             create_error = 3
             lifetime_error = 4
             lifetime_dynpro_dynpro_link = 5
             OTHERS = 6 .
        IF sy-subrc <> 0.
    *--Exception handling
        ENDIF.
    *----Creating ALV Grid instance
        CREATE OBJECT grid
           EXPORTING
                i_parent = g_custom_container
           EXCEPTIONS
                error_cntl_create = 1
                error_cntl_init = 2
                error_cntl_link = 3
                error_dp_create = 4
                OTHERS = 5 .
        IF sy-subrc <> 0.
    *--Exception handling
        ENDIF.
    *----Here will be additional preparations
    *--e.g. initial sorting criteria, initial filtering criteria, excluding
    *--functions
        CALL METHOD grid->set_table_for_first_display
             EXPORTING
         I_BUFFER_ACTIVE =
         I_CONSISTENCY_CHECK =
               i_structure_name = 'ZSTRUCT1'
         IS_VARIANT =
         I_SAVE =
         I_DEFAULT = 'X'
              is_layout = g_layout
         IS_PRINT =
         IT_SPECIAL_GROUPS =
         IT_TOOLBAR_EXCLUDING =
         IT_HYPERLINK =
             CHANGING
                it_outtab        = it_tab
               it_fieldcatalog = g_fieldcat
          IT_SORT =
          IT_FILTER =
             EXCEPTIONS
                invalid_parameter_combination = 1
                program_error = 2
                too_many_lines = 3
                OTHERS = 4 .
        IF sy-subrc <> 0.
    *--Exception handling
        ENDIF.
      ELSE .
        CALL METHOD grid->refresh_table_display
      EXPORTING
         IS_STABLE =
         I_SOFT_REFRESH =
            EXCEPTIONS
               finished = 1
               OTHERS = 2 .
        IF sy-subrc <> 0.
    *--Exception handling
        ENDIF.
      ENDIF .
    ENDFORM.                    " DISPLAY_ALV_BILLING
    reward if helpful.
    regards,
    sravanthi

  • Need info on Staging Error Tables ( Please Very urgent)

    Hi Friends,
    I am new to ERP. I need Information on Staging Error Tables in ERP. Please Let me know if anybody have an idea on this.
    Thanks

    I am new to ERP. I need Information on Staging Error Tables in ERP. Please Let me know if anybody have an idea on this.https://forums.oracle.com/forums/search.jspa?threadID=&q=Staging+AND+Tables&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Thanks,
    Hussein

  • Smod object or not Please very urgent .. I want to find exits ..

    How can I distinguish smod user exits or others ?. I want to get only activable exits by catching smod linked or not .
    Edited by: carlos eduardo on Dec 17, 2007 10:34 AM

    *& Report ZMS_ACTIVE_EXITS
    *& This report displays all the active customer enhancements in the
    *& system and also displays whether they are active or implemented
    REPORT ZMS_ACTIVE_EXITS.
    Data decleration
    TYPES: BEGIN OF S_FUNCTION,
    FNAME LIKE MOD0-FUNCNAME,
    FTEXT LIKE TFTIT-STEXT,
    IMPL,
    ACTIVE,
    EXAMPLE,
    END OF S_FUNCTION.
    TYPES : BEGIN OF DISPLAY_STR,
    PROJECT TYPE MODACT-NAME,
    ENHANCEMENT TYPE MODACT-MEMBER,
    FM TYPE MODSAP-MEMBER,
    STATUS TYPE CHAR20,
    END OF DISPLAY_STR.
    DATA : LT_MEMBER TYPE TABLE OF MODACT-MEMBER,
    LS_MEMBER LIKE LINE OF LT_MEMBER,
    LT_FM TYPE TABLE OF MODSAP-MEMBER,
    LS_FM LIKE LINE OF LT_FM,
    LT_MODNAME TYPE TABLE OF MODACT-NAME,
    LS_MODNAME LIKE LINE OF LT_MODNAME,
    LT_DISPLAY TYPE TABLE OF DISPLAY_STR,
    LS_DISPLAY LIKE LINE OF LT_DISPLAY,
    LS_FUNCTION TYPE S_FUNCTION,
    FIELD1(30).
    START-OF-SELECTION.
    Select active customer enhancement.
      SELECT NAME FROM MODATTR INTO LS_MODNAME
      WHERE STATUS = 'A'.
        APPEND LS_MODNAME TO LT_MODNAME.
        CLEAR LS_MODNAME.
      ENDSELECT.
      IF LT_MODNAME IS INITIAL.
        WRITE / 'no active enhancements'.
      ENDIF.
    Determine the details about the customer enhancement.
      LOOP AT LT_MODNAME INTO LS_MODNAME.
        CLEAR : LS_DISPLAY.
        SELECT MEMBER FROM MODACT INTO LS_MEMBER WHERE NAME = LS_MODNAME.
          SELECT MEMBER FROM MODSAP INTO LS_FM WHERE NAME = LS_MEMBER AND TYP =
          'E'.
            LS_DISPLAY-PROJECT = LS_MODNAME.
            LS_DISPLAY-ENHANCEMENT = LS_MEMBER.
            LS_DISPLAY-FM = LS_FM.
            CLEAR : LS_FUNCTION.
            LS_FUNCTION-FNAME = LS_FM.
            PERFORM GET_IMPL_STATUS USING LS_FUNCTION.
            IF LS_FUNCTION-IMPL = 'X'.
              LS_DISPLAY-STATUS = 'Implemented'.
            ELSE.
              LS_DISPLAY-STATUS = 'Active'.
            ENDIF.
            APPEND LS_DISPLAY TO LT_DISPLAY.
          ENDSELECT.
        ENDSELECT.
      ENDLOOP.
    Displaying results
      FORMAT COLOR = 1.
      WRITE : 'Please double-click on the object for follow-on action'.
      NEW-LINE. ULINE.
    WRITE : 'Customer Project', AT 30 'SAP Enhancement',
    AT 60 'Exit Function Module', AT 100 'Active/Implemented'.
      ULINE.
      FORMAT COLOR = 0.
      LOOP AT LT_DISPLAY INTO LS_DISPLAY.
        NEW-LINE.
        WRITE : LS_DISPLAY-PROJECT, AT 30 LS_DISPLAY-ENHANCEMENT,
        AT 60  LS_FM,
        AT 100 LS_DISPLAY-STATUS.
      ENDLOOP.
    For calling transaction CMOD / SMOD / SE37.
    AT LINE-SELECTION.
      GET CURSOR FIELD FIELD1.
      CASE FIELD1.
        WHEN 'LS_DISPLAY-PROJECT'.
          SET PARAMETER ID 'MON_KUN' FIELD SY-LISEL(10).
          CALL TRANSACTION 'CMOD' AND SKIP FIRST SCREEN.
        WHEN 'LS_DISPLAY-ENHANCEMENT'.
          SET PARAMETER ID 'MON' FIELD SY-LISEL+29(10).
          CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.
        WHEN 'LS_DISPLAY-FM'.
          SET PARAMETER ID 'LIB' FIELD SY-LISEL+59(30).
          CALL TRANSACTION 'SE37' AND SKIP FIRST SCREEN.
        WHEN OTHERS.
          MESSAGE 'Click on the right place.' TYPE 'I'.
      ENDCASE.
    *& Form get_impl_status
    This FORM checks whether an EXIT FM is implemented or not
    FORM GET_IMPL_STATUS USING P_FUNCTION TYPE S_FUNCTION.
      DATA : L_MAND LIKE TFDIR-MAND,
      L_INCL_NAMES TYPE SMOD_NAMES OCCURS 1 WITH HEADER LINE.
      L_INCL_NAMES-ITYPE = 'C'.
      APPEND L_INCL_NAMES.
      CLEAR L_MAND.
      SELECT SINGLE MAND FROM TFDIR INTO L_MAND WHERE FUNCNAME =
      P_FUNCTION-FNAME.
      IF SY-SUBRC = 0 AND L_MAND(1) = 'C'.
        P_FUNCTION-ACTIVE = 'X'.
    l_status-active = c_true.
      ELSE.
        P_FUNCTION-ACTIVE = ' '.
    l_status-inactive = c_true.
      ENDIF.
      CALL FUNCTION 'MOD_FUNCTION_INCLUDE'
        EXPORTING
          FUNCNAME   = P_FUNCTION-FNAME
        TABLES
          INCL_NAMES = L_INCL_NAMES
        EXCEPTIONS
          OTHERS     = 4.
      IF SY-SUBRC = 0.
        LOOP AT L_INCL_NAMES.
          SELECT SINGLE NAME FROM TRDIR INTO L_INCL_NAMES-INAME
          WHERE NAME = L_INCL_NAMES-INAME.
          IF SY-SUBRC = 0.
            P_FUNCTION-IMPL = 'X'.
          ELSE.
            P_FUNCTION-IMPL = ' '.
          ENDIF.
        ENDLOOP.
      ENDIF.
    ENDFORM. "get_impl_status
    <b> check this code </b>
    reward if useful
    santhosh reddy

Maybe you are looking for

  • Re: LaserJet CP1025nw color unexpectedly quits

    hi, We got the same problems on 10.9.5 with the printer HP_Color_MFP_M476dn, but only with one Driver The bankstatements that is giving us problem are from TD-bank, when I download them and I try to print them. they are being send correctly to the pr

  • Account Requires a CO Object when DN PGI

    Dear all, I got an error message "Account 510102 requires an assignment to a CO Object" when DN Post Goods Issue. The material has a profit center assigned to it, and it was bought forward to SO, and also to the DN line. I know that this problem can

  • Same result that InDesign gives me, with Optimizer

    Hi, we produce finals high res PDF catalog for print, and then we must produce one at 150 dpi, medium res and put it online. When i redo my PDF 150 from InDesign, the size is 55 mb. If i try to Optimize my print PDF with the same settings than InDesi

  • How would multi Logical Table Source work?

    Hi All, I am facing a problem about multi Logical Table Source. Can I build a Business Model with a Logical Fact Table that have two Sources? Taking the below description as an example: Table Name Columns Description Fact TIMECD(2013Q101, which join

  • SCARED OF LOSING ALL MY MUSIC - PLEASE ADVISE!

    OK. Let's just begin with my admission that I'm really, REALLY stupid when it comes to I-Pod and I-tunes stuff. It's a miracle I ever got the thing to play. So - I have a desktop computer, PC, Windows XP Pro. I bought an I-pod. I put all my CDs on I-