FM / BAPI to update STEUC field in marc Table basing on material and plant

Hi,
I need to to update STEUC field in marc Table basing on material and plant. please suggest FM / BAPI.
Thanks.
raviraj.

Hi
Try this BAPI function module:
" BAPI_MATERIAL_MAINTAINDATA_RT "
Data: LS_HEADDATA TYPE BAPIE1MATHEAD,
         LS_RETURN TYPE BAPIRETURN1,
          LT_PLANT TYPE TABLE OF BAPIE1MARCRT,          LS_PLANT TYPE BAPIE1MARCRT,
          LS_PLANTX TYPE BAPIE1MARCRTX,          LT_PLANTX TYPE TABLE OF BAPIE1MARCRTX.
        CALL FUNCTION 'BAPI_MATERIAL_MAINTAINDATA_RT'
               EXPORTING
                   HEADDATA   = LS_HEADDATA
               IMPORTING
                   RETURN     = LS_RETURN
               TABLES
                   PLANTDATA  = LT_PLANT
                   PLANTDATAX = LT_PLANTX.
Check the PLANTDATA in the above fm in which pass your ''STEUC'' to BAPIE1MARCRT-CTRL_CODE......
Hope this works.....

Similar Messages

  • Update Z field in MARC table by MM02

    Hi,
    i have some Z fields in MARC table,
    it,s showsin MM01 MM02 and MM03 Tx.
    When I change the values of any of this fields they dont save the change in the DDBB.
    this fields are included in MARC with Append structure.
    How can i Update it,
    Thanks

    Hi J,
    If your custom fields are there on the screen (MM01/02/03) and they are appended in some structure in MARC table, the values should flow from screen-to-table and vice-versa.
    If you want these fields to be populated automatically, you may have to write some code in user-exit or BAPI extension while creating the materials.
    In the user-exit, you may have to write a code like this ..so that these fields remain uneditable while calling MM03 (display only)
    IF T180-TRTYP EQ 'A'.
    LOOP AT SCREEN.
    SCREEN-INPUT = '0'.
    MODIFY SCREEN.
    ENDLOOP.
    EXIT.
    ENDIF.
    Edited by: Rudresh Chand on Jan 26, 2011 9:03 PM
    Edited by: Rudresh Chand on Jan 26, 2011 9:25 PM

  • How to update a custom field of MARC table using BAPI_MATERIAL_SAVEREPLICA

    Hi,
    I want to update a custom field (Appended field) of MARC table using  BAPI_MATERIAL_SAVEREPLICA. Please help me in this issue. I cannot use BAPI_MATERIAL_SAVEDATA as this updated the MARC table record by record. I have to update bulk records at a time.
    Thanks
    Rahul.

    Hi,
    Use the Documentation given for struture in BAPI docuemntation...
    For loading data into custom fields of MARC use the structure - BAPI_TE_MARC.
    First, structures BAPI_TE_<NAME> (<NAME> = MARA, MARC, MARD, MBEW, MLGN, MLGT, MVKE, MARM, MAKT) and the appropriate check structures BAPI_TE_<NAME> (<NAME> = MARAX, for example) have to be extended by the customer to include the required fields. The structures that are delivered as standard only contain the relevant key fields. When new fields are added to this structure, you should ensure that a field has the same name as the field in the database table. Furthermore, the fields in the structures BAPI_TE_<NAME> can only be CHARACTER fields. Data element BAPIUPDATE is to be used for the fields in the check structure (exception to this: key fields.)
    Parameters EXTENSIONIN and EXTENSIONINX are used for transferring data to the method. Field STRUCTURE contains the name of the structure (for example, BAPI_TE_MARA or BAPI_TE_MARAX). This names is used to identify the work area (for example,  WA_BAPI_TE_MARA or WA_BAPI_TE_MARAX) to which the data is transferred. The remaining fields in parameters EXTENSIONIN or EXTENSIONINX contain data for the key fields (for example, the material number) and the data for customer-specific fields. The number of characters reserved in both parameters for the contents of the customer-specific fields must match the number of characters for the relevant field in the work area. If the number of required characters is less, the remaining characters are left blank. Only when all characters have been filled can the contact for an additional field be transferred. Bear in mind that only data for which an appropriate indicator has been set in the work area can be updated to the database.
    Regards,
    Bhargava

  • Updating the CUstomer fields in mARC table using BAPI_MATERIAL_SAVEREPLICA

    Hi friends,
    I want to update the Zfields in MARC table .Please provide me the details for updating these fields (Extension in bapi) Using the  BAPI_MATERIAL_SAVEREPLICA
    Thanks in advance

    Hi Varsha,
    There is documentation provided for this funtion module:
    If long texts (for example, basic data texts, internal notes, purchasing info texts, material notes or sales and distribution texts) or customer-specific fields have to be created for a material, some specific characteristics have to be taken into consideration. These characteristics are detailed in the documentation for parameters MATERIALLONGTEXT and EXTENSIONIN.
    Documentation is present for the parameters by clicking on EXTENSIONIN, EXTENSIONINX
    Regards,
    Swarna Munukoti

  • Bapi or function module to update rstgr field in bseg table

    what is the bapi or function module used to update the fields in bseg table particularly "rstgr" field?

    Hi,
    Use Bapi
    BAPI_ACC_DOCUMENT_POST
    Regards,
    Prashant

  • Update Profit Center in MARC Table

    Req is to update Profit Center in MARC table.So let me know any BAPI or function module for Mass Upload to change profit center.
    Thanks
    Suresh

    Hi Suresh,
    For MARC table data change you should use BAPI_MATERIAL_SAVEDATA as it is data related to Material number.
    Regards,
    Atish

  • Update stceg field in mdkp table

    Hello ,
      Can anybody tell me the name of function module or BAPI which update data in MDKP table.
       In md06 transaction i want to update the process indicator flage for 3000 materials based on plant so any function module or BAPI which updates this field?
    Regards
    srinivas

    Hi Srinivas ..
    If you want to Set the Processing Flag for all the Materials based on a Plant.
    Goto Tcode MD06.
    you can See 2 Tabs:<b> Individual Processing</b> and <b>Collective processing.</b>
    Select the Collective processing flag Tab .
    Here you can enter the Plant and Set the Flag.
    So this flag will be Set for all the Materials under this Plant...
    If u still need a program for this u can do the Recording and create a BDC.
    Hope this gives u the Solution.
    <b>Reward if Helpful</b>

  • Update XARCH field in BSIS table

    Hello Experts,
    Need to update XARCH field in BSIS table . I know using update in program is not recommended .
    Please advice if there is a function or BAPI to do this. We are using ECC 6.0
    Thanks,
    Murtuza.

    Hi
    Check This BAPI
    BAPI_ACC_GL_POSTING_POST
    Ranga

  • How to update the field ZLSPR of table BSEG

    HI Friends,
    Can anyone tell me how to update the field ZLSPR of table BSEG? I've a 700 line abap program and I should include some logic in this program to make an entry into BSEG-ZLSPR. Is there any FM/BAPI available? Is BDC a healthy approach?. My team lead do not want me to use UPDATE statement....please help.
    Thanks in advans,
    Varsha.

    Hi,
    Hi ,
    You will need to group that radiobuttons so that SAP knows they are linked together. To do this using the grahical layout editor simply select all the radiobuttons and then right click on them, Now choose define group. Once you have done this you should not need any of the "clear" or "='X'" statements SAP should control it all for you.
    hope this helps
    Reward if found helpfull...
    Venkoji Babu.

  • Ideal way to update a field in a table

    Hi All,
    We need to update a field in a table which have some 8 million records.
    The value of the field needs to be updated in all the above mentioned records.
    Now, we have an input file with all the primary key fields and the field to be updated.
    Can any one suggest the ideal way to update the field.
    1.     Updating the database for each record.
    Loop at itab.
    Update…….
    Endloop.
    2.     Updating the database with a set of 100 records.
    We are planning to schedule the job in the background.
    Thanks for your help.
    Regards,
    Krishna

    Hi,
    be very carefull with the update, ´cause you can damage 8 million records !!
    You better use instruction Update for this:
    update mytable set field = value where conditions.
    Try to use all key fields in the conditions and never use something like
    update mytable set: field1 = value1
                        field2 = value2
                        field3 = value3 where conditions.
    The loop in your case 1 is not absolutely necessary, ´cause you update a whole bunch of records at once with the conditions in Update.
    Test the changes in the development system before you do it in production

  • Update 2 fields in 1 table

    I need to update an Oracle 8i database. I need to update 2 fields in 1 table with about 2,000 rows of data.
    Right now the date is stored in an Excell file in columns A and B.
    I need Something like:
    Update Table1
    set field1 with value from A:1,
    set field2 with value from B:1
    repeated with A:2,B:2 and so on

    I believe you could use sql loader to get your excel file in but here is a way I cheat to do it.
    I save the excel file as a comma deliminated file (I think it is .csv)
    then I open it up and copy and paste it into the following. (the part that says paste flat file here)
    this is assuming 8i supports model clause I'm unsure on that point.
    create or replace view view_xl_file_to_table as
    select * from
    with t as (select
    --- copy paste your flat file here
    ' Bob,Jones,12345,Employee
      Fred,Thebes,32,Manager
      John,Smith,12,Employee
      Karl,Cane,432,Employee
      George,Johnson,54,Manager
      ' flat_text_file from dual
    select flat_text_file text_file_turned_into_row,
            substr(flat_text_file, 1, instr(flat_text_file,',',1,1)-1) col1, -- get text up to the first comma
            substr(flat_text_file, instr(flat_text_file,',',1,1)+1, instr(flat_text_file,',',1,2) - instr(flat_text_file,',',1,1)-1  ) col2, --2nd comma
            substr(flat_text_file, instr(flat_text_file,',',1,2)+1, instr(flat_text_file,',',1,3) - instr(flat_text_file,',',1,2)-1  ) col3, --3rd
            substr(flat_text_file, instr(flat_text_file,',',1,3)+1, instr(flat_text_file,',',1,4) - instr(flat_text_file,',',1,3)-1  ) col4,
            substr(flat_text_file, instr(flat_text_file,',',1,4)+1, instr(flat_text_file,',',1,5) - instr(flat_text_file,',',1,4)-1  ) col5,
            substr(flat_text_file, instr(flat_text_file,',',1,5)+1, instr(flat_text_file,',',1,6) - instr(flat_text_file,',',1,5)-1  ) col6,
            substr(flat_text_file, instr(flat_text_file,',',1,6)+1, instr(flat_text_file,',',1,7) - instr(flat_text_file,',',1,6)-1  ) col7
      from t
    -- first turn the carriage return into seperate rows
    model return updated rows
    dimension by (0 d)
    measures (flat_text_file, 0 position_of_return )  -- the position of return is where the next carriage return is
    rules iterate(1000) until position_of_return[iteration_number+1] = 0
    position_of_return[iteration_number + 1] = instr(flat_text_file[0],chr(10),1,iteration_number + 1), -- find the next carriage return
    -- get the text between the previous carriage return and the next and make it a row
    flat_text_file[iteration_number + 1] = replace(substr( flat_text_file[0],
                                                position_of_return[iteration_number],
                                                position_of_return[iteration_number + 1] - position_of_return[iteration_number]
                                               ),chr(10))||',' 
    )now I have a view and I could anything I want with it and I just drop it when I'm done.
    Edited by: pollywog on Apr 19, 2010 7:57 AM

  • Update a field in bseg table

    Hi experts,
    i want to update a field in BSEG  table (field name is BUPLA).
    Using UPDATE statement i am going to update the bseg table.
    I know only update statement.
    This my immediate requirement.
    please give me suggesstion.

    Hi,
    If you want to update the existing table record or field.. it is always advisable to use MODIFY statement instead of  UPDATE.
    syntax: 
    fetch the BSEG data to internal table IT_BSEG and do you modificaltions.
    Loop at it_bseg.
        it_bseg- XYZ = 'ABC'.
        it_bseg-UVW = '123'.
       modify it_bseg transporting XYZ  UVW .
    endloop.
    MODIFY BSEG FROM TABLE IT_BSEG   (here it_bseg is the internal table)
    COMMITWORK.
    Modify always check in the database whether the record exists or not if it is there it will modify the existing one.. otherwise create a new record.... in Update statement.. there is always a chance of creating a new record.. instead of updating the existing one...

  • Update a field in the table

    I am new to adf. I am trying to update a field in the table which is parent in adf tree
    I had created a adf tree table
    My Scenario:
    => If i selected the Parent row and after clicking the Post Button
    => A Field in the Parent table should get updated
    which is the best approach to acheive it and how can i acheive it?

    I am getting this error while i try to post the Document
    Error 500--Internal Server Error
    java.lang.NullPointerException
         at comm.rits.glm.view.backing.AGLM1010.cb5_actionListener(AGLM1010.java:259)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.el.parser.AstValue.invoke(Unknown Source)
         at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
         at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1256)
         at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
         at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
         at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:96)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:788)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:306)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:186)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:175)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Edited by: asadrina on Sep 7, 2011 2:42 AM

  • Update a field in a table

    hi,
    i am trying to update a field in a table.
    i need to eliminate the first character in the following field. how would i do that? isn't there a TRIM function?
    srdial (field name)
    12001202307
    12001207581
    12001570282
    12001570281
    after running the function the following should appear..
    srdial (field name)
    2001202307
    2001207581
    2001570282
    2001570281
    how would i do this?
    thanks,
    mark

    LTRIM? Search for it in the Oracle documentation at available at http://tahiti.oracle.com/
    -- CJ

  • Updating EAN11 field in mara table through BAPI_MATERIAL_SAVEDATA

    Hi,
    I want to update EAN11 field in mara table through BAPI_MATERIAL_SAVEDATA could anybody please guide me how to achieve.
    it would be great if is there any sample code for the same.
    Thanks

    Please give the following fields in the lwa_uom structure as well
    lwa_uom -ALT_UNIT
    lwa_uom -NUMERATOR
    lwa_uom -DENOMINATR
    DATA: lwa_uom TYPE BAPI_MARM,
    lwa_uomx TYPE BAPI_MARMX.
    DATA: lt_uomx TYPE STANDARD TABLE OF BAPI_MARM,
    lt_uomx TYPE STANDARD TABLE OF BAPI_MARMX.
    lwa_uom-ean_upc = '123456' " enter the value here
    lwa_uom-ean_cat = 'abcd'.
    append lwa_uom to lt_uom.
    lwa_uomx-ean_upc = 'X'.
    lwa_uomx-ean_cat = 'X'.
    append lwa_uomx to lt_uomx.
    CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
    EXPORTING
    unitsofmeasure = lt_uom
    unitsofmeasurex = lt_uomx.
    Edited by: Rahul Babukuttan on Dec 21, 2011 4:23 PM

Maybe you are looking for

  • MB Pro 08 power up click at DVD, HD

    Strange situation--Leopard with Firefox 5 all updates. Firefox has continually had issues with a dozen tabs open, where there will be spinning ball and lots of page file (VM) thrashing, up to 4 GB or more in a session. Often Firefox would hang on qui

  • Organization Structures For FI and CO

    Hi, Anyone can help me in this. Thanks & Regards Rajani

  • Upgrade from 11.1.0.6.0 to 11.1.0.7.0

    Dear all, In my Production Environement, I need to upgrade my DB from 11.1.0.6 to 11.1.0.7.. I need to tell my client about the downtime ?.. What is the expected time of downtime for this activity and how to know this .. I need one upgrade of 9.2.0.6

  • I just purchased a Radio

    for my van. It has a place for a USB memory stick. Now, I loaded 20 songs on the stick went to play it in the usb port yet only 12 songs play. In other words it goes thru 12 songs then starts all over again to number 1. I called the radio manufacture

  • HT3552 A question about previous purchases.

    I recently upgraded my computer to the windows 8 consumer build, and when doing so I of course lost all my music. If I redownload an album that I have in my purchase history on itunes, will it be free even though it says the price by it where I have