Using SDK to wrtie data to Batch UDF fields

Hello All,
Since the Batch Number object does not have a "UserFields" member, I am unable to write data to the UDF fields I've created for batch through the SDK DI. Does anyone know how to do it? Thanks a lot!
Daniel

Dear,
As the udf property is not exposed in Batch object. It's not possible implement it in DI API.
A workaround is to set this settings manually in SAP Business One,
or to develop a UI AddOn which do this steps automatically for you,
but this needs a lot of development effort.
Best Regards,
xiaodan AN
SAP Business One Forums Team

Similar Messages

  • Using a single master data infoobject for multiple fields

    Hello experts. Today I ran un with the following problem: I am modelling an Infocube and will be receiving a flat file with several fields, of which 3 of them give information about sales representatives.
    For each transaction there are 1-3 sales representatives involved, and this is reflected in the file I am going to be loading. If only one representative is involved, it means that he was in charge of a complete negotiation, and his code will be found in all three fields, if two representatives are involved, it means that one was in charge of one part of the negotiation, while the other was in charge of the rest, and according to what they were in charge, their code will appear in one or two of the fields. If three representatives are involved, each one's code will appear on the field corresponding to the part of the negotiation they were in charge of handling.
    I already have the sales representative's codes as master data, but I was wondering how I can have those three fields map into the same InfoObject, if that is possible at all. Maybe in the transformation I map them to the same object? Also, what happens when you create the Data Source? As far as I know, each field in the Data Source must be unique, which makes it impossible to use my ZSALESREP InfoObject for the three fields, at least at Data Source level. What can I do in this case?

    Hi  Pedro Olvera,
    You need 3 infoobjects in datasouce to load 3 different fields.
    If you want load to a single infoobject, you can map accordingly in transformation, bult last field overwrites previous one.
    Its better to maintain 3 fields in cube. Create 2 more sales Reps(ZSALESREP1 & ZSALESREP2) with Reference to ZSALESREP then you no need to maintain master data for ZSALESREP1 & ZSALESREP2.
    Use these 3 fields for modeling.
    Hope it Helps
    Srini
    [Dont forget to close the call by assigning poings.... - Food for Points: Make a Difference through Community Contribution!|https://www.sdn.sap.com/irj/sdn/index?rid=/webcontent/uuid/007928c5-c4ef-2a10-d9a3-8109ae621a82]

  • Using JSPs and passing data from 1 page to the next

    I have an application which has a number of JSPs.
    JSP1 has some fields and buttons.
    One of these buttons is called 'Print'. On pressing this control
    is passed to the next JSP2. In this JSP the data is displayed
    from the database. It is displayed via some TABLE tags, thus giving
    multiple records displayed. There is also a check box against each record and having checked this box - the user can then then press another button which takes the user to another JSP - JSP3 - which gives the user a list of options for printing. They then can do 1 of 2 things - print a report or print some labels.
    I have got this to work where there is only 1 record displayed in JSP2.
    But where more than one record is displayed in JSP2 - JSP3 does NOT
    know how to handle this and says the variable is undefined.
    The code I am using to reference the JSP2 variable is
    var batchNumber = top.opener.document.printTranscript.batchNumber2.value;
    Any help or ideas would really be appreciated.
    Thanx
    Chris

    Hi
    If you are using JavaScript, try putting data in a Hidden field and perform request.getParameter in the next page, Place data in a Delimited fashion when placing into the hidden field, on the next page split these values and place where you want them to be.
    This is a proven method...
    Thanks
    Swaraj

  • Error - InfoObject cannot be used to read master data

    Hi All,
    We am working on mapping objects in a transformation, on some of the transformation I am using the master data attribute to fill the infoobject.  In some cases the mapping happens without incident but in others we are getting the following error
    InfoObject  cannot be used to read master data
    Inside the long text of the message it says:
    InfoObject  does not have the correct attributes to be used to read master data for the target field
    The object is one of the master data attributes, so we are not sure why we are recieving this error?
    We have recieved it with 0COMP_CODE trying to load Fiscal Year Variant and with a non standard enhanced object ZMATERIAL which is a copy of 0MATERIAL with added attributes for Product Class, Product Group and Product Line wich come from the product hierarchy and are populated on the load of the material from product hierarchy.
    Has anyone else had an issue with this error and can you tell us how you fixed it???
    Thank you!
    Caroline

    You received this error for loading 0FISCVARNT (Fiscal Year Variant) because that InfoObject isn't an attribute of 0COMP_CODE (Company Code) and it cannot therefore determine what data to populate based on your input. Instead of using 0COMP_CODE, you may have to enter a constant value for the Fiscal Year Variant if you don't have it in your source InfoProvider.
    When you created ZMATERIAL, did you use 0MATERIAL as a reference so that it would inherit the attributes and texts? If so, Product Class, Product Group and Product Line would have to be attributes of 0MATERIAL. If you didn't reference 0MATERIAL and are loading attributes directly to the custom InfoObject attributes, then Product Class, Product Group and Product Line would have to be attributes in ZMATERIAL in order to use the Use Master Data function for transformations. You may have to derive the values for these different, such as add ABAP for lookup routines.

  • Data mapping to SAP B1 using SDK

    is there any way around to do the data mapping from other system database to SAP B1
    database without using field to field mapping?
    ex: we want to migrate from other system to B1 we need to transfer their old data to a new one..and of course the database structure is not the same..and it would be a lot of task if we migrate their old PO to B1 (i'm thinking using field to field mapping so we must know the data structure from the old system and provide the information needed when we want migrate it to B1)
    is there any thoughts?
    hope u understand what i mean
    PS: all the migrate things is using SDK
    thanks,
    erick

    Hi Erick,
    I think, using DI API should be better.
    I know that, all data in the database is not supported.
    But, most simple idea is,
    1. Get objects from old company database
    2. review the data by SDK (validating and user field mapping)
    3. add modified objects to new company database
    This should be most same, and you can process many process automatically in process 2.
    Hope this helpful for you.
    Hyunil Choi.

  • Calculating batch sizes using past and future data

    Hello all,
    I have been a business analyst for the past 10 years on SAP working in many of the different areas surrounding supplychain.
    I am looking for a way of ensuring that the business that I am working in are ordering parts in the most efficient batch sizes.
    Is there a way in which I can use past consumption, order data and future demand to determine any adjustments that need to be made in the current batch sizes that we use.
    Thanking you in advance,
    Mark

    check this:
    http://help.sap.com/erp2005_ehp_04/helpdata/EN/f4/7d27eb44af11d182b40000e829fbfe/frameset.htm

  • Importing data from Excel using SDK!

    Hi All,
    Can we do a Goods Receipt and Goods Issue via SDK.
    IF so any code available for the same!Secondly can we
    Import data from Excel using SDK!
    Thnx in advance

    Hi Vinayak
    4 your 2nd issue: you can easily use Excel.Application COM-object. In C# exporting from Excel can be:
    Excel.Application     oXL;
    Excel._Workbook     oWB;
    Excel._Worksheet     oSheet;
    string          strTemplatePath;
    strTemplatePath = Application.StartupPath + "WHRequestList.xlt";
    try
         oXL = new Excel.Application();
         oWB     = (Excel._Workbook)(oXL.Workbooks.Add(strTemplatePath));
         oSheet     = (Excel._Worksheet)oWB.ActiveSheet;
         SAPbouiCOM.Item     edDocNum;
         SAPbouiCOM.IEditText specEdDocNum;
         edDocNum = SBOApp.Forms.Item(FormUID).Items.Item("8");
         specEdDocNum = (SAPbouiCOM.IEditText)edDocNum.Specific;
         SAPbouiCOM.Item     edDocDate;
         SAPbouiCOM.IEditText specEdDocDate;
         edDocDate = SBOApp.Forms.Item(FormUID).Items.Item("10");
         specEdDocDate = (SAPbouiCOM.IEditText)edDocDate.Specific;
         oSheet.Cells[2, "F"] = "¹ " + specEdDocNum.String + " îò " + specEdDocDate.String;
         oXL.Visible = true;
         oXL.UserControl = true;
    BTW, don't forget to add Excel object in ProjectReferences
    For sure, importing  (reading) from Excel is the same
    HTH

  • Lookup selected batch in Sales Order on UDF field

    Hi,
    I have made an udf on sales order row level.
    Now i want to see in that udf u_batch the selected batchnumber in de row in the sales order.
    I use this query FMS but this is giving me a list , i want to see just the selected batch , after selecting it with CTRL-TAB in quantity field of SO.
    this is my query:
    SELECT T0.[DistNumber] FROM [dbo].[OBTN]  T0 INNER JOIN OITM T1 ON T0.ItemCode = $[$38.1.0]
    THX
    Mark
    Edited by: M. Hageman on Jun 15, 2010 11:16 AM

    You  can use this FS to get the batch(es) allocated to an order line:
    Select  bb.DistNumber
    FROM [dbo].[OITL]  l
    INNER JOIN [dbo].[ITL1]  b ON b.LogEntry = l.LogEntry
    inner join OBTN bb on b.MdAbsEntry=bb.AbsEntry
    Where l.DocType=17 and l.DocEntry=$[ORDR.DocEntry] and l.DocLine=$[RDR1.LineNum]
    BUT this works only after adding the order, because the allocation data is stored only then!

  • How do I use "touch -t" to shift a batch of JPG timestamps by one hour?

    I'm trying to use "touch -t" to shift a batch of JPG created/modified timestamps by one hour to fix a time zone error. Is this possible?
    (I don't want to have to manually go to every file, and enter its current timestamp all the same way except for the month.)
    By the way, does using the "touch" command have the same JPG lossy effect as saving the file again?

    picky picky picky
    So you write a script that uses stat to get the current modification time and then add 60 minutes to it, with the date command, then then use that with touch against the file. Nothing to it
    #!/bin/sh
    find starting.directory -name "*.jpg" | while read file
    do
    ls -l "$file"
    mtimeinsec=$(stat -f %m "$file")
    mtimeplus_1H_in_touchfmt=$(date -j -r $mtimeinsec -v +1H +%G%m%d%H%M.%S)
    /usr/bin/touch -t $mtimeplus_1H_in_touchfmt "$file"
    ls -l "$file"
    done
    I've added an hour to the modification time. If you want to subtract an hour the +1H to -1H
    If you want to use shell wildcard selection modify the loop to be something like
    #!/bin/sh
    for file in *.jpg
    do
    ... the guts of the above while loop ...
    done
    If you just want to provide a list of files, you can change the *.jpg to a list of files. JUST BE CAREFUL OF SPACES IN FILE NAMES and directories
    If you want a drag and drop application, you can do that with some additional changes and either using Applications -> Automator with the "Run Shell Command" or using Platypus (free download, and a very nice utility). The script would change to:
    #!/bin/sh
    for file in "$@"
    do
    ... the guts of the above while loop ...
    done
    I have tested the very first script. I am fairly confident my 2nd to examples are right, but they are untested, so your mileage may vary.

  • How can I parse the document in WebI using sdk?

    I wanna to parse the document in WebIntelligence using sdk. My question is :
    1) By which sdk, I can parse the document.  'Report Application Server SDK' ?
    2) I wanna to parse the 'Self-Defined SQL' and 'Query' components of the document. Can the sdk support this request ?
    My enviroment is  BO XI Release 2.
    Thanks all.

    Hi shao,
    1) By which sdk, I can parse the document. 'Report Application Server SDK' ?
    'Report Application Server SDK' is For Crystal reports so for WebIntelligence or DesktopIntelligence Report it is  "Report Engine SDK".
    Apart from this if you want to do more on these reports "BusinessObjects Enterprise SDK" can be used.
    You can get more information on below link for XI R2.
    http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/devsuite.htm
    For question 2,
    I am not sure about it but Report Engine SDK provides classes and interface of Data Providers.
    i.e. Building and Editing Data Providers   and  Working with Recordsets.
    Also you can have look on
    Report Engine SDK's
    Interface "Query"
    Hope these helps you.
    Thanks,
    Praveen.

  • How do I do validation using SDK.

    How do I do validation using SDK.
    We have created different warehouses for the client business operations.
    For eg:
    1. Inspection Stores
    2. Rejection Stores
    3. Main Stores
    In Goods Return & A/P Credit Memo, other than RejectionStores is
    selected, we want to generate a warning message.
    How do I do this through SDK.
    I need the code sample for the following activity:
    1. Reading the data available at each row of the current form (Goods
    Return/ A/P Credit memo)
    2. Validate the data with a paricular warehouse
    3. Generate warning message.
    I could not find any samples related to this.

    There is a method called MessageBox for the Application object. Have a look at
    the documentation, everything is there.

  • Use of ODI in Data Import scenario

    Hi,
    We are contemplating to use ODI for a Data Import scenario. The flow goes something like this:
    1.A user specified flat file or xml with a mapping between the file columns and base table columns serves as the input.
    (Note that the file column names could be anything and that is why we use mapping).
    2. This file data is stored in a stager table and certain validations are run on this data.
    3. This data is then imported into the base tables.
    I assume we cannot use ODI for step 1 as the file columns are not fixed and can vary. We need to programmatically interpret the data from the mappings. (Is there a way to do this in ODI?).
    If we use ODI for step 3 to import data from stager to base tables:
    - If we have a million records to be imported, then how performant is ODI? Do we need to invoke ODI in batches of (a few thousands) to improve performance?
    - Thanks in Advance,
    Raghu

    Hi Jont,
    Thanks for your reply..
    Here is an example of the mapping that we use:
    Flat File columns:
    AccName
    AccLoc
    Mapping (Specified by the user at run time):
    AccName -->(Maps to) Account.Name
    AccLoc --> (Maps to) Account.Location
    The user would map the file columns to the final target entity fields (like Account.Name) as above.
    Since, we have to store this data in a intermediate staging table, we would have a mapping internally (which is fixed), like
    Account.Name -->(maps to) AccStager.Name
    Account.Location -->(Maps to) AccStager.Location
    where AccStager.Name is the staging table field name.
    Thus, by using these two sets of mapping, we store the file data into staging table.
    Hope this is clear...
    Thanks,
    Raghuveer

  • How to use sdk in standard B1?

    Hi,All
       How to use sdk in standard B1? I want to use "sum in words" be thai languag which in standard no have so i must create it use sdk but i don't know that have solution using sdk in standard. example, Go menu Sales-A/R>Delivery and input data i want to convert price in Total to text which i use sdk for convert it But i don't khow that when i will call sdk? Can do in standard?

    Hi Virasak,
    You need to develop a (eventually small) application (= Add-On) which uses the SDK to do what you need it to do + is packaged and installed like e.g. any SAP Add-On.
    It should then just watch out for the "right" events which are propagated from the SAP Business One application through UI API (an interface in the SDK) to "interested" Add-On(s)...
    HTH,
    Frank

  • (Urgent)help: how to use sdk add a gif image into a pdf document

    I had use sdk plus-in add a new button of mine,if I click the button,a gif image will be inserted into the current page of pdf document
    My questions:
    one : When I clicked the button,there was a warnning box said:the image has not enough data.I don't known why?
    two : How can I be sure the position of the image which I inserted? and how to change it's position?
    three:  how to use sdk get the content of the document?

    hi Leonard:
    I do it like you said, but
    Why my image can not display in the pdf.
    code is:
    //====================================================================
    const ASInt32 theImageByteSize = IMG_WIDTH * IMG_HEIGHT;
    char* buff = new char[theImageByteSize];
    PDEImage volatile pdeImage = NULL;
    PDEImageAttrs pdeImageAttrs;
    PDEColorSpace pdeColorSpace;
    ASFixedMatrix imageMatrix;
    memset(&pdeImageAttrs, 0, sizeof(PDEImageAttrs));
    int hdl = _open(ImagePath, _O_RDONLY | _O_BINARY, _S_IWRITE | _S_IREAD);
    if (hdl == -1)
         AVAlertNote("[%s] create fail !!!!") ;
    if (_read(hdl, buff, theImageByteSize) == -1)
         AVAlertNote("read image fail!") ;
    pdeImageAttrs.width = IMG_WIDTH;
    pdeImageAttrs.height = IMG_HEIGHT;
    pdeImageAttrs.intent = ASAtomNull;
    pdeImageAttrs.bitsPerComponent = 8;
    pdeImageAttrs.flags = kPDEImageExternal | kPDEImageIsIndexed;
    pdeImageAttrs.decode[0] = fixedZero;
    pdeImageAttrs.decode[1] = fixedOne;
    pdeImageAttrs.decode[2] = fixedZero;
    pdeImageAttrs.decode[3] = fixedOne;
    pdeImageAttrs.decode[4] = fixedZero;
    pdeImageAttrs.decode[5] = fixedOne;
    ASFixedRect theMediaBox;
    PDPageGetMediaBox( AVPageViewGetPage(pageView), &theMediaBox );
    ASFixed theFixedWidth = (theMediaBox.right - theMediaBox.left);
    ASFixed theFixedHeight = (theMediaBox.top - theMediaBox.bottom);
    imageMatrix.a = ASInt16ToFixed(theFixedWidth);
    imageMatrix.d = ASInt16ToFixed(theFixedHeight);
    imageMatrix.b = imageMatrix.c = fixedZero;
    imageMatrix.h = 0;
    imageMatrix.v = 0;
    const Int32 cPaletteColors = 256;
    PDEIndexedColorData theIndexedData;
    theIndexedData.size = sizeof(theIndexedData);
    theIndexedData.baseCs = PDEColorSpaceCreateFromName(ASAtomFromString( "DeviceRGB"));
    theIndexedData.hival = cPaletteColors - 1;
    unsigned char data[3] = {255, 0, 0};
    theIndexedData.lookup = (char *)data;
    theIndexedData.lookupLen = cPaletteColors * 3;
    PDEColorSpaceStruct theColorData;
    theColorData.indexed = &theIndexedData;
    pdeColorSpace = PDEColorSpaceCreate(ASAtomFromString( "Indexed" ), &theColorData );
    pdeImage = PDEImageCreate(&pdeImageAttrs, sizeof(pdeImageAttrs), &imageMatrix,
                                                0, pdeColorSpace, NULL, NULL, NULL, (unsigned char*)buff, theImageByteSize);
    I want die, I had done this for so many days, My GIF doesn't insert into pdf,
    unsigned char data[3] = {255, 0, 0};
    theIndexedData.lookup = (char *)data;  "
    whether the data set wrong?
    I confused what I do next   

  • Load linkage error - "com/crystaldecisions/sdk/occa/report/data/Fields"

    We had installed and were using Crystal Reports for Eclpse with JBoss 4.2.  We recently upgraded to JBoss 5.1  Our crystal reports do not work from the web interface anymore.  The error we get is:
    Caused by: java.lang.LinkageError: loader constraint violation: loader (instance of org/jboss/web/tomcat/service/WebCtxLoader$ENCLoader) previously initiated loading for a different type with name "com/crystaldecisions/sdk/occa/report/data/Fields"
    It looks like there might be a class conflict with JBoss jars?  Any ideas on which jars to look at would be really appreciated.  Any other ideas or suggestions on what this error might be?
    Thank you.

    Based on the supported platforms document, I don't believe that JBoss 5.1 is on the list of application servers that are supported by Crystal Reports For Eclipse Version 2.  I believe that the versions of JBoss that are supported are 4.2 and 5.  By not supported, it means that SAP BusinessObjects hasn't tested and certified against these versions.
    As for the error, I'm not sure which jar file would be causing the conflict.
    Regards.
    - Robert

Maybe you are looking for

  • Error while creating CVC manually in SCM 7.0

    Hi Experts, We have recently upgraded to SCM 7.0 sandbox and while creating a new CVC manually in this , we are getting the following strange error: Internal Error /SAPAPO/SCMB_PSTRU_PLOB_TEMPL=>RAISE_EXCEPTION_FRO Message no. /SAPAPO/SCMB_PSTRU000 W

  • Need to get MS explorer again

    most people seem to agree that Explorer was no good, but there is one place where it was superior to both firefox and safari- the saving options. you had a bunch of different options, allowing you to make save an archive of a site, several levels of

  • OEM--Service is not initialized correctly OMS version 10.2.0.4.2 is not com

    Hi, I impdp the few schemas from full dump file of the Production DB to Dev env. i realized after that system password was changed and OEM stop running. when i started the OEM and then try to get the page its shows this error. secondly i am not able

  • Problem with number

    Hi all, A few days ago I had my mobile number changed because I had malicious calls from unknown numbers ect. But my old number still shows up in the line 1 when I view call logs and it also shows up when I connect my BB to my computer. How can I cha

  • Web Gallery Questions

    Sometimes, when I add photos to my Web Gallery, they remain in perpetual pending mode and never actually show up on the Web gallery, even though they are in my iPhoto Web Gallery Album. I can't seem to solve this unless the only answer is to delete a