Skip to Content
author's profile photo Former Member
Former Member

How i can set date in a tabla sap?

Hi all,

I'm working in a proyect where i like do a Sales order with a aplication web, in Sap Netweaver developer studio, and i use the bapi: "BAPI_SALESORDER_CREATEFROMDAT2".

First i have:

**********************************************************

JCO.Structure Tb = function.getImportParameterList().getStructure("ORDER_HEADER_IN");

Tb.setValue("ZNAC","DOC_TYPE");

Tb.setValue("1000","SALES_ORG");

Tb.setValue("10","DIVISION");

Tb.setValue("10","DISTR_CHAN");

JCO.Table Tab = function.getTableParameterList().getTable("ORDER_ITEMS_IN");

nfilas=Tab.getNumRows();

for(int i=0; i<nfilas;i++){

Tab.setRow(i);

Tab.setValue("000010","ITM_NUMBER");

Tab.setValue("201311630P05000032","MATERIAL");

Tab.setValue("10","TRAGET_QTY");

}

JCO.Table Tab2 = function.getTableParameterList().getTable("ORDER_PARTNERS");

nfilas=Tab2.getNumRows();

for(int i=0;i<nfilas;i++){

Tab2.setRow(i);

Tab2.setValue("AG","PARTN_ROLE");

Tab2.setValue("100003","PARTN_NUMB");

}

**********************************************************

Second execute the function:

**********************************************************

mConnection.execute(function);

**********************************************************

But the result isn't not equal that the result that i get if i have it in SAP with same value. In the table "Return" that it's where is the result isn't equal.

Any idea?

Thank's

PD: Excuse me for my english 😊

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 05, 2005 at 12:35 PM

    Hi,

    The only change which I can suggest by looking at code is to modify the line below

    Tab2.setValue("100003","PARTN_NUMB");

    to

    Tab2.setValue("0000100003","PARTN_NUMB");

    As the Partner Number Length is "10" in the table ORDER_PARTNERS, it may help if u pad it with zeros.

    Regards,

    Naresh

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 10, 2005 at 11:18 AM

    Hi Naresh,

    Thank's for your help. I have solved my problem.

    Great

    Vicente Zaragoza

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.