cancel
Showing results for 
Search instead for 
Did you mean: 

POP-UP In smartforms

Former Member
0 Kudos

Hi people i have a problem.

I have a document with 2 fields. This is the procedure:

I check the value of the field and , if the two field are different i must hava a POP-UP window that permitt me to select one of this. This Pop-Up must appear when i start the stamp with smartform.

So:

I go to va02 , i select an Order Number, i go to output and select Stamp. When i start this , if the 2 parameters are different, appears POP-UP.

My problem is about POP-UP. How to create it and how to use it.

Thanks for the reply.

Accepted Solutions (1)

Accepted Solutions (1)

naimesh_patel
Active Contributor
0 Kudos

In your driver program, which prints the Smartform, before calling the Smartform FM you can call FM POPUP_TO_CONFIRM.

Regards,

Naimesh Patel

Former Member
0 Kudos

Perfect , you solve my problem but the real problem is another. I don't know exactly how to use a Function Module.

Thanks very much for the reply!

naimesh_patel
Active Contributor
0 Kudos

You can use it like this:

DATA L_MESSAGE TYPE STRING.
DATA L_TITLE TYPE STRING.

DATA: L_ANSWER TYPE CHAR1.

L_TITLE = 'Decide the field'.

L_MESSAGE = 'Decide the FIeld form below'.


CALL FUNCTION 'POPUP_TO_CONFIRM'
  EXPORTING
    TITLEBAR              = L_TITLE
    TEXT_QUESTION         = L_MESSAGE
    TEXT_BUTTON_1         = 'FIELD1'
    TEXT_BUTTON_2         = 'FIELD2'
    DEFAULT_BUTTON        = '1'
    DISPLAY_CANCEL_BUTTON = ' '
  IMPORTING
    ANSWER                = L_ANSWER.

CASE L_ANSWER.
  WHEN 1.
*   selected field is FIELD1
  WHEN 2.
*   selected field is FIELD2
ENDCASE.

Regards,

Naimesh Patel

Former Member
0 Kudos

Wonderful!

Thank you very much!

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Assuming your form is being generated in the dialog process (i.e. not in a background process) then what you need can be achieved quite simply.

You can build your pop-up in a function module, using regular ABAP screen painter, then call this function module from an ABAP node in the appropriate point of the smartform (probably the initialisation).

Regards,

Nick