Adding a new conditon on head via function modul?

Hi,
is there a way to add a condition to an order via function module? I mean in customizing we have maintained the calc scheme (and everything else) and assign it to the order. What we want is to add the new condition type to the head of the order via function module. The scenario is as follows:
We create an order and have on the header a field for a value. If you type a value in the field and press enter the condition should be created and calculatetd. The result is given in the condition tab of the order on header level.
We try to not do a modifictaion. therefore i am looking for a function module. Is there someone who could help?
  thanks and regards,
       Ming

Why can't this be done by the pricing configuration?
There are also pricing user exits available, which are not modifications and exist for this purpose exactly (i.e. when for some reason configuration alone is not enough). See the list here:
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/erplo/sdUserexits

Similar Messages

  • Error in Extraction with Generic Datasource via Function Module

    Dear Gurus,
    Iam working for BI-HR module.We are extracting data with generic data source via function module. The client some more extra fields in already existing DS. So we made a copy of that Function module and tried to create new generic DS, we got error while extraction like "Error occured during the extraction process". Can you please help in resolving this issue, your valuable suggestion would be highly appreciated.
    Thanks and regards
    Arun S

    Hi,
    Which structure are you using??
    Are you using the same old structure for this function module as well.
    Have you enhanced the structure with new required fields.
    New extrac fields needs to be added to existing structure if you are using the same or create a new one and make sure that you have all the fields in the structure which you are going to use in the data source.
    You need to take care for the append as well and the issue could be in the code as well.
    Make sure you have written the proper code and just for the new fields done an append
    Thanks
    Ajeet

  • Datasource via function module

    Hi,
    I am building a function that is due to be used by a Datasource (via Function Module).
    This function uses table WDRD. It applies to this table a code that needs the use of an internal table for the calculation (for intermediary calculation storage). After which, I want to get the result of this internal table (say T1_DATA), and return it to E_T_DATA, which will be used to fill my datasource. This is where I am stuck.
    -> When I try to get the content of my internal table in my cursor (code: OPEN CURSOR WITH HOLD S_CURSOR FOR
          select * from T1_DATA
        endif.),
    I get an error message stating the table is not defined in the ABAP dictionary.
    -> When I try to avoid the cursor and put directly the content of my table T1_DATA in table E_T_DATA, I don't get anything in my Datasource.
    Any help would be greatly appreciated.
    Thanks,
    Pierre

    Hi,
    Which structure are you using??
    Are you using the same old structure for this function module as well.
    Have you enhanced the structure with new required fields.
    New extrac fields needs to be added to existing structure if you are using the same or create a new one and make sure that you have all the fields in the structure which you are going to use in the data source.
    You need to take care for the append as well and the issue could be in the code as well.
    Make sure you have written the proper code and just for the new fields done an append
    Thanks
    Ajeet

  • WBS copy via function module "K_PLAN_TO_PLAN_COPY"

    Hi Experts
    anybody please advise whether WBS copy to other via function module "K_PLAN_TO_PLAN_COPY"
    is possible or not in below situation.
    Currently we faced some issue when WBS satus is "TECO", we can not
    copy WBS to another WBS (we want to copy whole wbs into others) by
    function module "K_PLAN_TO_PLAN_COPY".
    So we just change system status from TECO to REL then copy wbs to other,
    however, we could face another issue with this way of copying. (since we
    have to change wbs status, it could cause conflict against other project)
    We want to copy wbs without changing wbs status via function module "K_PLAN_TO_PLAN_COPY".
    Can it be possible? if yes, please advise how to, (settings/conditions/something like that)
    Thank you.
    Satoru

    Hi Satoru,
    The Function Module K_PLAN_TO_PLAN_COPY is not released for customers and therefore it is not intended to be used in customer specific programs or enhancements. For further details, please have a look SAP Note 109533.
    Sorry for not having better news.
    BR,
    Enrique

  • Error during XML inbound via Function Module 'EDI_DATA_INCOMING'

    Hi Team,
    I am facing below error while trying to upload a inbound XML file via Function Module  'EDI_DATA_INCOMING'.
    The control record must begin with <EDI_DC40 segment="1"> instead of
    Message no. EA719
    Diagnosis
    The tag '<EDI_DC40 segment="1">' must be at the start of a control record in XML format, otherwise string '' would be found.
    System Response
    The file cannot be processed.
    Procedure
    Correct file DEV_H\SGIDOCI\MSUTEST\00082_ATT..
    Please suggest a proper solution for the same. If it is because of wrong structure of XML file then please send me correct XML format for file upload.
    Regards,
    Amit Sharma

    Hello,
    It's the error is SAP code.
    Look notes 1616333 and 1535033. Those should fix the error.
    BR, Janne

  • Generic Delta Extraction via Function Module

    Hello,
    i need a help for a generic delta extraction based on a Function Module. As an example i take the function module RSVD_BW_GET_DELTA_DATA.
    My generic delta extractor based on the field AEDAT - Change Date and i will extract purchase service orders and entry sheets.
    In the sample function module the select for the extraction worked with the table ROBWQTSTAT, but this table ist empty after the initialization.
    OPEN CURSOR WITH HOLD G_CURSOR FOR
          SELECT * FROM ROVERCUBE1
                   WHERE COUNTRY IN L_R_COUNTRY AND
                         REGION  IN L_R_REGION AND
                         KUNNR   IN L_R_KUNNR AND
                         TYPE    IN L_R_TYPE AND
                         GJAHR   IN L_R_GJAHR AND
    Here the timerange calculated in form GET_TIME_INTERVAL is evaluated.
                         TSTMP   IN S_R_TSTMP AND
                         OBJVERS = 'A'.
    I found the table ROOSGENDLM. In this table i found the field DELTAID with the last date of the extraction and the field REPEATID with the date for the repead-Update.
    My Questions:
    Is this the right way to build an generic delta extraction with an function module or must i install a coding in my function module for an update of the table ROBWQTSTAT?
    Which settings are needed in the table ROOSOURCE for a generic delta extraction via function module?
    Best regards
    Uwe

    Hi Uwe,
    please have a look at https://weblogs.sdn.sap.com/pub/wlg/2415. [original link is broken] [original link is broken] [original link is broken] It might help
    kind regards
    Siggi
    PS: We already had almost the same question here today.

  • Problem with Creation of CRM Order via Function Module Test

    I am trying to check the order creation process from external systems by using the test function in Tcode SE37 with Function Module BAPI_BUSPROCESSND_CREATEMULTI.
    I have created a Test Sequence of the following FMs:
    BAPI_BUSPROCESSND_PROCSETTINGS
    BAPI_BUSPROCESSND_CREATEMULTI
    BAPI_PROCESS_SAVE
    BAPI_TRANSACTION_COMMIT
    All that I have been able to create so far is an order header without a Sold-to or Ship-to and no items. I am able to populate the Organization data, Header text and Appointments. The only partner function that is being populated is the one that is being automatically picked up from my user master.
    For the BAPI_BUSPROCESSND_CREATEMULTI I am populating the following tables:
    HEADER          1 entry
    ITEM               2 entries
    PARTNER          2 entries
    ORGANISATION     1 entry
    APPOINTMENT          2 entries
    INPUT_FIELDS          41 entries     
    SCHEDULELINE     2 entries
    I have created the entries based upon information gained through debugging function module CRM_ORDER_MAINTAIN during the creation of a service order.
    It would be interesting to know if anybody has successfully created an order via the SE37 test function and if so, it would be useful to see the data in the relevant tables.

    HEllo ,
    Write a wrapper to the function module CRM_ORDER_MAINTAIN.
    To populate the Text use below code
      ls_input_field_names-fieldname  = 'REF_GUID'.
      INSERT ls_input_field_names INTO TABLE lt_input_field_names.
      ls_input_field_names-fieldname  = 'REF_KIND'.
      INSERT ls_input_field_names INTO TABLE lt_input_field_names.
      ls_input_field_names-fieldname  = 'TDID'.
      INSERT ls_input_field_names INTO TABLE lt_input_field_names.
      ls_input_field_names-fieldname  = 'TDSPRAS'.
      INSERT ls_input_field_names INTO TABLE lt_input_field_names.
      ls_input_field_names-fieldname  = 'TDSTYLE'.
      INSERT ls_input_field_names INTO TABLE lt_input_field_names.
      ls_input_field_names-fieldname  = 'TDFORM'.
      INSERT ls_input_field_names INTO TABLE lt_input_field_names.
      ls_input_field_names-fieldname  = 'LINES'.
      INSERT ls_input_field_names INTO TABLE lt_input_field_names.
      ls_input_field_names-fieldname  = 'MODE'.
      INSERT ls_input_field_names INTO TABLE lt_input_field_names.
      CLEAR ls_input_fields.
      ls_input_fields-ref_guid    = attr_guid.
      ls_input_fields-ref_kind    = 'A'.
      ls_input_fields-objectname  = 'TEXTS'.
      CONCATENATE 'CRM_ORDERH' order_guid INTO ls_input_fields-logical_key.
      ls_input_fields-field_names = lt_input_field_names.
      INSERT ls_input_fields INTO TABLE attr_t_inputfields.
    Call Order maintain FM to create any order
      CALL FUNCTION 'CRM_ORDER_MAINTAIN'
        EXPORTING
          it_text               = lp_order->attr_t_text
          it_partner          = lp_order->attr_t_partner
        IMPORTING
          et_exception     = et_exception
        CHANGING
          ct_orderadm_h     = lp_order->attr_t_orderadm_h
          ct_input_fields      = lp_order->attr_t_inputfields
        EXCEPTIONS
          error_occurred    = 1
          document_locked   = 2
          no_change_allowed = 3
          no_authority      = 4
          OTHERS            = 5.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    Regards
    Satish

  • Adding a new field in existing  Genric Func Module extractor

    Hi,
      I have created a  generic data source of type 'Transaction'  with Function module and it was working fine and loading data into ODS succesffuly . Recently I needed to add one field.
      I have enhanced the function module and the extract structure accordingly. However I am not sure what next to do to have that new field visible in the data source.
      I went to transaction SBIW --> Maintain Generic data source   in change mode. However I am not able to see the newly added field in there.
      Need help.
      Thanks

    Hi,
    Just check the ROOSFIELD table in se11 for your datasource. Possibly the newly added field is hidden.  You can execute this code and the field would appear in RSO2.
    tables ROOSFIELD.
    update ROOSFIELD set SELECTION = 'X' where
    Datasource = ' <Data source>'
    and field = '<your field>'.
    This would make the field appear in RSO2/RSA6.
    Bye
    Dinesh

  • Equipment record address creation via function module

    How can I  populate an Equipment record's address via a function module?  I'm referrring to the Address area of the Location tab in tcode IE02. BAPI_EQUI_CREATE works fine for the base data but has no address capabilities.

    Alejiandro
    Yes it was ITOB410. I tried the lock_old parm without luck but was able to get around that problem with an explicit calll to FM EQUIPMENT_LOCK. However, I have a new problem with the FM.
    The LOCK FM got rid of the BLOCKED issue. However, now an internal call from EQUIPMENT_MODIFY to EQUI_GET_SAVE_DATA is causing a short dump in include LITOBBUFEQF70 on:
    120           IF NOT SY-SUBRC IS INITIAL.
    121 *         try to read lock table by matnr/sernr
    122             READ TABLE I_WA-LOCK ASSIGNING <L_WA_LOCK_REC>
    123                  WITH TABLE KEY EQUNR = SPACE
    124                                 MATNR = <L_WA_EQUI_REC_WBUF>-EQUI
    125                                 SERNR = <L_WA_EQUI_REC_WBUF>-EQUI
    126             IF NOT SY-SUBRC IS INITIAL.
    >>>>               MESSAGE X003.
    128             ENDIF.
    129           ENDIF.
    Have you seen this?

  • Error while creating Generic Extractor via Function Module

    Hello Guys
    I have created a Generic Extractor through a Function Module. I took the Standard FM: RSAX_BIW_GET_DATA_SIMPLE, gave it a new name and activated it. I made a few changes in it, like giving my structure name for E_T_DATA and giving the list of tables, from where I need to get the data. Then I created the datasource in RSO2 by giving this function module and the extract structure.
    The DS was created properly, but when I check in RSA3 for records, its giving me an error: ---> <b>The extraction program does not support object YCNA_INVY_TRNS</b>
    What do i do now? Can someone please tell me, what changes I need to make in the standard FM to suit my requirements??
    Thanks.

    Hi,
            Just try to reactivate the structure once again. And when you open the function module, if the problem still persists just try to press Return key several times. The message you are getting is just a warning message.
    PS: I am not sure whether this is the correct way, but i personally resolved this by pressing the ENTER key 4 or 5 times. So just give a try.
    Regards
    Sunil

  • Problem in Logical Databse Call via Function Module - Urgent

    Hi Experts,
    To use the Logical Database(LDB) in the function module(Custom) I am using the function module - LDB_PROCESS. But I didn't get any output. I am attaching the code. Please Help me in this.
    DATA : W_LDBNAME LIKE TRDIR-LDBNAME.
    DATA : IT_CALLBACK LIKE TABLE OF LDBCB WITH HEADER LINE,
           IT_SELECTIONS LIKE TABLE OF RSPARAMS WITH HEADER LINE,
           IT_PERNR TYPE TABLE OF PERNR WITH HEADER LINE.
    MOVE 'PNP' TO W_LDBNAME.
    IT_CALLBACK-LDBNODE = 'PERNR'.
    IT_CALLBACK-GET     = 'X'.
    IT_CALLBACK-CB_PROG = SY-CPROG.
    IT_CALLBACK-CB_FORM = 'CALLBACK_PERNR'.
    APPEND IT_CALLBACK.
    CLEAR IT_CALLBACK.
    IT_SELECTIONS-KIND    = 'S'.
    IT_SELECTIONS-SELNAME = 'PNPPERNR'.
    IT_SELECTIONS-SIGN    = 'I'.
    IT_SELECTIONS-OPTION   = 'EQ'.
    IT_SELECTIONS-LOW      = '100178'.
    APPEND IT_SELECTIONS.
    CLEAR IT_SELECTIONS.
    CALL FUNCTION 'LDB_PROCESS'
    EXPORTING
        LDBNAME                    = W_LDBNAME
      VARIANT                    =
      EXPRESSIONS                =
      FIELD_SELECTION            =
      DYN_NODE_TYPES             =
    TABLES
        CALLBACK                   = IT_CALLBACK
       SELECTIONS                 = IT_SELECTIONS
    EXCEPTIONS
       LDB_NOT_REENTRANT           = 1
       LDB_INCORRECT               = 2
       LDB_ALREADY_RUNNING         = 3
       LDB_ERROR                   = 4
       LDB_SELECTIONS_ERROR        = 5
       LDB_SELECTIONS_NOT_ACCEPTED = 6
       VARIANT_NOT_EXISTENT        = 7
       VARIANT_OBSOLETE            = 8
       VARIANT_ERROR               = 9
       FREE_SELECTIONS_ERROR       = 10
       CALLBACK_NO_EVENT           = 11
       CALLBACK_NODE_DUPLICATE     = 12
       CALLBACK_NO_PROGRAM         = 13
       CALLBACK_NO_CBFORM          = 14
       DYN_NODE_NO_TYPE            = 15
       DYN_NODE_INVALID_TYPE       = 16
       OTHERS                      = 17.
    IF SY-SUBRC <> 0.
      MESSAGE I039(ZABA) WITH  SY-SUBRC.
    ENDIF.
    LOOP AT IT_PERNR.
      message i039(zaba) with 'Inside loop'.
      WRITE : / IT_PERNR-PERNR, IT_PERNR-BUKRS.
    ENDLOOP.
    *&      Form  CALLBACK_PERNR
          text
         -->L_LDBNAME     text
         -->L_IT_PAYROLL  text
         -->TYPE          text
         -->PAY99_REULT   text
         -->L_EVT         text
         -->L_CHK         text
    FORM CALLBACK_PERNR USING  L_LDBNAME LIKE TRDIR-LDBNAME
                               L_IT_PERNR LIKE PERNR
                               L_EVT type C
                               L_CHK type C.
      message i039(zaba) with 'Inside Callback'.
      WRITE : / L_IT_PERNR-PERNR,
                L_IT_PERNR-BUKRS.
      MOVE-CORRESPONDING L_IT_PERNR TO IT_PERNR.
      APPEND IT_PERNR.
      CLEAR IT_PERNR.
    ENDFORM.                    "CALLBACK_PERNR
    Thanks in advance
    Arul Jothi.

    Hi,
    I think Arul commented the 'it_selections' while trying out.. I couldn't get the fm work for PNP.. it worked fine with the FI LDBs.. just didn't seem to like the PNP..
    Regards,
    Suresh Datti

  • Call WDA from ABAP via function module

    Hi WDA experts,
    is there any possibility to call a WDA within a ABAP report AND include it in the process.
    The best would be to call a WDA via a function module - make some inputs on the WDA side - press submit and the function module gives me the data from the webdynpro back to my application.
    I know that I can call a WDA via the function CALL_BROWSER, but in this case the WDA application is fully independent from the report and I am not able to post any data back to the report.
    I also know FM WDY_EXECUTE_IN_PLACE, but in this case I need a HTML container to display the WDA and there it seems that I also never get back any data back to the report.
    Any hints are appreciated.

    Not too hard:
    CALL WDA passing in a KEY on start plug.
    write the data to a shared memory object using the key passed as the
    key to a shared memort object on the submit.
    (see blogs on writing Shared maemory objects in ABAP)
    Then simply exit APP.
    On return read the data from the Shared memory Object.
    The shared memory object lives across the 2 sessions.
    cheers
    Phil.

  • New and enhanced or changed function modules in Ecc6.0 compare to 4.6C

    Hi all Experts,
    Now i am at the middle phase of my upgrade project. How can i list module wise (like SD, FI, MM) function modules which modified or newly came to ecc 6.0 or deleted in ecc?
    I already visited the sap site and taken the delta functions. but its not having this function modules.
    where i can find and list?
    Kindly help please....
    points will awarded.
    Raghav

    Hi Sriram,
    It also helps. but my need is only what are the new/changed function modules in ECC6.0 when compared to 4.6C. How to list this?
    Kindly anyone also answer to me.
    Regards,
    Raghav

  • Execute BEX Query via Function Module

    Hi Mates,
    I want to execute BEX query via a Function Module.
    Also i want to explore whether the input parameters of the query can be retrieved from a Database Table.
    Please let me know how this can be achieved.
    Thanks in advance.
    Regards,
    Hrishikesh

    Hi Hrishikesh,
    Assuming you have the necessary ABAP knowledge, you will have to code the exit in the include ZXRSRU01 under I_STEP = 1 (this is because you want to prepopulate your parameters from the values in your DB table).
    Your DB table has Key1, Key2 and Your field as the three fields and you want to read the value of 'Your Field' based on your keys Key1 and Key2.
    So, the code will be something like -
    when 'Your variable'.
    if i_step = 1.
    select single 'Your field' from 'Your DB table' into lv_your_field where Key 1 = 'X' and
                                                                                                                   key 2 = 'Y'.
    clear l_s_range.
    l_s_range - low = lv_your_field.
    l_s_range-sign = 'I'.
    l_s_range-opt = 'EQ'.
    append l_s_range to e_t_range.
    endif.

  • How to read attachment via function module??

    Hi All,
    I have to Read the content of attachment of standard task TS00407864.
    For that i have used a function module SAP_WAPI_GET_ATTACHMENTS.
    and i got this.
    OBJECT_ID                                SOFM      FOL32000000000004RAW340
    DESCRIPT                       Office Document
    SHORTTEXT                      Office Document
    DEF_ATTRIB                     Document Not as per Accounting Stantard
    OBJECT_TYP                     AT
    Now i have to read it in internal table which function i should use and how can i pass the value to it.
    Please Help!
    Regards,
    Purvesh Patel.

    Hi,
    use method cl_swf_utl_convert_por=>convert_bor_to_ibf( ). Also properly defined structures will parse data without need of offset reading/parsing.
    Example:
         data:
             lt_attachment         type  swrtobject,
             lt_wapi_message       type  swr_msgtab,
             ls_docid              type  soentryi1,
             lv_subrc              type  sy-subrc,
             lv_doc_id             type  sofolenti1-doc_id
         field-symbols:
             <ls_attachment>       type  swr_object
         call function 'SAP_WAPI_GET_ATTACHMENTS'
             exporting
                 workitem_id     = me->mv_workitem_id
                 user            = me->mv_username
                 language        = me->mv_language
             importing
                 return_code     = lv_subrc
             tables
                 attachments     = lt_attachment
                 message_struct  = lt_wapi_message
         if ( lv_subrc <> 0 ).
             "! Handle error / messages
         endif.
         loop at       lt_attachment
             assigning <ls_attachment>
             lv_doc_id = cl_swf_utl_convert_por=>convert_bor_to_ibf( i_bor_por = <ls_attachment>-object_id ).
             ls_docid  = lv_doc_id.
         endloop.

Maybe you are looking for

  • Calculating and Displaying the Total for a field

    Hi all, I have a template that must have a field's total at the end of each page. I use <?add-page-total: InvAmt;' ACCOUNTEDDR'?> for calculating the sum and<?show-page-total:InvAmt; 'C9G990D00';'(C9G990D00)'?> for showing the total. Its coming up pr

  • 10.6.8 printing

    What is the status of fixes for 10.6.8 printing issues? I have an HP 6040mfp and the print jobs will be paused. I spoke with Apple support and all I got was a runaround and a very ungelpful conversation. Our other office printers work fine, but we ne

  • Apple 30" vs. Dell 3007WFP

    Has anyone compared their 30 display to the Dell 3007WFP? I just read that it says the Dell has better image quality and fast pixel response. Ray

  • Service item with sub items ( service master data)

    hi, I needa to create a service which contains several individual services in the service master data. (CRM 4.0) Can anyone tell me how to create these sub-items of a service product. thanks .

  • Daily kernel panics on iMac running Mavericks

    Frustratingly, I have daily kernel attacks/required rebooting on my 2013 iMac running Mavericks, error message, below. Please help! Thank you. Kernel version: Darwin Kernel Version 13.4.0: Sun Aug 17 19:50:11 PDT 2014; root:xnu-2422.115.4~1/RELEASE_X