How to create a draft to a stocktransfer

Hi,
i want to creat a draf to a stock transfer.
I know how to create do a sales/purchase document. But i can i do it to a stock trasnfer.
Thanks in advance

Below is a sample showing how to create a draft stock transfer using the DI.  (You can create this and other types of drafts using the SDK V2004).
Private Sub CreateDraftTransfer()
    On Error GoTo ErrorHandler
    Dim sboTransfer     As SAPbobsCOM.Documents
    Dim lngRetVal       As Long
    Dim lngErrCode      As Long
    Dim strErrmsg       As String
    Dim strTransfer     As String
    Set sboTransfer = sboCompany.GetBusinessObject(oDrafts)
    sboTransfer.DocObjectCodeEx = "67"
    sboTransfer.DocDate = Date
    sboTransfer.DocDueDate = Date
    sboTransfer.Lines.SetCurrentLine 0
    sboTransfer.Lines.ItemCode = "BEETLE S"
    sboTransfer.Lines.Quantity = 2
    sboTransfer.Lines.Price = 10
    sboTransfer.Lines.WarehouseCode = "OT"
    lngRetVal = sboTransfer.Add
    If lngRetVal <> 0 Then
        sboCompany.GetLastError lngErrCode, strErrmsg
        MsgBox "Error: " & strErrmsg
    Else
        Call sboCompany.GetNewObjectCode(strTransfer)
        MsgBox "Draft Transfer Created"
    End If
    Exit Sub
ErrorHandler:
    MsgBox "Error has occured. " & Err.Number & " " & Err.Description
End Sub
John.

Similar Messages

  • How do I open draft folder of my mail?

    How do I open draft folder of my mail?

    Tap on it. The same way that you open any folder in your email account. If you are asking how to create a draft folder .... Start typing an email and then tap Cancel at the top of the email window and you will be prompted to save or delete the draft. Tap Save Draft and then the draft folder will appear.
    Now what are you really asking about? Will your draft folder not open?

  • How to create A/R Invoice from draft

    Hi,
              How to create A/R Invoice from documnet draft using DIAPI.
    Thanks,
    P.Suresh Kumar

    Hi Suresh Kumar,
    You may check this as a reference: Re: Problems while saving the tax values in a Draft Document to AP Invoice
    Thanks,
    Gordon

  • How to receipt demand draft(DD) received from customer  ?

    Dear all,
    Explaining problem in detail,Client has made a scrap sale(ar invoice) to customer for Rs.74025.76,
    need to collect tax colleceted as source(TCS) for above amount which calculates to Rs.838,
    Rounding off is Rs.0.24.
    Customer paid for ar invoice by demand draft for amount Rs.75000.
    As concept of TCS not in SAP B1,they need to do incoming payment on account for collecting tcs.
    How to receipt demand draft received from customer  ?
    How to repay excess amount of Rs.136 in cash ?
    Thanks in advance for valuable replies.
    Jeyakanthan

    Would you not process it like a regular Incoming Cheque and Paying back to the Customer create an Outgoing Payment > Select Customer and send money back in what ever payment method you want
    Suda

  • Identify the source of Creating a Draft Document

    Hi Everybody,
                        Anybody know how to identify a Draft generated by the wizard than other generated by the user (creating a document as a Draft) in the ODRF table, property DATASOURCE???
    Thanks!!

    Datasource field only identifies whether an  entry made through user interface or by some add on etc, since you are using the user interface, i dont' think any field exactly identifies, if the record was created by user or through some wizard.
    Though in some particular transactions, it does stores that the record was created by a wizard. For example, in production order, it does identifies that the record was created by MRP wizard.
    If you can be more elaborate regarding which documents you're trying to check, perhaps some exact way could be find out.
    Rahul

  • How to Create the Custom print Quote Report ?

    Hi All,
    I want to create the custom Print Quote report . I know the below details and referred the below metalinks .
    Note: 780722.1 - How to Create a Custom Print Quote Template in Oracle Quoting ?
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=780722.1
    Note: 392728.1 - How to Modify the data source for the XML version of the Print Quote report
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=392728.1
    Note: 468982.1 - How To Customize The Asoprint.Xsl
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=468982.1.
    Oracle Metalink:
    Note: To add a column to the print quote report, following files need to be updated:
    LinesVO.xml --- xml files containing the sql query and attribute definition
    LinesVORowImpl.class - public class extending the framework class OAViewRowImpl.
    This class contains the set and get for the attributes defined in xml file.
    ASOPRINT.xsl - this is the xsl stylesheet file used to describe the report layout.
    This file needs to be modified to include the new column being added to the report
    QUESTION :
    My question is,
    1. wether my approach (below iare the details)of trying to extend the PromptVO is the right way or is there any other way to add the new columns.
    I want to add new fields on to the report . When i looked into the it says the below
    Here we find that to add a new column, oracle says to update the LINESVO.xml, do they really mean to update the base files.
    This report uses following VO's
    PROMPTVO
    HEADERVO,
    LINESVO.
    To create new Headers & Prompts, i tried extending the PROMPTVO. Once the extended VO is substitued , i dont even get the data for standard oracle Prompts. is this the right way to add columns?
    Thanks

    Hi All,
    I want to create the custom Print Quote report . I know the below details and referred the below metalinks .
    Note: 780722.1 - How to Create a Custom Print Quote Template in Oracle Quoting ?
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=780722.1
    Note: 392728.1 - How to Modify the data source for the XML version of the Print Quote report
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=392728.1
    Note: 468982.1 - How To Customize The Asoprint.Xsl
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=468982.1.
    Oracle Metalink:
    Note: To add a column to the print quote report, following files need to be updated:
    LinesVO.xml --- xml files containing the sql query and attribute definition
    LinesVORowImpl.class - public class extending the framework class OAViewRowImpl.
    This class contains the set and get for the attributes defined in xml file.
    ASOPRINT.xsl - this is the xsl stylesheet file used to describe the report layout.
    This file needs to be modified to include the new column being added to the report
    QUESTION :
    My question is,
    1. wether my approach (below iare the details)of trying to extend the PromptVO is the right way or is there any other way to add the new columns.
    I want to add new fields on to the report . When i looked into the it says the below
    Here we find that to add a new column, oracle says to update the LINESVO.xml, do they really mean to update the base files.
    This report uses following VO's
    PROMPTVO
    HEADERVO,
    LINESVO.
    To create new Headers & Prompts, i tried extending the PROMPTVO. Once the extended VO is substitued , i dont even get the data for standard oracle Prompts. is this the right way to add columns?
    Thanks

  • How to create a report based on a DataSet programatically

    I'm working on a CR 2008 Add-in.
    Usage of this add-in is: Let the user choose from a list of predefined datasets, and create a totally empty report with this dataset attached to is. So the user can create a report based on this dataset.
    I have a dataset in memory, and want to create a new report in cr2008.
    The new report is a blank report (with no connection information).
    If I set the ReportDocument.SetDataSource(Dataset dataSet) property, I get the error:
    The report has no tables.
    So I must programmatically define the table definition in my blank report.
    I found the following article: https://boc.sdn.sap.com/node/869, and came up with something like this:
    internal class NewReportWorker : Worker
          public NewReportWorker(string reportFileName)
             : base(reportFileName)
    public override void Process()
             DatabaseController databaseController = ClientDoc.DatabaseController;
             Table table = new Table();
             string tabelName = "Table140";
             table.Name = tabelName;
             table.Alias = tabelName;
             table.QualifiedName = tabelName;
             table.Description = tabelName;
             var fields = new Fields();
             var dbField = new DBField();
             var fieldName = "ID";
             dbField.Description = fieldName;
             dbField.HeadingText = fieldName;
             dbField.Name = fieldName;
             dbField.Type = CrFieldValueTypeEnum.crFieldValueTypeInt64sField;
             fields.Add(dbField);
             dbField = new DBField();
             fieldName = "IDLEGITIMATIEBEWIJS";
             dbField.Description = fieldName;
             dbField.HeadingText = fieldName;
             dbField.Name = fieldName;
             dbField.Type = CrFieldValueTypeEnum.crFieldValueTypeInt64sField;
             fields.Add(dbField);
             // More code for more tables to add.
             table.DataFields = fields;
             //CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo info =
             //   new CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo();
             //info.Attributes.Add("Databse DLL", "xxx.dll");
             //table.ConnectionInfo = info;
             // Here an error occurs.
             databaseController.AddTable(table, null);
             ReportDoc.SetDataSource( [MyFilledDataSet] );
             //object path = @"d:\logfiles\";
             //ClientDoc.SaveAs("test.rpt", ref path, 0);
    The object ClientDoc referes to a ISCDReportClientDocument in a base class:
       internal abstract class Worker
          private ReportDocument _ReportDoc;
          private ISCDReportClientDocument _ClientDoc;
          private string _ReportFileName;
          public Worker(string reportFileName)
             _ReportFileName = reportFileName;
             _ReportDoc = new ReportDocument();
             // Load the report from file path passed by the designer.
             _ReportDoc.Load(reportFileName);
             // Create a RAS Document through In-Proc RAS through the RPTDoc.
             _ClientDoc = _ReportDoc.ReportClientDocument;
          public string ReportFileName
             get
                return _ReportFileName;
          public ReportDocument ReportDoc
             get
                return _ReportDoc;
          public ISCDReportClientDocument ClientDoc
             get
                return _ClientDoc;
    But I get an "Unspecified error" on the line databaseController.AddTable(table, null);
    What am i doing wrong? Or is there another way to create a new report based on a DataSet in C# code?

    Hi,
    Have a look at the snippet code below written for version 9 that you might accommodate to CR 2008, it demonstrates how to create a report based on a DataSet programmatically.
    //=========================================================================
    +           * the following two string values can be modified to reflect your system+
    +          ************************************************************************************************/+
    +          string mdb_path = "C:
    program files
    crystal decisions
    crystal reports 9
    samples
    en
    databases
    xtreme.mdb";    // path to xtreme.mdb file+
    +          string xsd_path = "C:
    Crystal
    rasnet
    ras9_csharp_win_datasetreport
    customer.xsd";  // path to customer schema file+
    +          // Dataset+
    +          OleDbConnection m_connection;                         // ado.net connection+
    +          OleDbDataAdapter m_adapter;                              // ado.net adapter+
    +          System.Data.DataSet m_dataset;                         // ado.net dataset+
    +          // CR variables+
    +          ReportClientDocument m_crReportDocument;          // report client document+
    +          Field m_crFieldCustomer;+
    +          Field m_crFieldCountry;+
    +          void CreateData()+
    +          {+
    +               // Create OLEDB connection+
    +               m_connection = new OleDbConnection();+
    +               m_connection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + mdb_path;+
    +               // Create Data Adapter+
    +               m_adapter = new OleDbDataAdapter("select * from Customer where Country='Canada'", m_connection);+
    +               // create dataset and fill+
    +               m_dataset = new System.Data.DataSet();+
    +               m_adapter.Fill(m_dataset, "Customer");+
    +               // create a schema file+
    +               m_dataset.WriteXmlSchema(xsd_path);+
    +          }+
    +          // Adds a DataSource using dataset. Since this does not require intermediate schema file, this method+
    +          // will work in a distributed environment where you have IIS box on server A and RAS Server on server B.+
    +          void AddDataSourceUsingDataSet(+
    +               ReportClientDocument rcDoc,          // report client document+
    +               System.Data.DataSet data)          // dataset+
    +          {+
    +               // add a datasource+
    +               DataSetConverter.AddDataSource(rcDoc, data);+
    +          }+
    +          // Adds a DataSource using a physical schema file. This method require you to have schema file in RAS Server+
    +          // box (NOT ON SDK BOX). In distributed environment where you have IIS on server A and RAS on server B,+
    +          // and you execute CreateData above, schema file is created in IIS box, and this method will fail, because+
    +          // RAS server cannot see that schema file on its local machine. In such environment, you must use method+
    +          // above.+
    +          void AddDataSourceUsingSchemaFile(+
    +               ReportClientDocument rcDoc,          // report client document+
    +               string schema_file_name,          // xml schema file location+
    +               string table_name,                    // table to be added+
    +               System.Data.DataSet data)          // dataset+
    +          {+
    +               PropertyBag crLogonInfo;               // logon info+
    +               PropertyBag crAttributes;               // logon attributes+
    +               ConnectionInfo crConnectionInfo;     // connection info+
    +               CrystalDecisions.ReportAppServer.DataDefModel.Table crTable;+
    +               // database table+
    +               // create logon property+
    +               crLogonInfo = new PropertyBag();+
    +               crLogonInfo["XML File Path"] = schema_file_name;+
    +               // create logon attributes+
    +               crAttributes = new PropertyBag();+
    +               crAttributes["Database DLL"] = "crdb_adoplus.dll";+
    +               crAttributes["QE_DatabaseType"] = "ADO.NET (XML)";+
    +               crAttributes["QE_ServerDescription"] = "NewDataSet";+
    +               crAttributes["QE_SQLDB"] = true;+
    +               crAttributes["QE_LogonProperties"] = crLogonInfo;+
    +               // create connection info+
    +               crConnectionInfo = new ConnectionInfo();+
    +               crConnectionInfo.Kind = CrConnectionInfoKindEnum.crConnectionInfoKindCRQE;+
    +               crConnectionInfo.Attributes = crAttributes;+
    +               // create a table+
    +               crTable = new CrystalDecisions.ReportAppServer.DataDefModel.Table();+
    +               crTable.ConnectionInfo = crConnectionInfo;+
    +               crTable.Name = table_name;+
    +               crTable.Alias = table_name;+
    +               // add a table+
    +               rcDoc.DatabaseController.AddTable(crTable, null);+
    +               // pass dataset+
    +               rcDoc.DatabaseController.SetDataSource(DataSetConverter.Convert(data), table_name, table_name);+
    +          }+
    +          void CreateReport()+
    +          {+
    +               int iField;+
    +               // create ado.net dataset+
    +               CreateData();+
    +               // create report client document+
    +               m_crReportDocument = new ReportClientDocument();+
    +               m_crReportDocument.ReportAppServer = "127.0.0.1";+
    +               // new report document+
    +               m_crReportDocument.New();+
    +               // add a datasource using a schema file+
    +               // note that if you have distributed environment, you should use AddDataSourceUsingDataSet method instead.+
    +               // for more information, refer to comments on these methods.+
    +               AddDataSourceUsingSchemaFile(m_crReportDocument, xsd_path, "Customer", m_dataset);+
    +                              +
    +               // get Customer Name and Country fields+
    +               iField = m_crReportDocument.Database.Tables[0].DataFields.Find("Customer Name", CrFieldDisplayNameTypeEnum.crFieldDisplayNameName, CeLocale.ceLocaleUserDefault);+
    +               m_crFieldCustomer = (Field)m_crReportDocument.Database.Tables[0].DataFields[iField];+
    +               iField = m_crReportDocument.Database.Tables[0].DataFields.Find("Country", CrFieldDisplayNameTypeEnum.crFieldDisplayNameName, CeLocale.ceLocaleUserDefault);+
    +               m_crFieldCountry = (Field)m_crReportDocument.Database.Tables[0].DataFields[iField];+
    +               // add Customer Name and Country fields+
    +               m_crReportDocument.DataDefController.ResultFieldController.Add(-1, m_crFieldCustomer);+
    +               m_crReportDocument.DataDefController.ResultFieldController.Add(-1, m_crFieldCountry);+
    +               // view report+
    +               crystalReportViewer1.ReportSource = m_crReportDocument;+
    +          }+
    +          public Form1()+
    +          {+
    +               //+
    +               // Required for Windows Form Designer support+
    +               //+
    +               InitializeComponent();+
    +               // Create Report+
    +               CreateReport();+
    +               //+
    +               // TODO: Add any constructor code after InitializeComponent call+
    +               //+
    +          }+//=========================================================================

  • How to create a group calendar?

    Hello,
    i am sorry but this is one more question on wiki-group-calendars.
    *In short:*
    I am not able to create a group calendar with the wiki frontend. the calendar that is created with a wiki is owned by the admin of the wiki. So it is always a personal calendar that cannot be shared in iCal.
    LONG:
    I want to create a group calendar that is viewed and edited through iCal.app and the web service. Apple´s "wiki deployment" guide says on page 57:
    +"The web calendar allows you to easily schedule events for yourself or your group. ...+
    +There are *two types of web calendars: personal and group*. You can send and receive event invitations through the personal calendar but not through the group calendar. Also, *while anyone in a group can create or edit events in a group calendar*, you can edit only events in your own personal calendar or event invitations you send to other people.+
    +The web calendar uses iCal Server to store events and invitations. ..."+
    But there is not mentioned how to create a group calendar. The calendar created with the wiki web-frontend belongs to the admin of that particular wiki. This is why the calendar data ist stored in folder named with the UUID of the wiki admin. Also the alias "http://server.fqdn:8008/principals/groups/mygroupname/" which i provided in iCal turns into ..._uids_UUID-of-the-wiki-admin and only the wiki-admin can access this calendar in iCal.app.
    My research on this topic reveals that there were in issue that should be resolved in 10.6.4 (that is running on our Server). So, again, how to create a group calendar?
    Thanks, Philipp.
    10.6.4 OSX Server
    10.6.x Clients

    farmer tan wrote:
    you need to go to the wiki page and add the wiki's there and then in the setting of the wiki is where you set permissions and services such as calendar, blog, and podcast you can also set all permissions for the wiki in the settings tab
    fyi none of my groups were available unless i logged into the wiki as the Directory Admin not Server Admin
    migrated from 10.5.7 to 10.6
    Message was edited by: farmer tan
    Could you be more specific farmer tan, please?
    You said "you need to go to the wiki page and add the wiki's there...." What is the "wiki page" you mention? Is that some place I go to via the browser or the Server Admin tool?
    I went to http://ical.mysite.com/ical/ and logged in as the Directory Administrator but didn't see anything resembling what you described.
    Thanks in advance for any help you can provide.

  • How to  create i view  in visual composer give details screenshots

    how to  create i view  in visual composer give details screenshots

    Hi,
    Go through these threads
    VisualComposer
    http://help.sap.com/bp_epv170/EP_US/HTML/Executive_Cockpit.htm
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/1752b737-0401-0010-0ba3-87c3eda8c6ce
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e019d290-0201-0010-f186-8630a949800a
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/30987099-a74c-2a10-70b5-a2751ce79359
    http://help.sap.com/saphelp_nw04/helpdata/en/fd/4a7e40417c6d1de10000000a1550b0/content.htm
    Tarak
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00b9ba6d-1291-2a10-208d-bd27544e7939

  • How to create a variant to a maintenance view (trans: SM31)

    Hi gurus.
    I have created a maintenance view (called z_jest). By running it from SM31 there is a variant option. However, I am not able to create the variant which I want to filter a selection upon in this transaction.
    I have even looked into transaction SE54 and created a variant for the maintenance table view there( called z_jestv). Then going back to transaction SM31 and view z_jest, i push 'Variant' radiobutton and type as variant: 'z_jestv', I only get the message: "Variant z_jestv for object z_jest does not exist".
    Can anybody please advice on how to create and/or connect the variant to the maintenance view?
    Regards LL.

    Hi Mahalakshmi
    Thanks for reply.
    When I look into the procedure, there is a prerequisite: "The basis dialog for which the maintenance variant is created already exists."
    I am a little bit unsertain if I miss this 'Basic dialog'. Can you please advice on how to check / create this 'basic dialog' before I go on to create the variant. (I need this 'basic dialog' as input in the procedure you sent.)
    (Note: I have already created a 'maintenance dialog' for the view, but I have a feeling, that is something different...)

  • How to create transaction for a maintenance view, Thank you.

    How to create transaction for a maintenance view,
    Thank you.
    deniz...

    Hi Deniz,
    Go to se93.
    Then create the new T.code.
    Under that select parameter Transaction.
    Then give the sm30 in the t.code in default values tab.
    check the checkbox skip initial screen.
    in classification tab.
    click checkbox inherit gui attributes..
    Now below..
    In the default values..
    select
    viewname and give ur table name.
    UPDATE= Xsave
    view - table name ( Should be upper case
    update X ( should be upper case).
    http://www.sap-basis-abap.com/sapbs011.htm
    Hope this helps you.
    Regards,
    Viveks

  • How to create a query view in sap bw?

    can any one please tell me how to create a query view in sap bw 3.5?

    Hi,
    you can do this by using Bex analyzer and WAD ..
    gop through this link ..
    http://help.sap.com/saphelp_nw70/helpdata/en/0e/1339427f82b26be10000000a155106/content.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/0d/af12403dbedd5fe10000000a155106/frameset.htm
    hope this helps you ..
    Reagrds,
    shikha

  • How to create a tree view in adobe configurator

    Hi
              How to create a tree view in adobe configurator
    Thanks 

    Please, can you explain what you mean exactly?

  • How to create a error message for Deleted batch while creating a PO

    Hi ,
    Can any body tell me how to create error message for a deleted batch while creating a PO in ME21n,
    when a PO is created for a deleted batch at GI &GR lebel it is showing  a error message,
    but i want to show a error message while doing the PO creation.
    Thanks,
    Sachhi

    in badi  me_process_po_cust u can  put this message
    METHOD if_ex_me_process_po_cust~check.

  • How to create a job card and how to add waranty card in sales order

    I have one scenario for CS.the scenario is realted to automotive industry. Basically its a trading industry of HCV,MCV,LCV apart from that they will do servicing also. First the customer comes for a service.he is having free services. he will have waranty for spare parts of the vehicle. once he comes for servicing first the executive will take complains from the customer after that a Job card will be issued to the customer. there his chasis no ,engine no and registration no will be there. once enter the chasis no entire customer details has to come. how many free services he is having for how many kilo meters.then job card will go to the spare parts dept.that dept will issue the spare parts.then they will invoice the customer. he will pay the payment.and finally the gate pass will be given to the customer to deliver the vehicle.
    painful area is how to create a job card and how to add waranty in sales order.
    Regards,
    Venkat

    Hi,
    Have u resolved it then Please let me know !!! It is a very interesting problem and owuld like to know the solution...
    Regards
    Krishna

Maybe you are looking for

  • Inco terms in Print of the PO

    Hi folks, Inco Terms are not coming in the print of the PO though the same comes in the print of the similar PO. what can be the reason ? Inco Terms are there in the vendor master and also in the info record. In PO-Header incoterms from the vendor ma

  • Windows 7 Pro 64-Bit on Early 2008 iMac - No CD/DVD Driver error

    Hi, I'm trying to install Windows 7 64-bit on my early 2008 iMac and its failing at the point after I click "Start Install" in the Windows 7 installation. Its complaining that I don't have the required CD/DVD drivers, and prompts me to insert a disk/

  • Itunes download - error (-50)

    Attempted to download itunes version 10.3.1 for 64-bit Windows Vista and get an error when trying to open itunes after a supposedly successful download.  The error: "The iTunes application could not be opened.  An unknown error occurred (-50)." Appar

  • So, how do we make them pay?

    The fact everyday there are more posts like this: http://community.vzw.com/t5/4G-Discussion/4G-Network-issues/td-p/688407 basically indicate nobody is finding out about the 4G problems until too late like us.  So somehow we have to get more attention

  • Weird screen issues with 10.7.2

    I just updated to 10.7.2 tonight, and immediately following the reboot, I started having problems. Scrolling in any finder window, or moving any windows around my screen causes screen corruption in the areas that are affected. If I scroll in a finder