"How to pass classification characteristics while creating batch" ?

Hi,
    I am using FM's BAPI_BATCH_CREATE/CHANGE while creating/changing batch I have to maintain classification data aswell.But in FM docu i saw as shown below
1.Create the classification of a batch in the background (object characteristics only)
2. If the batch is to be classified, you must specify a class in the BatchControlFields parameter. Only single classification is possible.
  According to above statments I have passed class name in Batch Control Fields but I am unable to find " How to pass classification characteristics while creating batch". Please tell me how to pass classification characteristics in background?
Edited by: Vijay Babu Dudla on Dec 16, 2008 3:24 AM

Hi, You can update classification for a batch using the following code.
But first, you'll need to find out that the batch management is cross-plant or plant dependant.
If it is cross plant then plant(WERKS) is not part of the key to BAPI_OBJCL_CONCATENATEKEY.
CLEAR: objectkey, objectkeytable, objectkeytable[],
           allocvaluesnumnew, allocvaluesnumnew[],
           return.
    objectkeytable-key_field = 'MATNR'.
    objectkeytable-value_int = matnr.
    APPEND objectkeytable.
    objectkeytable-key_field = 'CHARG'.
    objectkeytable-value_int = charg.
    APPEND objectkeytable.
* Only if Batch management is Plant dependant
    objectkeytable-key_field = 'WERKS'.
    objectkeytable-value_int = werks.
    APPEND objectkeytable.
    CALL FUNCTION 'BAPI_OBJCL_CONCATENATEKEY'
      EXPORTING
        objecttable    = objecttable
      IMPORTING
        objectkey_conc = objectkey
      TABLES
        objectkeytable = objectkeytable
        return         = return.
    allocvaluesnumnew-charact = "characteristic name goes here".
    allocvaluesnumnew-value_from ="characteristic value goes here".
    APPEND allocvaluesnumnew.
    allocvaluesnumnew-charact =  "characteristic name goes here".
    allocvaluesnumnew-value_from =  "characteristic value goes here".
    APPEND allocvaluesnumnew.
    CALL FUNCTION 'BAPI_OBJCL_CHANGE'
      EXPORTING
        objectkey                = objectkey
        objecttable              = 'MCHA' " MCH1 in case of cross-plant batch management
        classnum                 = classnum " Classification class number, as used in MSC2N
        classtype                = classtype " Classification class type, as used in MSC2N
*   STATUS                   = '1'
*   STANDARDCLASS            = STANDARDCLASS
*   CHANGENUMBER             = CHANGENUMBER
*   KEYDATE                  = SY-DATUM
*   NO_DEFAULT_VALUES        = ' '
* IMPORTING
*   CLASSIF_STATUS           = CLASSIF_STATUS
      TABLES
        allocvaluesnumnew        = allocvaluesnumnew
        allocvaluescharnew       = allocvaluescharnew
        allocvaluescurrnew       = allocvaluescurrnew
        return                   = return
* Do not forget to commit, otherwise changes would not take effect.
commit work.
Regards,
Hashir Ahmed

Similar Messages

  • AIX 5.2 : how to pass password value while creating a user on AIX server

    Hi ,
    Test connection is successful with AIX server , I can successfully create a user on AIX server, with defualt password.
    I am not passing the any password value still some default value is being populated for the user...
    In AIX while creating the user , use get force to set the password...
    But while configuring the schema for AIX adapter ...if password attribute is given then it will give the error
    as invalid attribute...while creating a user if password value pass...
    how to set the password for the user..what attribute need to set for the password .
    thanks ..

    The default password might be the IdM account password of the user you are trying to provision. You don;t need to keep password in the resource schema. Just set password.password and password.confirmPassword and select AIX resource for password reset. Check the workflow-form-views document for more information on password view.

  • How to add invoices while creating Batch Payment in Oracle Apps R12

    Hi all,
    how to add invoices while creating Batch Payment in Oracle Apps R12
    Thanks

    Can you elaborate your problem in detail ?

  • How to give network path while creating oracle directory.

    I have created
    CREATE OR REPLACE DIRECTORY TESTDIR AS '\\168.176.33.117\TESTDIR';
    but through this path i m not able to create text file.
    create or replace procedure WriteTest is
    f utl_file.file_type;
    s varchar2(200) := 'this is some info';
    begin
    f := utl_file.fopen('TEST2DIR','sample2.txt','W');
    utl_file.put_line(f,s);
    utl_file.fclose(f);
    end WriteTest;
    Help how to give network path while creating oracle directory.
    --when i give local machine path then it will create at local machine where oracle is installed. but not able to create at other machine.
    Zakir

    Well for starters your directory object is called TESTDIR and in your fopen statement you are referring to TEST2DIR.
    On top of that I'm not sure oracle is happy to refer to network locations. I think you have to map it to a regular drive mapping (shared directory) type path. Can't say I've every tried to do it though.

  • How to add image file while creating addon...pathsetup?

    Hi friends,
    i have a problem while creating addon.
    while creating addon we can add all the files(.vb,xml).but if i add image files(.bmp,.jpg)they are not displayed in runtime.
    --how to add image file while creating addon..?
    we are useing SAP Business One 2005A(6.80.317)SP:01 PL:04

    Somebody knows like I can indicate to him to a button that I have in a form, that accedes to the image in the route where will settle addon? I have this, but it does not work to me
    oButton.Image = IO.Directory.GetParent(Application.StartupPath).ToString & "\CFL.BMP"

  • How to control Doublicate Entry while creating GL Master

    HI every one,
    Can any one let me know, how to control Doublicate check while creating GL Master. And also for AR and AP if possible.
    Thank you
    Satish

    Hello Satish,
    You can implement the logic to control duplication of G/L Master records either in
    a) Function Exit EXIT_SAPMF02H_001 available within the SMOD enhancement SAPMF02H
    b) P/S BTE 00002310 (Master Record G/L Account: Save)
    The logic would be to identify if G/L Accounts with same Short/Long Texts already exist in the Company Code.
    Hope this resolves your problem. Please reward points.
    With Regards
    Vijay Gajavalli

  • How to change the characteristics of a Batch

    Dear All,
    We have maintained a batch sort sequence based on Batch Manufacturing date.
    But now customer wants the batch to be sorted out based on Batch Number.
    How to change the Characteristics from Batch Manufacturing date and Batch Number?
    Please do suggest.
    For example, we have two characteristics assigned to the Class One is Manufacturing date and another is Batch Number.
    How system will sort out a batch based on these two logic.
    Kindly explain.
    Regards,
    Mullairaja

    Hi Mullai,
    I hope you know what do you mean by "Dependencies" in variant configuration. These are created for automatic update of characteristic values.  If you want to delete the characteristic from the class, please do teh following.
    1. Find out that there are any dependencies assigned to this characteristic. If so remove the assignment
    2. Then you have to check if this characteristic is used in any dependency in the code. If so, find the implications of the same.
    In case, you dont know what is dependency, may be they are not used in your project. In this case, you can just remove the characteristic from the class.
    It has got one effect.
    At present, a configured batch will have this characteristic. If you go to the batch master in change mode, then the old classification will be replaced by the new classification. So the deleted characteristics will not be available to you anymore. I hope that is fine with you. If this is fine, then you dont need to worry about removing the characteristic from the class.

  • How to add shipping instructions while creating SO

    Hi All,
    I'm using the BAPI_SALESORDER_CREATEFROMDAT1 to create Sales Order.
    I want to add shipping instructions while creating each orders.
    How do I pass this information to the backend with this BAPI?
    Thanks
    Thruna

    Somebody knows like I can indicate to him to a button that I have in a form, that accedes to the image in the route where will settle addon? I have this, but it does not work to me
    oButton.Image = IO.Directory.GetParent(Application.StartupPath).ToString & "\CFL.BMP"

  • Error while creating batches:Invalid organization in OPM inventory calendar

    Hi,
    While creating new batches for an intermediate some items, the user is getting the Error: "The Organization was found to be invalid while trying to validate the OPM Inventory Calendar". Everything is fine with the setup of OPM item, calendar, formula,recipe. This item is a non-dual and hence no item UOM conversion is required.Plant-Warehouse relationship is set at item level.If anyone has encountered this error,please throw some light on it.Thanks

    Hi
    I think you have might have missed the MAC set up in OPM financials.....pl make a set up and check.
    Thanks
    Raj

  • How to capture an error while creating a purchase requisition

    Hello All,
    I append 50 line items while creating a PR using BAPI_REQUISITION_CREATE and I get an error in RETURN.
    So can I capture the line item which exactly has that error.
    I mean to say how to figure out the line item with error, if the BAPI gives an error.
    Please suggest.
    Thanks & Regards,
    Tarun Gambhir

    I could not find TEST_RUN option in these bapis
    Roundway will be
    1. Use BAPI_REQUISTION_CREATE with single line item  and create PR then take the requisiton number
    2. Use ME_UPDATE_REQUISITION. and add line by line into same PR (Within loop)
    BAPI_REQUISITION_CHANGE can only be possible to edit existing line and you cannot able to add new lines,
    a®s
    Edited by: a®s on Jul 29, 2009 11:13 AM

  • How to assign a seq while creating a table

    Hi,
    How to assign a sequence such that i dont want to give the sequence while creation. i mean
    if employee table is there
    sl_no empname salary .....
    i dont want to give sequence while inserting the data, i want to give the sequence at creation of table level for sl_no
    i tried this
    create table seqtest1 (id number primary key default rajseq.nextval);
    but it is showing me the error
    ERROR at line 1:
    ORA-00907: missing right parenthesis
    whats the solution
    please help me
    Thank you
    Raj deep.A

    Hi Raj,
    You can not assign a sequence to a column while creating a table. you have two options for this. (So you can also use one sequence for multiple tables)
    1. As Gasparotto said, you can create a before insert statement. OR
    2. you can assign new sequence number in the program code. for example.
    insert into xxx (user_id,name,surname) values (seq_userid.nextval,'Raj','Deep');
    Good Luck.
    Onur

  • How to add Trip reason while creating a Travel request

    Hi,
    I want to add Trip reason while creating a Travel request . I have not been able to maintain FTPT_REQ_HEAD through sm30. Urgent help required

    Hi,
    There is no customizable table for travel reason
    FTPT_REQ_HEAD is not maintanable
    This is standard SAP, and in field REQUEST_REASON you can enter the description that you want and system will allow you do that. The same thing with field " 1st destination"
    You add any description and it will be recorded and available for next entries in TP04
    Hope this answer to your question
    Best regards
    Tarek

  • How to confirm a TO while creating in Backgrd mode

    Experts -
    I'm creating a Transfer Order in a Background mode on LT01, I want the TO should be auto confirm. So that when I display the created TO again it should look like TO-Confirmed....
    Do I need to do any coding in the User-Exist?
    Thanks for ur advise.
    James....

    Thanks John for your quick reply.
    My problem is the Movement type for the TO is not configured for auto confirmation and TO needs to be created under background mode.
    So I need to confirm the TO while creating it in the background mode without customizing in SPRO for the movement type.
    Thanks for ur advise....
    Thanks
    James....

  • How To Hide A Field While Creating PO.

    Hi,
    Please Give me the solution of my problem. As I want that NoBody Could Change The Description of the related Material code  which comes under Text Field Both while creating/changing  PO.

    Hi,
    Try to maintain PO master data.
    1. Go to tcode SM31, table view V_162, choose Maintain.
    2. Select ME21N --> Detail.
    3. In the field selection group --> choose Basic data, item
    4. Line item Material Description --> tick Display instead of Opt entry
    5. Choose Back button, again, then Save
    You should have your Short text field in ME21N as display only, once you have enter the Material.
    Hope this help.
    regards,
    rob

  • How to pass multiple values while invoking bpel process from ADF?

    Hi,
    I want to call a bpel process from my ADF application. The bpel process is having one input parameter. I have created webservice data control by using WSDL url.
    Lets say, I have an Emp multi select table. I drag and drop the data control into Emp table selection facet to create an "Invoke" button.
    I am able to pass single value (lets say Empid) to the bpel process after clicking the "Invoke" button.
    But, my requirement is to pass all the selected values ( as its a multi select table) to the bpel process after clicking the "Invoke" button once.
    How can I achieve this?
    --Abhijit                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Hi,
    if the BPEL method that you access allows you to pass arrays or lists, then you can get a list of selectedRowKeys from the table, which then you use to get the value from the underlying binding or the table. This however requires some Java coding instead of directly invoking the executable on the binding layer
    - you create the BPEL method in the binding layer
    - from a Java managed bean you call ADFBindingContext --> get current instance and access Binding container
    - OperationBinding oper = (OperationBinding ) bindings.get("method to invoke");
    oper.gerParamsMap().put("the BPel argument name", value);
    oper.execute();
    - To access the table selected rows
    RowKeySet rks = _table.getSelectedRowKeys();
      //iterate over the set of selected row keys and delete
      //each of the found rows
      Iterator selectedRowIterator = rks.iterator();
      while (selectedRowIterator.hasNext()){
        //get the first key
        Object key = selectedRowIterator.next();
        //make the row current
        _table.setRowKey(key);
        //the row is an instance of the ADF node binding class
        JUCtrlHierNodeBinding rowWrapper = null;
        rowWrapper = (JUCtrlHierNodeBinding) _table.getRowData();
        //get the actual oracle.jbo.Row object
        Row row = rowWrapper.getRow();
        ... get attribute values by calling row.getAttribute("name"); assuming you used ADF BC to build the tableFrank

Maybe you are looking for