Skip to Content
-2

ABAP Web Service and tables

Hello to all, i know this subject is not completly abap related but any ideas are well recived. i made an abap web service and is working fine , has to tables , one to put data from my vb.net aplication to my web service , and the other is to take the data proceesed in sap and read it in the vb.net app. The table tha sap send to me as result is working fine , no problema at all , but the table i have to send to the web services has gave mi a big headake . allways pass 1 records , i try everything but nothing seems to work .

can someone give any idea, thanks

Add comment
10|10000 characters needed characters exceeded

  • Sure i just asked like that because i was really tired of trying , as i said my web service works fine , but my vb app has that problmen , just when i send data from vb to sap ,the table just add 1 record no more

    Dim CARGAS() As WSREF.ZSINC_CARGA = {New WSREF.ZSINC_CARGA}

    Dim RETUR() As WSREF.ZSINC_RETUR = {New WSREF.ZSINC_RETUR}

    This are my declaration for the tables that works in my web services , RETUR for data from SAP to VB and CARGAS from vb.net to SAP,

    The functionallity of the web service is to recive CARGAS with all the records i want and process them , After thar i response to the vb.net with the table RETUR with se same quantity of records of CARGAS , as a log

    The problem is than when i try to put data to CARGAS only let me put 1 record , RETUR works fine , because i put a dummy procedure to append a few records 10 o more in the table just to probe and when it came back to vb.net show the 10 lines in a datagridview with no problem

  • Hello,

    can you show us some screen shot of your SAP Web Service ?

    can you show your VB source code ?

    If you try to test your SAP webservice not from vb then can you put more than one record in CARGAS ?

  • Sure no problem , this is my code in vb.net , what i try to ask is how can i send CARGAS with more than 1 record , but it needs to be fill in vb.net , if a fill then in abap no problem , in fact i fill the tables in sap and they get OK to vb.net but i need to fill q of the tables in vb.net and send it to SAP , i mean that's no a sap problem but a VB problem , i put the code in vb in here

      PWS.PreAuthenticate = True
            PWS.Credentials = CRED
    
    
            Try
    
    
                ENTRADA.ZSINC_CARGA = CARGAS
                ENTRADA.ZSINC_RETUR = RETUR
    
    
                SALIDA = PWS.ZSINCVENTASPOS(ENTRADA)
    
    
            Catch ex As Exception
                MsgBox(ex.Message.ToString)
            End Try
    
    
            fin = New TimeSpan(DateTime.Now.Ticks)
    
    
            tiempo = fin - inicio
    
    
            Label3.Text = "Tiempo de Ejecucion: " & tiempo.TotalSeconds.ToString & " Segundos"
            Label3.Visible = True
    
    
            RETUR = SALIDA.ZSINC_RETUR
            DataGridView2.DataSource = RETUR
    
  • Get RSS Feed

1 Answer

  • Best Answer
    Mar 19 at 03:36 PM

    hello friends i finally resolve it , the catch was to put the internal table in VB as an array using the interna table structure , and use a list of the same tipe , the asign it to the table you declare and automatic gets the rows . i put the pieces of code in here

       Dim list As List(Of WSREF.ZSINC_CARGA) = New List(Of WSREF.ZSINC_CARGA)
        Dim CARGAW() As WSREF.ZSINC_CARGA
    

    This was my declaration , the list and the structure i was telling you about

      CARGAW = list.ToArray()
    
    
            CARGAS = CARGAW
    

    This where i got the rows , first load cargaw with the values in the list you alredy fill , and after that asign that array to your table

    I hope it can be help full

    Add comment
    10|10000 characters needed characters exceeded