Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

submit

Hi all,

In a report when user clicks a push button then it prompts user to enter values in a dialog box say date and time .

Then i have to capture the values user entered and i have to submit these values to another executable program.

Is it possible if possible please tell me how to do it.

Thanks

chandu

Tags:
replied

Here is a sample program which uses a function module to throw the popup for values and brings them back. You can then use them values in your SUBMIT statement.


report zrich_0001 .

data: ivals type table of sval with header line.

data: x_datum type sy-datum,
      x_uzeit type sy-uzeit.

start-of-selection.

* Add the fields that you want to be in the popup box
  ivals-tabname = 'SYST'.
  ivals-fieldname = 'DATUM'.
  append ivals.

  ivals-tabname = 'SYST'.
  ivals-fieldname = 'UZEIT'.
  append ivals.

* Throw the popup
  call function 'POPUP_GET_VALUES'
    exporting
*   NO_VALUE_CHECK        = ' '
      popup_title           = 'Enter Date & Time'
*   START_COLUMN          = '5'
*   START_ROW             = '5'
* IMPORTING
*   RETURNCODE            =
    tables
      fields                = ivals
   exceptions
     error_in_fields       = 1
     others                = 2
            .

* Get the values from the POPUP and put them into
* local variables
  read table ivals with key fieldname = 'DATUM'.
  if sy-subrc  = 0.
    x_datum = ivals-value.
  endif.

  read table ivals with key fieldname = 'UZEIT'.
  if sy-subrc  = 0.
    x_uzeit = ivals-value.
  endif.


<b>* Here P_DATUM and P_UZEIT are define as PARAMETERS in 
* the ZREPORT program</b> 
  submit zreport
          with p_datum = x_datum
          with p_uzeit = x_uzeit
               and return.

Regards,

Rich Heilman

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question