Skip to Content

Create oSockTransfer Document

hello everyone

I'm using the oStockTransfer object and in some cases I need to update the CodeBars field. When I try to find it, it does not appear in the sdk, so I can not update it.
I understand that this field is automatically filled with the bar code field that the product has in the oitm table but in some cases in the xml that I read to go up to sap it has diffe

Any idea how to update this fied?

Below part of the code.

for (int i = 0; i < oInventoryTransferRequest.Lines.Count; i++)
if (i != 0) StockTransfer.Lines.Add();
StockTransfer.Lines.ItemCode = oInventoryTransferRequest.Lines.ItemCode;
string[] cantidad = oInventoryTransferRequest.Lines.Quantity.ToString().Split(delimiterChars);
StockTransfer.Lines.Quantity = Convert.ToDouble(cantidad[0]);
StockTransfer.Lines.WarehouseCode = oInventoryTransferRequest.Lines.WarehouseCode;
StockTransfer.Lines.ProjectCode = oInventoryTransferRequest.Lines.ProjectCode;
StockTransfer.Lines.UserFields.Fields.Item("U_Comentariosl").Value = oInventoryTransferRequest.Lines.UserFields.Fields.Item("U_Comentariosl").Value;
StockTransfer.Lines.DiscountPercent = 0;
StockTransfer.Lines.UnitPrice = oInventoryTransferRequest.Lines.Price;
StockTransfer.Lines.UserFields.Fields.Item("U_VuCadena").Value = oInventoryTransferRequest.Lines.UserFields.Fields.Item("U_VuCadena").Value;
StockTransfer.Lines.UserFields.Fields.Item("U_VIcoCadena").Value = oInventoryTransferRequest.Lines.UserFields.Fields.Item("U_VIcoCadena").Value;


Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • Nov 05, 2018 at 07:11 AM

    Hi Alvaro,

    You could call an Items object, and set its CodeBars property before you add the item to the document.



    Add comment
    10|10000 characters needed characters exceeded

  • Nov 05, 2018 at 01:54 PM

    Hello Johan.

    We had originally thought about that, but the company informs me that this code is not exactly the same, because those inventory transfers requests are sent by customers through EDI (Electronic Data Interchange), we only read the information from the xml.

    Any other idea Johan?.

    Thank you.


    Add comment
    10|10000 characters needed characters exceeded

  • Nov 07, 2018 at 01:03 PM

    Of course Johan.

    Because they are not well updated, and another thing is that our bar code can have more than one bar code that is why I need them to be updated.



    Add comment
    10|10000 characters needed characters exceeded

    • Hi Alvaro,

      Ok, what about consuming a barcode? What I mean is, at what moment(s) / for what purpose(s) do you use the barcode, and where do you get it from, and how do you get it?

      I ask this, because possible alternative solutions may or may not apply to your scenario.



      P.S. please use the comment function to respond, otherwise I do not get notified.

  • Jan 10 at 06:17 PM

    We create a user field Johan. That was the workaround.

    Thank you very much

    Alvaro Argenzio

    Add comment
    10|10000 characters needed characters exceeded