on 12-22-2004 7:55 AM
Hi Reiner,
I am trying to create a Web App (yes i have moved on from my web service!!..exploring more..) and incorporated my proxy for my BAPI using NCo 2.0.
I am puzzled i have been trying to create a document but required to insert line items. So, I decided to take the web-friendly approach and create a button where i will call the 2nd Web form using the <b><i>Response.Redirect("WFrmCreateItem.aspx")</i></b> command. As you know with SAP table structures, I have declared a <b><i>Dim tblXXXItems As New BAPIXXXTable</i></b> in globally in my first form. I know want to pass this table into the 2nd form for me to add items to the BAPIXXXTable which is required when i call the BAPI.
What is the best approach in designing a Header-Item WebApp?
Thanks in advance...
As ASP.NET is normally stateless, you need a place to store objects that survive round-trips. Typical way is to store the table in session state:
Sessione.Item("MyTable") = tblXXXItems;
... and on the othe page:
Dim tblXXXItems As BAPIXXXTable
tblXXXItems = CType(Sessione.Item("MyTable"), BAPIXXXTable)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, i have tried that but somehow it does not really work.
on the 2nd page when i press the button:..
i try adding the items to the table via the structure which has been declared as:
Dim strXXXItems As BAPIXXX
strXXXItems.Item = text1.text
strXXXItems.Doc_Date = text2.text
...
tblXXXItems.Add(strXXXItems)
-
I get an error - Object reference not set to an instance of an object.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 61: strXXXItems.Orderpr_Un = 1
Line 62: strXXXItems.Tax_Code = txtTaxCode.Text
<b>Line 63: tblXXXItems.Add(strXXXItems)</b>
-
and do i need to do another Session.Item("MyTable") = tblXXXItems; on the 2nd page after that for the first page to receive?
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.