GTS How to get commodity code from material master ? function/ table

Hello,
I have to write a "simple" program in GTS system.    (In SD   Commodity code is field MARC-STAWN  )
The customer wants to enter material numbers ( from x  to y )
and the program should display:
Material--Material text--Commodity codevalidity from--
validity to
4711--Maschine_A--12345678905.08.2006--
31.12.2008
124587444--01.01.2009--
31.12.9999
4712--Maschine_B--5656568901.12.2007--
31.12.2009
(The customer wants to have a look if all Commodity codes in GTS are maintained)
Can someone give me the name of the tables where it is stored in GTS?
Or are there any function calls to get material data?
best regards and many thanks
Norbert
Edited by: Norbert Zanders on Jan 1, 2009 5:08 PM

You have to consider the following tables:
/SAPSLL/PNTPR --> product number and GUID
/SAPSLL/PRCTS --> product GUID and GUID of commodity code
/SAPSLL/CTSNUM or /SAPSLL/CTSNUMC--> commodity code (general or country specific)
/SAPSLL/CTSNUMT --> commodity code description
/SAPSLL/PRT --> material description

Similar Messages

  • How to change commodity Code for material grp in certain plant

    Hi,
    I would like to change commodity code for some material group under certain plant
    May I know how to do this.
    I went to the following SPRO path, however, the table does not mention the plant and the material group for me to change.
    SD>Foreign Trade/Customs>Basic Data For Foreign Trade>Define Commodity Code/Import Code Numbres by Country.
    Please let me know.
    Thank.
    Tuff

    Hi,
    Commodity codes are define at country code level not on basis of plant or material group
    Weather it is one plant or many plants belongs from one company or different companies the commodity code is unique and it define by country legal authorities which are responsible for foreign trade.
    You can add commodity code for country and then you individually or by mass change you can change in material master.
    Kapil

  • How to get company code from Shipment

    Hi,
    I am working on a user exit on shipment (VT01N). I have shipment data. I have to get the value of KVERMfield from LFB1 table. There are multiple entries in LFB1 table with same Vendor with different company codes. How should i find the correct "Company Code" from shipment?
    Please help.
    Thanks,
    Mohammed Ibrahim

    Hello,
      in table VTTK  you have field "TransportPlanningPt" VTTK-TPLST. Get this value then enter in the customizing table TTDS, where the TransportPlanningP is assigned to the Company code.
    Hope to be useful.
    Best regards,
    Andrea

  • How to get company code using material number

    Dear all,
              I have material number & plant on selection screen, but how do I get the company code details using MARA-MATNR ?

    HI,
    You can use a cmobination of T001K and MARC Table.
    T001K table is assignment of Plants to a company code and MARC is a table with combination of Material and Plant.
    Regds,
    Anil
    Edited by: Anil Katoch on Jul 23, 2009 6:24 AM

  • How to get exit code from C code when calling java method via JNI?

    Hi, All
    in my project, i need to call a java method from C code using JNI, yet I do
    not know how to
    retrieve the exit code of java program. the java code is like below
    public static void main(....)
    if(error){
    System.exit(-77);// the exit code is -77
    and the JNI c code may like below
    /* Invoke main method. */
        (*env)->CallStaticVoidMethod(env, mainClass, mainID, mainArgs);
    //here I want to retrieve the exit code from java to check if there is an
    error
    any suggestions? thanks

    Hi Liang Zhang,
    In your C code add:
    void (JNICALL y_exit)(jint code) {
    and when you are initialazing JVM options add:
    JavaVMOption options[...];
    options[...].optionString = "exit";
    options[...].extraInfo    = y_exit;
    See http://java.sun.com/j2se/1.3/docs/guide/jni/jni-12.html
    Best regards, Maksim Rashchynski.

  • How to get trigger code from the schema into a file

    Please help me in getting code of any trigger from the schema, without using any data dictionary views.

    In fact you can get the trigger code by using tools like toad,sql developer
    But all are using the data dictonary view to get the code .

  • How to get MDX code from Smartview query

    Hello everybody:
    I would like to know how to obtain the MDX code when I am performing a query from Smartview. How can I find out what sentence the Provider Service sends to Essbase when doing any operation in Smartview?
    Thank you
    Regards
    Javier

    you might want to use the HypQueryMembers vba call with it you can query the outline directly for a lot of things including User defined attributes
    Here is the code sample from the VBA reference (it is available in Excel by going to the add-ins menu and selecting Hyperion Help
    Description
    HypQueryMembers() executes the member selection query.
    Syntax
    HypQueryMembers (vtSheetName, vtMemberName, vtPredicate, vtOption, vtDimensionName, vtInput1, vtInput2, vtMemberArray)
    ByVal vtSheetName As Variant
    ByVal vtMemberName As Variant
    ByVal vtPredicate As Variant
    ByVal vtOption As Variant
    ByVal vtDimensionName As Variant
    ByVal vtInput1 As Variant
    ByVal vtInput2 As Variant
    ByRef vtMemberArray As Variant
    Parameters
    vtSheetName: (string) Text name of worksheet to operate on. vtSheetName is of the form "[Book.xls]Sheet". If vtSheetName is null, empty, or invalid (nonexistent or name does not match exactly), the active sheet is used.
    vtMemberName: (string) The member name on which to perform the query.
    vtPredicate: (integer) Member selection criteria:
    1 HYP_CHILDREN
    2 HYP_DESCENDANTS
    3 HYP_BOTTOMLEVEL
    4 HYP_SIBLINGS
    5 HYP_SAMELEVEL
    6 HYP_SAMEGENERATION
    7 HYP_PARENT
    8 HYP_DIMENSION
    9 HYP_NAMEDGENERATION
    10 HYP_NAMEDLEVEL
    11 HYP_SEARCH
    12 HYP_WILDSEARCH
    13 HYP_USERATTRIBUTE
    14 HYP_ANCESTORS
    15 HYP_DTSMEMBER
    16 HYP_DIMUSERATTRIBUTES
    vtOption: (integer) Options are dependent on the predicate:
    For the predicate values, HYP_SEARCH and HYP_WILDSEARCH, specify query options: HYP_MEMBERSONLY
    HYP_ALIASESONLY
    HYP_MEMBERSANDALIASES
    vtDimensionName: (string) Dimension to limit the scope of the query. It is used with the following query options and ignored otherwise: HYP_NAMEDGENERATION, HYP_NAMEDLEVEL, HYP_USERATTRIBUTE HYP_SEARCH (set to Null to search through all dimensions), HYP_WILDSEARCH (set to Null to search through all dimensions).
    vtInput1: (string) Input string that is determined by the option. It is used with the following query options and ignored otherwise:
    HYP_NAMEDGENERATION (The name of the generation)
    HYP_NAMEDLEVEL (The name of the level)
    HYP_SEARCH (The string to search for. The string is defined as an exact)
    HYP_WILDSEARCH (The string to search for. The string is defined as an exact search string with an optional '*' at the end to mean any set of characters)
    HYP_USERATTRIBUTE (The user-defined attribute)
    vtInput2: (string) Input string that is determined by the option. It is used with the following query options and ignored otherwise:
    HYP_USERATTRIBUTE (The user-defined attribute)
    HYP_SEARCH, HYP_WILDSEARCH (If the options are set to search in the alias tables, this string specifies which alias table to search. If the string is Null, all alias tables will be searched).
    vtMemberArray: Output that contains the result of the query. If unsuccessful, its contents are unknown.
    Return Value
    Returns a zero if successful; otherwise, returns the appropriate error code.
    Example
    Declare Function HypQueryMembers Lib "HsAddin.dll" (ByVal vtSheetName As Variant, ByVal vtMemberName As Variant, ByVal vtPredicate As Variant, ByVal vtOption As Variant, ByVal vtDimensionName As Variant, ByVal vtInput1 As Variant, ByVal vtInput2 As Variant, ByRef vtMemberArray As Variant) As Long
    Sub QueryMembersEmptyValues()
    vtRet = HypQueryMembers(Empty, Null, HYP_WILDSEARCH,
         HYP_MEMBERSONLY, "Year", "J*", "", vt)
    If IsArray(vt) Then
    cbItems = UBound(vt) + 1
         MsgBox ("Number of elements = " + Str(cbItems))
    For i = 0 To UBound(vt)
         MsgBox ("Member = " + vt(i))
    Next
    Else
    MsgBox ("Return Value = " + Str(vt))
    End If
    End Sub

  • How to get source code from portal app

    Hi,
    I have a successful Web dynpro portal application running, which I would like to modify. We lost the source code. Is there any way that I can get the source code from the portal?.
    Thanks and I appreciate your help.
    /Sunita.

    Hi,
    You can extract class files from app.jar and decompile it(.ear->.wda) but it is only generated classes without metadata. Metadata is stored in .wda file but format is not compatible with studio. That all options you have.
    Go through the following links, it will be helpfull to you
    Some of the solutions provided in it
    [Re: Retrieve the source code from .EAR;
    [Restore source code from ear file;
    Regards
    Raghu

  • How to get Valuation class in Material master?

    Dear all,
                I want to have valuation class in my report and i want to take is as a material attribute.Actually i have check all the attribute of material master but valuation class is not there. i am having valuation class as a master data as individual . How can i get the valuation type in the Material master?I need it in Material master only.
    Regards,
    Macwan James

    Dear venki,
    To change Valuation class you must have zero stock in the current period, and zero stock at the end of the last period, plus no open PO lines .  flag for deletion all open PO lines,
    Regards
    shankar

  • How to remove any view from material master

    Hello guys,
       Actually we can attach the view to material master by MM01 and also by MM50.
       Now,consider this, in my company even we sale the semifinished material along with the finished material.So we have attached the sales view to semifinished material and finished material.Now my company has decided to not to sale the semifinished material.So there is no sense in keeping the sales view in material master of semifinished material.So we want to remove the sales view from the material master of semifinished material.
         So could you guys help me out to do this?

    Hi
    From the config for Material type attributes you can change the views relevant to Material type means you can unselect the sales views - that will definately take care of the new materials that will be created. But for the existing one's and the data is something you need to see and investigate
    I would advice you to check all the aspects in dev client and then take a decision.
    Thanks

  • How to get the data from 2 out ports (tables) of BAPI into one table

    I have a BAPI that has two out ports (header and detail). How do I display this data in one table.
    Thanks,
    Subba

    Hi,
    you have the Union operator to merge multiple datasets into one dataset
    regards Tobias

  • How to get the result from graph  based on table prompt?

    I have one report in which I am having one table and three Graphs. I have added table prompt for one column i.e department. In that I have given three values. The values of my table changes as per the table prompt. But my requirement is my graphs should show me the result as per the selection of departments in table prompt. Please give me the solution for the same.

    Hi,
    Create a event channel the table view and refer the same channel name in the graph properties.
    Edit Graph --> Edit properties --> Enable Master-Details Events --> Give the channel name.
    It will work for the selection of table .
    Mark if helps.
    Raja Mohamed

  • How to get selected row from a non-bind ADF table

    Hi,
    I have an ADF table that is based on a collectionModel built programmatically. The collectionModel is this:
    model = new SortableModel(new ArrayList<ArrayList>());
    Hence, it is not a binding table. My question is how to get the selectedRows from a non-bind table.
    I am used to building binding ADF table and I know we can get it from voiterator.getCurrentRow, since the selectionListener is set to the binding....collectionModel.makeCurrent
    <af:table value="#{bindings.ItasLookupTypesVO1.collectionModel}"
    selectedRowKeys="#{bindings.ItasLookupTypesVO1.collectionModel.selectedRow}"
    selectionListener="#{bindings.ItasLookupTypesVO1.collectionModel.makeCurrent}"
    </af:table>
    I am thinking maybe I need to write my own selectionListener, but need more advice/ideas of what's the codes in the customer selection Listener to get it from my SortableModel.
    Please help.
    Thanks
    -Mina

    I'm not sure if this works in your case, but check out the selection listener I write in this blog http://wp.me/pcBZk-eu
    You should use the selection event and check the added set. This should give you access to the selected row.
    Timo

  • How to get PPA Code

    Hi Friends,
                      Can u please let me know how to get PPA Code from ZZ_PPA_C.
    Please help me its urgent.
    Regards,
    Rajiv Kaushal

    What do you mean?
    The restriction code would be whatever you set it to be.
    There is no restriction codeunless you set it.

  • How to get the values from struct data type using java code..?

    Hi ,
    I am newer to java.
    we are using oracle database.
    How to get the data from struct data type using java code.
    Thanks in Advance.
    Regards,
    kumar

    Hi Rajeev,
    To retrieve a FilterContainer you will need to traverse the report structure:
    ReportStructure boReportStructure = boDocumentInstance.getStructure();
    ReportContainer boReportContainer = (ReportContainer) boReportStructure.getReportElement(0);
    FilterContainer boFilterContainer = null;
    if (boReportContainer.hasFilter()) {
         boFilterContainer = boReportContainer.getFilter();
    } else {
         boFilterContainer = boReportContainer.createFilter(LogicalOperator.AND);
    Calling boDocumentInstance.getStructure() will retrieve the entire structure for the document.
    Calling boReportStructure.getReportElement(0) will retrieve the structure for the first report of the document.
    Hope this helps.
    Regards,
    Dan

Maybe you are looking for