SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

Display a Popup and Get Values from User



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> Programming Techniques | Приемы программирования
View previous topic :: View next topic  
Author Message
admin
Администратор
Администратор



Joined: 01 Sep 2007
Posts: 1636

PostPosted: Fri Oct 10, 2014 4:47 pm    Post subject: Display a Popup and Get Values from User Reply with quote

In some cases, we are needed to get some inputs from the user at run-time of an application based on certain dynamic conditions.

Function Module POPUP_GET_VALUES can be used to display a popup to get inputs from user. The specialty of this function module is we can add as many number of fields as we want. The fields can be of any data type.

Code:
REPORT ztestpopup.

DATA: t_fields LIKE sval OCCURS 0 WITH HEADER LINE.

START-OF-SELECTION.

*— Prepare Parameters for FM ————-*
t_fields-tabname = ’BKPF’.
t_fields-fieldname = ’BUDAT’.
APPEND t_fields.

t_fields-tabname = ’BKPF’.
t_fields-fieldname = ’BLART’.
APPEND t_fields.

*—- Function Module Call —————–*
CALL FUNCTION ’POPUP_GET_VALUES’
EXPORTING
*  NO_VALUE_CHECK = ’ ’
popup_title = ’Test Popup’
*  START_COLUMN = ’5’
*  START_ROW = ’5’
*  IMPORTING
*  RETURNCODE =
TABLES
fields = t_fields
EXCEPTIONS
error_in_fields = 1
OTHERS = 2
.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

*— Display Report —————-*
LOOP AT t_fields.
WRITE:/ t_fields-value.
ENDLOOP.



popup.jpg
 Description:
 Filesize:  45.85 KB
 Viewed:  2766 Time(s)

popup.jpg


Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> Programming Techniques | Приемы программирования All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG.
Every effort is made to ensure content integrity. Use information on this site at your own risk.