on 11-30-2007 5:28 PM
Is anyone else out there having trouble with the subject how to guide? https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d0e58022-2a39-2a10-69a8-c1a892e2...
I think I have everything built out correctly but I get the following run time error.
Business Server Page (BSP) error
What happened?
Calling the BSP page was terminated due to an error.
SAP Note
The following error text was processed in the system:
An exception with the type CX_SY_REF_IS_INITIAL occurred, but was neither handled locally, nor declared in a RAISING clause
Exception Class CX_SY_REF_IS_INITIAL
Error Name
Program Z_PROCESS_BOOKING_FORM========CP
Include Z_PROCESS_BOOKING_FORM========CM002
ABAP Class Z_PROCESS_BOOKING_FORM
Method DO_REQUEST
Line 33
Long text An attempt was made to execute a dynamic method callon an initial(NULL-) object reference. The reference must refer to an object.
Following is my code: line 33 reads as strChecked = node->get_value( ).
method DO_REQUEST.
*CALL METHOD SUPER->DO_REQUEST
* .
data: bookingxml type string.
bookingxml = request->get_cdata( ).
data: streamFactory type ref to
if_ixml_stream_factory.
data: iStream type ref to if_ixml_istream.
streamFactory = g_ixml->create_stream_factory( ).
iStream =
streamFactory->create_istream_string(
bookingxml ).
data: document type ref to if_ixml_document.
document = g_ixml->create_document( ).
data: parser type ref to if_ixml_parser.
parser = g_ixml->create_parser( stream_factory =
streamFactory
istream =
iStream
document =
document ).
parser->parse( ).
data: node type ref to if_ixml_node.
data: strChecked type string.
node = document->find_from_name( name = 'RESERVED'
).
strChecked = node->get_value( ).
data: reserved type BAPISBODAT-RESERVED.
data: checked type i.
move strChecked to checked.
if ( checked = 1 ).
reserved = 'X'.
else.
reserved = ''.
endif.
data: custbook type BAPISBONEW.
node = document->find_from_name( name = 'AIRLINEID'
).
custbook-airlineid = node->get_value( ).
node = document->find_from_name( name = 'CONNECTID'
).
custbook-connectid = node->get_value( ).
data: fd type BAPISBONEW-FLIGHTDATE.
data: strFd type string.
node = document->find_from_name( name =
'FLIGHTDATE' ).
strFd = node->get_value( ).
CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
EXPORTING
DATE_EXTERNAL = strFd
* ACCEPT_INITIAL_DATE =
IMPORTING
DATE_INTERNAL = custbook-flightdate
EXCEPTIONS
DATE_EXTERNAL_IS_INVALID = 1
OTHERS = 2
.
IF SY-SUBRC <> 0.
* Do something
ENDIF.
node = document->find_from_name( name =
'CUSTOMERID' ).
custbook-customerid = node->get_value( ).
node = document->find_from_name( name = 'CLASS' ).
custbook-class = node->get_value( ).
node = document->find_from_name( name = 'AGENCYNUM'
).
custbook-agencynum = node->get_value( ).
node = document->find_from_name( name = 'PASSNAME'
).
custbook-passname = node->get_value( ).
data: pb type BAPISBONEW-PASSBIRTH.
data: strPb type string.
node = document->find_from_name( name = 'PASSBIRTH'
).
strPb = node->get_value( ).
CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
EXPORTING
DATE_EXTERNAL = strPb
* ACCEPT_INITIAL_DATE =
IMPORTING
DATE_INTERNAL = custbook-passbirth
EXCEPTIONS
DATE_EXTERNAL_IS_INVALID = 1
OTHERS = 2
.
IF SY-SUBRC <> 0.
* Something
ENDIF.
data: bn type BAPISBOKEY-BOOKINGID.
data: return type bapiret2_tab.
data: errmsg type string.
CALL FUNCTION 'BAPI_FLBOOKING_CREATEFROMDATA'
EXPORTING
RESERVE_ONLY = reserved
BOOKING_DATA = custbook
* TEST_RUN = ' '
IMPORTING
* AIRLINEID =
BOOKINGNUMBER = bn
* TICKET_PRICE =
TABLES
* EXTENSION_IN =
RETURN = return.
data: wa type bapiret2.
loop at return into wa.
if wa-type = 'E'.
move wa-message to errmsg.
response->append_cdata( errmsg ).
response->append_cdata( '<BR>' ).
endif.
endloop.
response->append_cdata( 'Flight booked, booking reference number: ').
data: strBn type string.
move bn to strBn.
response->append_cdata( strBn ).
endmethod.
The first page works fine but when I submit my form it fails. I debugged and the request object doesn't look right.
Any ideas would be greatly appreciated.
Regards,
Dan
Message was edited by:
Dan Scheck
Message was edited by:
Dan Scheck
Hi ..
For the sumbmit button in your adobe form .. tou would have mentioned "the controller name ' for eg ..'xxxxx.do' ..
If you mention the whole url ..like "http:/......zapplication/xxx.do" in that place ..it will work fine..
regards
sivaraj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks to Jeff Gebo for his assistance on this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Surija,
there is an issue with Internet Explorer that causes this problem when you launch the BSP applicaiton using the test menu in SE80. The issue does not occur with Firefox...very strange I know.
Anyway, to get around this you just copy the BSP application URL and open a browser and paste the URL in...so essentially do not use the "Test" in SE80 to launch your application.
Hope this fixes your problem!
Cheers,
Jeff
User | Count |
---|---|
96 | |
11 | |
11 | |
10 | |
9 | |
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.