How to change the characteristic value in a item of sales order by FM?

Hi experts,
I guess the FM BAPI_SALESORDER_CHANGE can implement my requirement. But I have made many testing program, that's all failed. I don't know which part is not correct. So could you give a very simple sample to me? Just change the characteristic value in a item of sales order, not do any change for other parts. Thanks in advanced.
Regrads

Hi Birendra,
Thanks for you explain. I follow your guide to wirte abap program. But related characteristic value still not changed in SO main screen. could you give me some suggestion? Thanks a lot!
type-pools: IBCO2,
            IBXX.
data: l_CUOBJ type CUOBJ_VA,
      l_ibase type IBCO2_IBASE_REC,
      l_CONFIGURATION type IBCO2_INSTANCE_TAB2,
      w_CONFIGURATION type IBCO2_INSTANCE_REC2,
      l_ROOT_OBJECT type IBXX_BUSINESS_OBJECT.
data: t_IBCO2_VALUE_TAB type IBCO2_VALUE_TAB,
      w_IBCO2_VALUE_REC type IBCO2_VALUE_REC.
select single CUOBJ
  into l_CUOBJ
  from VBAP
  where VBELN = '0020030609'
    and POSNR = '000020'.
  CALL FUNCTION 'CUCB_GET_CONFIGURATION'
    EXPORTING
      INSTANCE                           = l_CUOBJ
    IS_BUSINESS_OBJECT                 =
    IV_MOMENT                          =
    IV_WITH_DB_INSTANCE                =
   IMPORTING
     IBASE                              = l_ibase
     CONFIGURATION                      = l_CONFIGURATION
    EO_CBASE_REF                       =
  EXCEPTIONS
    INVALID_INPUT                      = 1
    INVALID_INSTANCE                   = 2
    INSTANCE_IS_A_CLASSIFICATION       = 3
    OTHERS                             = 4
  IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
loop at l_CONFIGURATION into w_CONFIGURATION.
  l_ROOT_OBJECT = w_CONFIGURATION-OWNER.
t_IBCO2_VALUE_TAB[] = w_CONFIGURATION-values[].
  read table w_CONFIGURATION-values into w_IBCO2_VALUE_REC with key ATINN = '0000000222'.
  w_IBCO2_VALUE_REC-ATWRT = 'TMP'.
  modify w_CONFIGURATION-values from w_IBCO2_VALUE_REC index sy-tabix.
  modify l_CONFIGURATION from w_CONFIGURATION index 1.
  clear: w_CONFIGURATION.
endloop.
CALL FUNCTION 'CUCB_SET_CONFIGURATION'
  EXPORTING
    ROOT_INSTANCE                      = l_CUOBJ
  IS_CBASE_HEADER                    =
  CHANGING
    CONFIGURATION                      = l_CONFIGURATION
EXCEPTIONS
  INVALID_INPUT                      = 1
  INVALID_INSTANCE                   = 2
  INSTANCE_IS_A_CLASSIFICATION       = 3
  OTHERS                             = 4
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'CUCB_CONFIGURATION_TO_DB'
  EXPORTING
    ROOT_INSTANCE                       = l_CUOBJ
    ROOT_OBJECT                         = l_ROOT_OBJECT
  FORCE_NEW_INSTANCE                  =
  IV_WITHOUT_COMMIT_UPDATE            = ' '
  IV_MATERIAL                         =
  IV_LOCATION                         =
  IV_TECHS                            =
IMPORTING
  NEW_INSTANCE                        =
TABLES
  EXP_NEW_NESTED_CUOBJS               =
EXCEPTIONS
  INVALID_INSTANCE                    = 1
  INVALID_ROOT_INSTANCE               = 2
  NO_CHANGES                          = 3
  ALREADY_REGISTERED_FOR_UPDATE       = 4
  INSTANCE_IS_A_CLASSIFICATION        = 5
  OTHERS                              = 6
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

Similar Messages

  • How to get the texts for each line item for Sales order in a smartform

    I'm createing a smart form in which i need to display certain texts for each line item of a sales order. How can i get those??
    I'm trying with the table STXH and FM read_text... but i'm not clear how and what i'm getting... can anybody pls help me.....

    Hi There,
    But then i will be getting only the value. i want to link that against the particular material of the Purchase Order.
    Like for ex:
    PO No.  Material Code        Line Item        Basic        Excise       Tax       Inv Value
    0000001 5000251                010               100           16         4.64      120.64
    0000001 5000252                020               200           32         9.28      241.28
    Can u help me on this?
    Regards,
    Jitesh

  • How to change the profile value in the pl/sql code without making change in the database

    How to change the profile value in the pl/sql code without making change in the database.

    I have program ,where if the profiles 'printer and nunber of copies ' are set at the user level, by default when the report completes the O/p will be sent to the printer mentioned in the set-up. but what user wants is
    if these Profiles are set for the user running this program automatic printing should not be done.

  • How to change the Unitprice value from 2 decimals to 3 decimals in script

    Hi Gurus,
    how to change the Unitprice value from two decimals to three decimals for each item level for PO in script.
    Please provide some possible solutions.
    Thanks,
    V.V.

    Hi,
    Check the options available like
    &VAR(.2)&  this will print 2 decimals
    &VAR(.3)&  this will print 3 decimals
    need to change the value for how many decimals you need
    Thanks & Regards
    Sarves Sombhatla

  • Change the characteristic Values in Material master date

    Hi Experts,
    How do change the characterstic values in material master ? Is there any standard BAPI or t.ocde or LSMW
    Best Rgds
    Suma

    I often changed classification with LSMW using IDOC CLFMAS

  • Change the characteristic Values in Material master dat

    Hi Experts,
    How do change the characterstic values in material master ? Is there any standard BAPI or t.ocde or LSMW
    Best Rgds
    Suma

    Hi Suma,
    Probably this question should be asked in another forum (MM) then the one for DMS related questions

  • How to change the url of "Add New Item" of a particular list in SharePoint 2013???

    Hi Guys,
    How to change the url of "Add New Item" of a particular list in SharePoint 2013???
    I need to redirect it into the page where I have created my Visual web part.
    Please suggest
    Warm Regards,
    Tony Joy

    Hi,
         There are multiple ways to change the form url like javascript, SharePoint designer, custom code, editing default form to have custom web part etc, Please follow the url below that describe diffent methods and steps
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/ec2769a0-683c-4023-8804-b596e4f92a3a/change-default-forms-on-custom-list?forum=sharepointcustomizationlegacy
    Hope it helps!!!
    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. Thanks, Ajeet

  • How to set the default value of an item type DATE PICKER to the day of yest

    Hi
    How to set the default value of an item type DATE PICKER to the day of yesterday ?
    Thank you very much !
    Christian.

    Hi Christian,
    Have a look at this thread Re: Default the Date Picker to Today
    It covers this issue in detail.
    Regards
    Paul

  • Lock characteristic value for configurable material in Sales Order

    Is there a setting in SAP which can prevent user changing characteristic value for configurable material in Sales Order after production order created for this Sales Order? Currently, it can only works when first delivery create for this Sales Order.
    Thanks a lot.

    Hi,,
    in the characteristic goto additional data tab,
    you have a field called not ready for input.
    you select this when the value in this characteristic come by calculation based on the previous selection.
    that field will be greyed out.
    OR
    u can even select the no display check box,
    by selecting this u cant see the characteristic in the list,, it will give u a popup before leaving the screen.
    for this the char has to be a required field.
    OR
    if any of this is not working then may be u can try out with authorization management.
    thanks

  • How to club the downpayment and periodic billing scenario in Sales Order

    Hi experts,
    Could you please let me know how to club the downpayment and periodic billing scenario in Sales Order.
    Requirement is :  If you have 10 lacs total amount and out of that 50% should be the downpayment and rest of the amount should be distributed among three equated  instalments for 2 months each (periodic billing). This should work with one line item in sales order. Pls provide relevant inputs how to work out this scenario.
    Your help would be appreciable.
    regards....Diwakaran

    Hi Yang,
    Workflow is the best approach for any issue related to business objects.
    Since you want call FM BAPI_SALESORDER_CHANGE, it will change SO. It means everytime any SO is changed there will an event being triggered.
    object type: BUS2032
    event: Changed
    simple solution:
    1. Please create object type (SWO1) and its super type should be BUS2032.
    2. Add your own method and attach your custom FM which actually updates the qty & PR)
    3. Create Task (PFTC_INS)
    in basic data:
    - provide object type which you have created
    - provide method which you have added
    goto triggering events tab
    - Choose Object Category as BOR object type
    - provide object type (better give BUS2032)
    - provide event as CHANGED
    Please have look into very nice video blog which helps you to create your workflow.
    blog: [Creating your first SAP Business Workflow]
    Regards,
    Sukhbold Altanbat.

  • How to change the variable value in fox formula?

    Hi All,
        Please help me achieve this scenario,
             in the variable selection screen , i wil give some i/p like, calyear(0calyear) = 2008.
          In planing function using FOX formula, i must be able change the variable value to 2009.
      Will it be possible to achieve this, can we change a variable value using FOX formula, if possible
    please let me knw how to achieve this.
    Thanks n Regards,
    Priya.

    Hi Priyadarshini,
    i dont know what is your requirement exactly.If you can give a better explanation of ur requirement we can help you. But to answer your question yes we can get new values for the variable in the planning function.
    for this you need to couple the planning function together with the planning filter in a planning sequence. This planning filter should have the variable that you wanted to change. In the WAD when you want to call this planning sequence there is an option to call variable screen. If you enable this, it will pop up the variable screen to get this value again.
    Guess this was helpful.
    Regards.
    Shafi.

  • When we run query how it gets the characteristic values and attributes.

    Hi,
    When we load transaction data it chacks characteristic values then SIDs then DIM IDs then insert  DIM IDs into fact table but when we run the query how it checks and gets the characteristic values and attributes.
    Bye
    GK

    when we run the query how it checks and gets the characteristic values and attributes.
    Just the opposite way you have described. It gets from the corresponding masterdata tables, with the connected SID.

  • How to change the RFQ Value

    Hi gurus,
    After I create the RFQ I mantain the value from the vendor in ME47, but what happens if I made a mistake and I want to change the value after creating, there is no change TCode for ME47, any ideas??
    Thanks

    HI ,
    Actually there is no change transaction for maintaining price in the quotation, but still you can change in the same transaction ME47 after key in the RFQ number ,now the price is not in the editable mode. Choose the item which you want to change the price  then Go to ITEM in the top of the screen  then click  Conditions  and choose the date validity .Here you can  change the price.

  • How to change the column value upto 68000 rows

    Hi,
    I want to change the column value.
    I have table called RefDoc
    Select distinct r.int_ref from refdoc r where r.int_ref like '\\dxb%'
    Int_Re__f
    \\dxb\Sample\BFE B777\2008\PO2025225.tif
    \\dxb\Sample\RO\SFR\26-01-2009j\RO2022098.pdf
    \\dxb\Sample\RO\SFR\26-01-2009j\RO2040831.pdf
    \\dxb\Sample\BFE B777\2008\PO2025253.tif
    \\dxb\Sample\RO\UM INV\26-01-2009\RO2018358.pdf
    up to 68000 rows
    I want to change to \\AUH instead of \\dxb.
    I want the table like
    Int_Re__f
    \\AUH\Sample\BFE B777\2008\PO2025225.tif
    \\AUH\Sample\RO\SFR\26-01-2009j\RO2022098.pdf
    \\AUH\Sample\RO\SFR\26-01-2009j\RO2040831.pdf
    \\AUH\Sample\BFE B777\2008\PO2025253.tif
    \\AUH\Sample\RO\UM INV\26-01-2009\RO2018358.pdf
    Thanks
    Nihar

    user REPLACE function and change it
    UPDATE refdoc
       SET int_ref = REPLACE(int_ref, '\\dxb\', '\\AUH\')
    WHERE int_ref like '\\dxb\%'

  • How to change the initial value of the list.

    Hi,
    I have to change the initial value of the list.In the 'When-new-block instance' trigger, i wrote the following:
    set_item_property(list_id,initial_value,
    '2000');
    But when I run the form, it says this property is not recognised.
    I need to change the initial value.
    Please help me out.
    Thanks
    Viji.

    Do you mean the default value ?
    Set_item_property('list_item_name', default_value,2000);

Maybe you are looking for

  • I cannot find how to open tabs from other computers.

    Both of the computers have been set to sync tabs, and they seem to sync bookmarks and history fine. I am using Beta 4 Version 7.

  • System runs like a 3 legged horse in windows me ?

    when running under windows xp with all drivers updated i can get 13800+ on 3dmark 2001 se but the games i play crash a lot when playing. when i install windows ME (all updated drivers again) im lucky to get 9500 on the test but the system is rock sta

  • Hiding Application Component -Support message creation F4 help

    Hi, How to hide the component 'Access Controls GRC-AC' in F4 help while creating support message . Regards PK

  • Need help in join

    hi, Following are my columns data in same table, Value1 Value2 1 1 2 2 3 4 1 3 My output sould be as like follows value 1 2 3 4 so please help me on this logc by proving sample query

  • "Show Panels" (F4) doesn't work

    I already uninstalled and reinstalled Dreamweaver CS6.  Didn't help.  Followed the instructions here related to deleting the cache.  Didn't work. Please help!  I really need to be able to toggle those panels to have more screen real estate.  It's dri