cancel
Showing results for 
Search instead for 
Did you mean: 

[Beginner] Transferring parameters between Pages

guillaume-hrc
Active Contributor
0 Kudos

Hi,

It is my first BSP Application.

I have troubles transferring parameters from one page to the other. It seems that nothing is transferred at all !

My BSP application is : <b>Stateful</b>

It has 2 pages :

start.htm

report.htm

In the OnInputProcessing handler, I use these statements to pass on data from <i>start.htm</i> to <i>report.htm</i> :

        navigation->set_parameter( name = 'LAUNCH_DATE' value = w_launch_date ).
        navigation->set_parameter( name = 'LAUNCH_TIME' value = w_launch_time ).

        navigation->next_page( 'TOREPORT' ).

Besides, my Page attributes in <i>report.htm</i> (which has the 'TOREPORT' navigation request) are defined as follows :

<b> Name Auto Typing Assoc. Type Description</b>

LAUNCH_DATE X TYPE D Date of launch

LAUNCH_TIME X TYPE T Time of launch

Please, could you see what is missing ??

Thanks in advance.

Cheers,

Guillaume

Accepted Solutions (0)

Answers (3)

Answers (3)

guillaume-hrc
Active Contributor
0 Kudos

Thanks for you recommendations !

Actually, it seems that what was preventing<i> report.htm</i> to get the values of the attributes was the Type. Indeed, I declared them as <b>Type D</b> and <b>Type T</b> whereas the set_parameter automatically converts them into <b>STRING</b>.

Therefore, I declared them as STRING and I add this bit of code and everything goes well now !

DATA : w_launch_date     TYPE d,
       w_launch_time     TYPE t.

*_ Convert Date attribute
CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
  EXPORTING
    date_external            = launch_date
  IMPORTING
    date_internal            = w_launch_date
  EXCEPTIONS
    date_external_is_invalid = 1
    OTHERS                   = 2.
IF sy-subrc <> 0.
  w_launch_date = sy-datum.
ENDIF.

*_ Convert Time attribute
CALL FUNCTION 'CONVERT_TIME_INPUT'
  EXPORTING
    input                     = launch_time
  IMPORTING
    output                    = w_launch_time
  EXCEPTIONS
    plausibility_check_failed = 1
    wrong_format_in_input     = 2
    OTHERS                    = 3.
IF sy-subrc <> 0.
  w_launch_time = sy-uzeit - 10.
ENDIF.

Thanks again.

Cheers,

Guillaume

Former Member
0 Kudos

Hi Guillaume,

Try giving <b>toreport</b> instead of TOREPORT as navigation request. Let us know if it works.

Regards,

Ravikiran.

Former Member
0 Kudos

HI Guillaume,

To pass the parameters you don't have to make the application stateful.

Please try doing the following changes.In onInputProcessing

<b>navigation->goto_page( 'report.htm' ).</b>

instead of navigation->next_page( 'TOREPORT' ).

Also ensure that in the second page(report.htm),the page attributes LAUNCH_DATE and LAUNCH_TIME should be checked to AUTO .

Hope this helps,

Regards,

Siddhartha