none
Sap web service and VB.NET consumer RRS feed

  • Question

  • Hello to all , 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

    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


    Vive rapido muere joven y tu cadaver sera bello

    Saturday, March 10, 2018 6:53 PM

All replies

  • Hello,

    We will need more clarification e.g. "abap web service", what is 'abap'?

    In regards to returning one record, it's not possible for us to make a recommendation without you providing more details as "a web service" working with a database can be done many different ways, we need to know how you are working with data. Perhaps a small code sample would assist also. When posting code use the code button in the post editor, second from the right.

    Next, the following without an explanation is not useful unless you explain what these two variables are doing.

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

    What I can recommend is placing Debugger.Launch into code prior to where the data operation is. Then fire up the web service using InstallUtil.exe. When the line with Debugger.Launch is hit a prompt will appear to debug the service. Select (you need Visual Studio open to the project which is to be debugged) the instance of Visual Studio with the project open. Step through the code line by line if needed and inspect variable values. If this does not help you may very well need to run the SQL inside of Visual Studio in a text file with an extension of .sql which should provide the ability to connect to the database and execute the same query used in the web service. Of course this is may or may not be possible from technical restrictions or having never done this before.

    Bottom line is debugging code is an invaluable tool for figuring out why a task is not performing as expected. There are usually no short cuts so if you have not learn to debug than now is the time to start.

    Any ways we are here to assist but as mentioned above more details are required.

     

    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    Saturday, March 10, 2018 7:23 PM
    Moderator