PE04 - Custom Function - Create Record

Hello Experts,
Pls provide some insights or links on how to create a custom function to populate an IT2001 record in schema.
Thanks
Moderator message: please do more research before asking, show what you have done yourself when asking.
Edited by: Thomas Zloch on Nov 1, 2011 10:40 AM

No idea on how to set.
But in our case, we have a requirement for calculation of GOSI for our Bahrani Employees. Hence did the same using by creating a FUNCTION ZGOSI.
We have not given any input or output parameters.
Used a Z program for payroll driver RPCALCX0 -- ZSH_GOSI_CALC and the calculations are taken from this program and output is displayed in the RT table- Wage types.
For more information, check with functions of infotype like P0014, P0015, you will get some idea on the same.
Before giving the above, need to mention the parameter list for control.
Mostly the input parameters are given as Objects like in our Payroll Process, there is WPBP table and output parameters the results to be displayed using object RT.
Analyze more on the same and you will come to know.
Good luck.
Regards
Team Member.

Similar Messages

  • How to create a custom function module with the records in SAP R/3?

    Hi All,
    How to create a custom function module with the records in SAP R/3? Using RFC Adapter I have to fetch the custom function module records.
    Regards
    Sara

    Hi
    goto se37...here u need to create a function group... then u need to create a function module. inside assign import/export parameters. assign tables/exceptions. activate the same. now write ur code within the function module
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db98fc35c111d1829f0000e829fbfe/content.htm
    Look at the below SAP HELP links, These links will show you the way to create a Function Module
    http://help.sap.com/saphelp_nw04/helpdata/en/26/64f623fa8911d386e70000e82011b8/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db98fc35c111d1829f0000e829fbfe/content.htm

  • Custom Function Help

    Post Author: edy80y
    CA Forum: Formula
    I have a report with many subreports which all contain the same formula to group teams.When a new team is added i need to update all instances of the formula so they are all up to date.I know of Custom Function so i created one out of the formula in the main report.  The problem im finding is that im unable to use that custom function in the sub reports.Am i wring in thinking that a custom function created in a main report can be used in its sub reports??Am i creating the custom function incorrectly? Heres what i have done:
    Our database has team names that have a prefix of the State they are in such as: Perth - Team Orange Perth - Team Apple Sydney - Team Grape Sydney - Team Pineapple
    At one stage the Teams in Perth had been split into Perth1 and Perth2 resulting in the following records in the database:
    Perth1 - Team Orange Perth - Team Orange
    Because of this i have created a formula that groups teams into sites:
    select Trimleft(mid({team.name},instr({team.name},'-')+1))case 'Team Orange', 'Team Apple': 'Perth'case 'Team Grape', 'Team Pineapple': 'Sydney'default:''
    I use this formula in all reports and subreports and i link by them as well, so if a new team is created (for example Perth - Team Pear) i need toupdate all instances of the formula by adding 'Team Pear' to the Perth case.
    To fix the problem i created a custom function (called 'site') out of the formula above and it created this:
    Funtion (stringvar v1)select Trimleft(mid(v1,instr(v1,'-')+1))case 'Team Orange', 'Team Apple': 'Perth'case 'Team Grape', 'Team Pineapple': 'Sydney'default:''
    Now within that main report i am able to go to the formula editor and when i type site() then wording becomes blue but when i go into a sub report to do the same it doesnt react.
    I hope i have explained my self well enough for you to understand my predicament without boring you.
    Thanks in advance for your help!

    Post Author: edy80y
    CA Forum: Formula
    Hi,
    Thanks for the reply.  Unfortunately it does make things easy for me.  If i add the custom function in the subreport then i will have to updae that as well whenever a new team is created.  I'm looking for a solution where i only have to update the custom function in the main report only and not in the 7 or 8 subreports within it.
    Unless i am doing something wrong.  I basically copied the contecnt of the Custom Function in the main report and then went into the sub report and created a new Custom Function and pasted the code in it.
    Regards,
    Eddie S

  • Create a Time Management Custom Function in PE04

    Hi Experts
                  Pls give the steps to create a custom function in Time Management using PE04,
    whta is purpose of using infotype in PE04 , what are the input parametr and output paramaete . What are the intrnal table available in custom function . How we can test the custom function .
    Thansk and regards
    Renjith MP

    No idea on how to set.
    But in our case, we have a requirement for calculation of GOSI for our Bahrani Employees. Hence did the same using by creating a FUNCTION ZGOSI.
    We have not given any input or output parameters.
    Used a Z program for payroll driver RPCALCX0 -- ZSH_GOSI_CALC and the calculations are taken from this program and output is displayed in the RT table- Wage types.
    For more information, check with functions of infotype like P0014, P0015, you will get some idea on the same.
    Before giving the above, need to mention the parameter list for control.
    Mostly the input parameters are given as Objects like in our Payroll Process, there is WPBP table and output parameters the results to be displayed using object RT.
    Analyze more on the same and you will come to know.
    Good luck.
    Regards
    Team Member.

  • Create Customer-Master Info record (VD51).

    Hi All,
    Have a requirement in which I need to create a customer-Master Info record (VD51). Want a suggestion, what is the best way to create a customer-Master Info record via program.
    Is there a BAPI or a FM which create a customer-Master Info record?
    Thanks in advance.
    Kind Regards,
    Abhi...

    Hi,
    here below a sample code for doing that
    REPORT Z_knmt.
    tables : knmt.
    data : begin of it_data occurs 0,
    kunnr like knmt-kunnr,
    vkorg like knmt-vkorg,
    vtweg like knmt-vtweg,
    matnr like knmt-matnr,
    kdmat like knmt-kdmat,
    end of it_data.
    data : begin of st_data,
    kunnr like knmt-kunnr,
    vkorg like knmt-vkorg,
    vtweg like knmt-vtweg,
    matnr like knmt-matnr,
    kdmat like knmt-kdmat,
    end of st_data.
    parameters p_file like RFPDO1-FEBAUSZF.
    selection-screen skip.
    parameters : p_group(12) default 'BATCH_VD51' obligatory.
    data w_lines type i.
    data : w_kunnr(10) type n.
    include Z_IN_BATCH_INPUT.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_FILE.
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
           EXPORTING
                MASK      = ',,.txt'
                STATIC    = 'X'
           CHANGING
                FILE_NAME = p_file.
    start-of-selection.
      CALL FUNCTION 'UPLOAD'
           EXPORTING
                FILENAME                = p_file
                FILETYPE                = 'DAT'
           TABLES
                DATA_TAB                = it_data
           EXCEPTIONS
                CONVERSION_ERROR        = 1
                INVALID_TABLE_WIDTH     = 2
                INVALID_TYPE            = 3
                NO_BATCH                = 4
                UNKNOWN_ERROR           = 5
                GUI_REFUSE_FILETRANSFER = 6
                OTHERS                  = 7.
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      sort it_data.
      loop at it_data.
        w_kunnr = it_data-kunnr.
        it_data-kunnr = w_kunnr.
        select single * from knmt where vkorg = it_data-vkorg
                                    and vtweg = it_data-vtweg
                                    and kunnr = it_data-kunnr
                                    and matnr = it_data-matnr.
        if sy-subrc = 0.
          delete it_data.
        endif.
      endloop.
      describe table it_data lines w_lines.
      if w_lines is initial.
        stop.
      endif.
      perform open_group using p_group.
      loop at it_data.
        st_data = it_data.
        condense st_data-kdmat no-gaps.
        at new vtweg.
          perform dynpro USING : 'X' 'SAPMV10A' '0100' ,
                                 ' ' 'BDC_OKCODE' '/00' ,
                                 ' ' 'MV10A-KUNNR' st_data-kunnr,
                                 ' ' 'MV10A-VKORG' st_data-vkorg,
                                 ' ' 'MV10A-VTWEG' st_data-vtweg.
          perform dynpro USING : 'X' 'SAPMV10A' '0200' ,
                                 ' ' 'BDC_OKCODE' '/00' ,
                                 ' ' 'MV10A-MATNR(01)' st_data-matnr,
                                 ' ' 'MV10A-KDMAT(01)' st_data-kdmat.
          perform dynpro USING : 'X' 'SAPMV10A' '0200' ,
                                 ' ' 'BDC_CURSOR' 'MV10A-MATNR(01)',
                                 ' ' 'BDC_OKCODE' '/00' .
          continue.
        endat.
        perform dynpro USING : 'X' 'SAPMV10A' '0200' ,
                               ' ' 'BDC_OKCODE' '/00' ,
                               ' ' 'MV10A-MATNR(02)' st_data-matnr,
                               ' ' 'MV10A-KDMAT(02)' st_data-kdmat.
        perform dynpro USING : 'X' 'SAPMV10A' '0200' ,
                               ' ' 'BDC_CURSOR' 'MV10A-MATNR(01)',
                               ' ' 'BDC_OKCODE' '/00' .
        at end of vtweg.
          perform dynpro USING : 'X' 'SAPMV10A' '0200' ,
                                 ' ' 'BDC_OKCODE' '=SICH'.
          perFORM insert USING 'VD51'.
        endat.
      endloop.
      perform close_group.
    end-of-selection.
    ***INCLUDE Z_IN_BATCH_INPUT .
    DATA : ti_bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE.
    *&      Form  OPEN_GROUP                                               *
    *& group -> Folder name                                                *
    FORM open_group USING group.
      FREE ti_bdcdata.
      CLEAR ti_bdcdata.
      CALL FUNCTION 'BDC_OPEN_GROUP'
           EXPORTING
                client              = sy-mandt
                group               = group
                keep                = ' '
                user                = sy-uname
           EXCEPTIONS
                client_invalid      = 1
                destination_invalid = 2
                group_invalid       = 3
                group_is_locked     = 4
                holddate_invalid    = 5
                internal_error      = 6
                queue_error         = 7
                running             = 8
                system_lock_error   = 9
                user_invalid        = 10
                OTHERS              = 11.
    ENDFORM.
          FORM close_group                                              *
    FORM close_group.
      CALL FUNCTION 'BDC_CLOSE_GROUP'
    EXCEPTIONS
      NOT_OPEN          = 1
      QUEUE_ERROR       = 2
      OTHERS            = 3
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.
    *&      Form  DYNPRO                                                   *
    *& dynbegin -> Parameters for screen begin ( 'X' ) or not ( ' ' )      *
    *& name     -> Field or Screen name to treat                           *
    *& value    -> Field value or screen number                            *
    FORM dynpro USING  dynbegin name value.
      CLEAR ti_bdcdata.
      ti_bdcdata-dynbegin = dynbegin.
      CASE dynbegin.
        WHEN 'X'.
          ti_bdcdata-program = name.
          ti_bdcdata-dynpro = value.
        WHEN OTHERS.
          ti_bdcdata-fnam = name.
          ti_bdcdata-fval = value.
      ENDCASE.
      APPEND ti_bdcdata.
      CLEAR ti_bdcdata.
    ENDFORM.                               " DYNPRO
    *&      Form  INSERT                                                   *
    *& t_code : transaction code                                           *
    FORM insert USING t_code.
      CALL FUNCTION 'BDC_INSERT'
           EXPORTING
                tcode            = t_code
           TABLES
                dynprotab        = ti_bdcdata
           EXCEPTIONS
                internal_error   = 1
                not_open         = 2
                queue_error      = 3
                tcode_invalid    = 4
                printing_invalid = 5
                posting_invalid  = 6
                OTHERS           = 7.
      CHECK sy-subrc EQ 0.
      FREE ti_bdcdata.
      CLEAR ti_bdcdata.
    ENDFORM.                               " INSERT

  • Custom functions and operation - PE04

    Hi,
    I required a solution for my scenario.
    I have two absence quota type QA1 and QA2,  if a employee has the basic pay less than 8000 then he will get assigned with QA1 and if a employee has a basic pay is equal to or greater than 8000 then he get assigned to QA2.
    Similarly leave carry forward, QA1 employee has 120 days and QA2 has 240days.
    I am using RPTIME00 to generate my Quota QA1 and QA2.
    I need to create a custom functions and operation(PE04) for my requirement, can u help me for the same

    Sughy,
    If for some reason, you cannot do what Antoine suggested here's another idea.
    Is your basic salary based on a pay scale structure? If it is may be you can query the pay scale group and level by using OUTWPxxxx opertation (TRFAR, TRFGB, TRFGR, TRFST). However you have to first configure generation rules for the quota buckets correctly esp for the base entitlement to be a day balance time type. Then you can write a PCR to add this time type during time evaluation by looking up the values in pay scale structure of individual employees.
    There are probably several other ways to group these employees together like having the same additional time ID indicator in 0007 or having a different Daily DWS class indicator etc. The concept is to have a unique identifier if a simple grouping as mentioned by Antoine is not possible. You can seperate them and write your own PCR for both accruals as well as limiting the carry forward balances.
    Hope this helps.
    Good Luck.
    Regards,
    Raj.

  • Cr XIR1 to create a custom function to change the timestamp of a field

    Post Author: palm
    CA Forum: Crystal Reports
    Hi,
    I am trying to create a custom function to change the timezone of a field in the report depending on the timezone selected by the user in the prompt
    I wrote a SQL Expression to do this , but i ended up creating a bunch of expressions for each time zone ,
    So i am thinking of custom fuction some thing like
    TimeZoneConvertor:
    Fuction(TimeStampField ,  Timezone)
    Returns: Timestamp field with newtimezone as selected by user
    Hope you get this and please give me some kind of ideas to acheive this
    Thanks in Advance!!!!!!!!

    Hi
    goto se37...here u need to create a function group... then u need to create a function module. inside assign import/export parameters. assign tables/exceptions. activate the same. now write ur code within the function module
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db98fc35c111d1829f0000e829fbfe/content.htm
    Look at the below SAP HELP links, These links will show you the way to create a Function Module
    http://help.sap.com/saphelp_nw04/helpdata/en/26/64f623fa8911d386e70000e82011b8/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db98fc35c111d1829f0000e829fbfe/content.htm

  • Can't use function in creating record group

    Gurus,
    This question is for developers. Is this true one can't use
    function in creating record group. I am using form5.
    thanks,
    ZW

    I figured out the issue... they changed the way Group Calls are limited.
    Here's a full explaination - and a suggestion for a behavior fix: http://community.skype.com/t5/Windows-desktop-client/Please-Fix-Group-Video-Voice-Calling-Limit-Beha...
    Long story short, you can't do a video calling at all if the group has more than 10 people in it total (including you).
    Also, you can't do voice calling in groups with more than 25 people.
    Text chats are limited to 300 people (or so I've been told by Skype employees). I've been in a chat with over 100 participants though so I know it goes that high at least.

  • BAPI function create Customer master(T-code XD01)??

    Hi All,
    i want to create BDC program using BAPI function create Customer master(upload  customer master),but i do not know which BAPI function for create Customer master.
    Does anyone know,please tell me which BAPI function i can use?
    Thanks.
    Van Dung

    Hi Amit Gujargoud,
    I can use LSMW  upload the data from legacy system to sap system., but my manager he did not want to use LSMW.He wants to use BAPI function for upload customer master.
    I saw this BAPI function create customer master : BAPI_CUSTOMER_CREATEFROMDATA1,
    BAPI_CUSTOMER_CREATEFROMDATA,
    it is not enough field for input data.
    example : if i want input : customer code,company code, Sales organiration,Distribution channel,Division.
    So This BAPI function have not paramaters input this field.
    Thanks for your answer
    Van Dung.

  • Custom function to return Record Selection Criteria

    <p>Here&#39;s what I need to do. There will be two prompts for range of dates; say, Begin date and End Date on almost all of the reports here. But it is not mandatory to enter Begin Date nor end date. So depending on the data the user enters we have to build the where clause.</p><p>So, to achive this I am trying to write a custom function which accepts the column name , and data from the parameters in the report. </p><p>my_func(col_nme, bgn_date, end_date) .. </p><p>This function does all the validations and returns a string depending on the data entered by the user. </p><p> Eg., if user entered only begin date then it will return col_nme <= bgn_date<br />      if user entered both dates then col_nme between bgn_date and end_date</p><p> And I am trying to user this complete clause in my record selection of the report. </p><p>In Record Selection call my_func({Query.Eff_date},p_bgn_date,p_end_date) </p><p>It is not accepting it since the function returns it as a string and the Reord selection should return a bolean. </p><p>Can any one let me know how to get this functionality in my report. </p><p>&#160;</p><p>ANy other suggestions to achieve this would be a great help<br />Thanks a lot in advance. </p>

    as long as you have discrete and multi values checked on for the parameter, the resulting array is all you need.
    In the RSF, the desired results will be returned by a REALLY simple boolean statement
    {table.field} in {?my param}
    "Like" may replace "in"Â for some cases.
    Try it, you'll like it. :)Â
         - Kathryn Webster (Report Design Consultant)
               Kat&#39;s News: http://diamond.businessobjects.com/blog/279

  • Issue with Update / Overwrite Partner functions after a customer is created

    Hi All,
        I have been using the standard program RFBIDE00 in LSMW to update / insert the business partners. I could update different partners for PY,SH after a customer is created but for only BP one more entry is getting added instead of updating the existing entry
        Could anyone please let me know why this is happening.
    SP     Sold-to party     6353240
    BP     Bill-to party     6353240
    *BP     Bill-to party     6353538*   ENTRY WHICH GOT ADDED
    PY     Payer             6353241
    SH     Ship-to Party     6353240
    Thanks in Advance
    Vijay....

    Hi All,
        I have been using the standard program RFBIDE00 in LSMW to update / insert the business partners. I could update different partners for PY,SH after a customer is created but for only BP one more entry is getting added instead of updating the existing entry
        Could anyone please let me know why this is happening.
    SP     Sold-to party     6353240
    BP     Bill-to party     6353240
    *BP     Bill-to party     6353538*   ENTRY WHICH GOT ADDED
    PY     Payer             6353241
    SH     Ship-to Party     6353240
    Thanks in Advance
    Vijay....

  • Unable to create records in database using PHP Data Service

    Hello, I've been stuck on this for a few days and search up and down for this on the net, no response I've found has worked, so I come to you...
    Here are the steps I've taken, I think it's pretty standard
    1. I have a macbook pro running osx 10.7.3
    2. I installed MAMP all default (I've acually reinstalled this because someone suggested this might fix it)
    3. Thru phpMyAdmin I created a database called my_test
    4. In that database I created a table, this is the export of that table: (I've also tried this with InnoDB which is the default)
    CREATE TABLE `customer` (
      `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
      `name` varchar(50) NOT NULL,
      `email` varchar(150) NOT NULL,
      PRIMARY KEY (`id`),
      UNIQUE KEY `id` (`id`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
    5. I created a new Flx Project (Running Flash Builder 4.5.1 Premium)
         Project Name: PHPTest
         Application Type: Desktop (Although I've done the same thing with Web and got the same results)
         >> Next
         Application Server Type: PHP
         Web Root: /Applications/MAMP/htdocs/
         URL Root: http://localhost:8888/
         Clicked 'Validate Configuration' and that worked
         Output Folder: /Applications/MAMP/htdocs/PHPService (default by Flash Builder)
         >> Finished
    6. On the Data/Services tab on the bottom I click 'Connect to Data/Service...'
         Select 'PHP'
         >> Next
         Select 'Click here to generate a sample'
         Select 'Generate from database' radio button
         Username: root
         Password: root (default for MAMP)
         Host name: localhost
         Server port: 8889 (default for MAMP MySQL port, the HTTP port default is 8888 which in both cases seem to work but every video I've seen that uses MAMP on youtube uses 8889)
         Database: my_test
         Click 'Test Connection' (works)
         Table: customer
         Primary Key: id (this field is greyed out and Flash Builder selects 'id' which it figures out from the SQL table)
         >> Click OK
    7. Then if I don't have the Zend Framework folder in my /Applications/MAMP/htdocs/ folder it tells me its going to create that and I say alright. Then Flash Builder says stuff about how this is really only for testing and not production server ready and I say alright.
    8. Then it takes me back to the Form from Step 6 when I get the chance to select 'Click here to generate a sample'
         These fields are now filled with this data automaticly:
         PHP Class: /Applications/MAMP/htdocs/PHPTest/services/CustomerService.php
         Service name: CustomerService
         Service package: services.customerservice
         Data type package: valueObjects
         >> Click Next (shows all the functions that will be now availible)
         >> Click Finished (End of the forms and it opens Dreamweaver to the php file it created CustomerService.php which I have no need to edit so I close that down)
    9. Back in Flash Builder I switch to design view and drag a datagrid onto the big white area in the middle, whatever that is called.
    10. Then below in Data/Services tab on the bottom I click drag the function 'GetAllCustomer' on top of the datagrid.
         I say yes to rebound and click ok and the view of the datagrid is updated with the colums from the 'customer' table in mySQL.
    (Now let me say that when I hit save and compile this, if I actually had records in this table that I insert thru phpMyAdmin, this does show in the datagrid. So for the whole CRUD thing I am able to get the R which is Read)
    11. Now going back to the design view in Flash Builder I will create a form to create records in the table... (I guess this isn't really a step)
    12. In the Data/Service tab on the bottom I select 'createCustomer' function and then there is an icon called 'Generate Form' that looks like a white piece of paper with a gear on the bottom of it.
    13. This opens up a new form and since I don't have a crazy bunch of fields in my table I just click Finished (If you click next you can specify which fields you want to exclude from the form but this time I don't need to)
    14. This actually creates 2 forms if you look at the code, the second just shows the return type from when you click 'CreateCustomer' button on the first form. Because they overlap in design view I drag the form out of the way so you can see the input form, the return form, and the datagrid
    15. Then I save and compile...
    (Also if your actually reading this I didn't remove the id form field, I get the same result either way, but if you do remove the form field in the code/design you also have to update the button function to not deal with the id before it gets sent off to the php page since in this case the MySQL table is set to auto_increment the id, sorry this doesn't make much sence but this little area doesn't matter much either way)
    16. Now fill in whatever data you want for name and email, try differnt numbers in the id field like 0, nothing, 1, 1000 and click 'CreateCustomer'
    (For me nothing happens, no return is put in the return field, no error pops up and the datagrid is not updated with the new record, also going over to phpMyAdmin and checking out the table browse doesn't show any changes either, I know the button is calling the function because if I add a state change in that function it changes, it would seem that the line:
    createCustomerResult.token = customerService.createCustomer(customer2); doesn't do anything)
    So any idea what is wrong here, I'm convenced it's something stupid easy simple I just can't see it.

    In case you need more info, here is a code dump on a mxml project that has this problem:
    <?xml version="1.0" encoding="utf-8"?>
    <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
                           xmlns:s="library://ns.adobe.com/flex/spark"
                           xmlns:mx="library://ns.adobe.com/flex/mx"
                           xmlns:customerservice="services.customerservice.*"
                           xmlns:valueObjects="valueObjects.*"
                           currentState="State1">
        <fx:Script>
            <![CDATA[
                import mx.controls.Alert;
                import mx.events.FlexEvent;
                protected function dataGrid_creationCompleteHandler(event:FlexEvent):void
                    getAllCustomerResult.token = customerService.getAllCustomer();
                protected function button_clickHandler(event:MouseEvent):void
                    var customer2:Customer = new Customer();
                    customer2.id = parseInt(idTextInput.text);
                    customer2.name = nameTextInput.text;
                    customer2.email = emailTextInput.text;
                    currentState = "Test";
                    createCustomerResult.token = customerService.createCustomer(customer2);
            ]]>
        </fx:Script>
        <s:states>
            <s:State name="State1"/>
            <s:State name="Test"/>
        </s:states>
        <fx:Declarations>
            <s:CallResponder id="getAllCustomerResult"/>
            <customerservice:CustomerService id="customerService"
                                             fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)"
                                             showBusyCursor="true"/>
            <valueObjects:Customer id="customer"/>
            <s:CallResponder id="createCustomerResult"/>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <s:DataGrid id="dataGrid" includeIn="State1" x="330" y="10" width="392"
                    creationComplete="dataGrid_creationCompleteHandler(event)" requestedRowCount="4">
            <s:columns>
                <s:ArrayList>
                    <s:GridColumn dataField="id" headerText="id"></s:GridColumn>
                    <s:GridColumn dataField="name" headerText="name"></s:GridColumn>
                    <s:GridColumn dataField="email" headerText="email"></s:GridColumn>
                </s:ArrayList>
            </s:columns>
            <s:typicalItem>
                <fx:Object id="id1" email="email1" name="name1"></fx:Object>
            </s:typicalItem>
            <s:AsyncListView list="{getAllCustomerResult.lastResult}"/>
        </s:DataGrid>
        <s:Form includeIn="State1" defaultButton="{button}">
            <s:FormItem label="Id">
                <s:TextInput id="idTextInput" text="{customer.id}"/>
            </s:FormItem>
            <s:FormItem label="Name">
                <s:TextInput id="nameTextInput" text="{customer.name}"/>
            </s:FormItem>
            <s:FormItem label="Email">
                <s:TextInput id="emailTextInput" text="{customer.email}"/>
            </s:FormItem>
            <s:Button id="button" label="CreateCustomer" click="button_clickHandler(event)"/>
        </s:Form>
        <s:Form includeIn="State1" x="0" y="204">
            <s:FormItem label="CreateCustomer">
                <s:TextInput id="createCustomerTextInput" text="{createCustomerResult.lastResult as int}"/>
            </s:FormItem>
        </s:Form>
    </s:WindowedApplication>

  • Inconsistent Errors when processing  IDocs using custom Function Module

    I am encountering a most perplexing error. Here is the situation.
    We have a custom function module to update data in the EH&S system. We are having a bizarre error occurring. This is the basic processing of the function module:
    1. IDoc data is read and loaded into an internal table.
    2. Data is run through a series of checks to determine if the data is valid for entry into the system.
    3. After validation we use function module  C1F2_SUBSTANCES_READ_WITH_REF to read  characteristic data for the  substance. This data is used to validate whether current data exists to allow for loading of the IDoc data. (This is the step where the IDoc is receiving an error even if the data is valid. This only occurs if we are processing a large amount of Idocs and one IDoc contains valid data and another invalid data for the same substance. It occurs even if the Idocs are not processed in sequence.  If individually processed or reprocessed after initial failure they pass. This is what is so confusing!) If it exists, a flag is set and  the data is loaded using function module BAPI_BUS1077_CHANGE to modify the data.
    4. If the flag is set to allow further processing, the function module C1F2_SUBSTANCES_READ_WITH_REF is used again to select different characteristic data for the substance. A similar validation process occurs and if it passes, data is loaded using BAPI_BUS1077_CHANGE to update and BAPI_BUS1077_CREATE to create new data.
    Here is the situation:
    When processing one valid record for one substance, the record loads successfully.  When processing multiple valid records (all are valid) for one substance, they all load successfully.  The problem occurs when attempting to load valid and invalid records for the same substance.  Some times the program successfully loads the valid data (as expected).  Other times, it will not load any records.  It is not consistent!
    The order of IDoc processing does not have an impact on the success of the load.  Whether the valid or invalid record processes first does not have an impact on the success of the valid substance load.
    Does anyone have ANY Idea of what is going on? I am clearing all fields in the function module before processing occurs. I cannot find what is causing the error to occur.
    HELP!
    Jim Hardy

    I have some further information. It seems that if data for a substance is sent in two separate Idocs, one with valid and one with invalid data, As long as the two IDocs are processed consecutively, they process correctly. If they are separated by IDocs containing other substance information, they fail.
    thanks
    Jim

  • Problem in discoverer  with analytic function created non-additive YTD

    I have problem with discoverer desktop which show me wrong ytdact, ytdbgt figure after i rollup/pivoting
    on custom folder i did in discoverer admin:
    SELECT a.year, a.month, c.deptno, b.glaccount, bgt.mthbgt, bgt.ytdbgt, bgt.fullbgt, bgt.lastyr_fullbgt,
    act.mthact, act.ytdact
    FROM (
    SELECT
    a.amount mthbgt,
    SUM(a.amount) OVER (PARTITION BY ...) fullbgt,
    SUM(a.amount) OVER (PARTITION BY ...) ytdbgt,
    LAG(SUM(a.amount),1) OVER (PARTITION BY...) lstyr_fullbgt
    FROM gltrans_bgt a, gl_master b, dept c
    WHERE a.glaccount=b.glaccount AND a.deptno=c.deptno GROUP BY a.year, a.month, c.deptno, b.glaccount
    ) bgt
    FULL OUTER JOIN
    SELECT a.year, a.month, c.deptno, b.glaccount,
    a.amount mthact,
    SUM(a.amount) OVER (PARTITION BY...) ytdact,
    LAG(SUM(a.amount),1) OVER (PARTITION BY...) lstyr_ytdact
    FROM gltrans_act a, gl_master b, dept c
    WHERE a.glaccount=b.glaccount AND a.deptno=c.deptno
    GROUP BY a.year, a.month, c.deptno, b.glaccount
    ) act
    ON
    bgt.year=act.year AND
    bgt.month=bgt.month AND
    bgt.deptno=act.deptno AND
    bgt.glaccount=act.glaccount
    In discoverer desktop, sometime i would like to remove deptno or month to see the rollup figure. But it seems discoverer tried to sum the ytd to give me wrong figure.
    I know that to ask oracle rewrite the query in order to roll up the figure, one may need to create dimension and specify the hierarchy for the related .
    Anyway to do on this MV so that oracle can rewrite the query for me automatically?

    I suspect if your FY runs not from Jan - Dec, then someone has had to come to grips with this before and has created some kind of custom FUNCTION to determine the fiscal year from the date entered. Or maybe a table that populated with the same info.
    Nevertheless, if there isn't one, then you'd just change the TRUNC(SYSDATE,'YYYY') logic to your fiscal year with a direct calculation.
    ie:
    calculation: what_fiscal_year
    CASE WHEN to_char(sysdate,'MMM') IN ('JAN','FEB','MAR','APR','MAY','JUN','JUL','AUG','SEP') THEN to_char(sysdate,'YY')
    WHEN to_char(sysdate,'MMM') IN ('OCT','NOV','DEC') then to_char(sysdate,'YY')-1
    ELSE '99' END
    Something like that - I haven't tested it so treat as pseudo-code first (ie: the last to_char may need to have a to_char(to_number(to_char instead to substract the 1 but might work - Oracle's good with powerful date functions). It should give you an idea of what I'm referring to.
    So once each record has an associated FY either by a calculation such as shown or by a calculation calling your corporate FY function, you just do the same thing as described early (ie: range between FY and FY-1).
    Russ

  • Regarding custom Function Module

    Hi Group,
    Could anyone please guide me on a custom Function Module.
    Scenario:
    I have to use this function module to get either active records or inactive records.
    This function module which has yet to be created should have to code to fetch both active records and inactive records. It depends on what user has selected in a report.
    The report has 2 radio buttons in the selection screen. If rb_1 is selected then we have to call this function module and pass all the inactive records.
    And if rb_2 is selected then all the active records should be selected.
    Now I have to code the function module depending on the selection of the radio button. I can keep a flag in the function module and assign it 1 or 2 depending of the selection of the radio button.
    Guys could you guide me on how do I set a flag in such scenario in the function module?
    Like:
    In the Source code of function module.
    If flag = 1.
    select all invalid records
    endif.
    If flag = 2.
    select all valid records.
    endif.
    where should I keep this flag in my function module.
    After setting this how do I call it in the report, depending on the radio button selected and how do I code in my report.
    Hope you will understand this.
    A million thanks in advance.
    Kumar.

    hi,
    in the function module u have to declare "FLAG" as an import parameter. n then while calling this functon module from the report, u should paas a value to this "FLAG" based on the radio button selected.
    tell me if this information was helpful.

Maybe you are looking for

  • Mac book pro will not start up.  Charging light is on, but no response from computer.  What happened?

    The Mac Book Pro was fine, and then just stopped working.  I connect the power source, and the light is on as if it is charging.  However, when I try to turn the laptop on, nothing happens.  There is no response whatsoever.  Any ideas what happened a

  • Convert anchor point tool problem

    I'm new to illustrator.. when I want to move tangents independently it only works with the first one I grab, the other one disappears, and reappears while I hold the first one.. bug?

  • I get an error message when i try to start firefox

    This is the error message Error: Platform version ' ' is not compatible with minVersion >= 1.9.2.8 maxVersion

  • LaserWriter 12/640 - 3 Questions

    Hi, this is my first post here, I have three questions, I hope you can help me: 1) I have just acquired a Laserwriter 12/640. It prints fine from the bottom tray but when trying to print from the multipurpose tray it has a paper jam before the paper

  • 29,97 sequence to PAL 25 fps

    So, I have a sequence, that I wish to end up on PAL SD (DVD). The original footage is an MPEG-1, 652x480, 29,97 fps). Right now the seq is set to 29,97. It's edited and all set for export. What's the best way to go from Final Cut? Export the seq as s