Enterprise Resource
Planning Portal

 

Advertise | Founder BLOG

ERPGenie.COM ABAP Tips and Tricks Database

THE ultimate
ERP website

 

Forums | Vote for us |

Google    Other Search Options

Home arrow Tips and Tricks arrow Dialog Programming
Dialog Programming
Forcing the calling of PBO PDF Print E-mail
User Rating: / 0
Written by Anon.   
Friday, 18 September 2009
* Usually this command is enough to call PAI/PBO by force
CALL METHOD cl_gui_cfw=>set_new_ok_code
EXPORTING
new_code = 'DUMMY'.

* If not, try this one additionally (available only with SAP GUI for Windows)
CALL FUNCTION 'SAPGUI_SET_FUNCTIONCODE'
EXPORT
FUNCTIONCODE = '/00'
EXCEPTIONS
FUNCTION_NOT_SUPPORTED = 1.

* Synchronize Application Server and Frontend data, just to be sure :)
CL_GUI_CFW=>FLUSH.
 
Select-options in a module pool screen PDF Print E-mail
User Rating: / 1
Written by Voice   
Wednesday, 02 September 2009

Method 1

a) Create a subscreen area in your screen layout where you want to create the select options.
b) In the top include of  your module pool program declare a selection screen as a subscreen e.g.
       SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.
             select-options s_matnr for mara-matnr.
       SELECTION-SCREEN END OF SCREEN.
c) In the PBO and PAI of the main screen where the select options needs to be created do a call subscreen of the above screen (100).
       CALL SUBCREEN sub_area INCLUDING    
  This call subscreen statement is necessary for transport of values between screen and program.

Note: All validations of the selection screen fields e.g. the s_matnr field created above should be done in selection screen events like AT SELECTION-SCREEN etc and not in PAI. These selection screen validations etc should be done in the top include only.

Method 2

a) Create 2 separate fields in your screen layout - one for the low value and one for the high value. Insert an icon beside the high value which will call the multiple selections popup screen on user command. Use function module COMPLEX_SELECTIONS_DIALOG to achieve this.

struc_tab_and_field-fieldname   = con_cust.      " 'KUNNR'
struc_tab_and_field-tablename = con_kna1.     " 'KNA1'.

CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
          EXPORTING
            text                  = g_titl1                                " 'Customers'
            tab_and_field     = struc_tab_and_field
          TABLES
            RANGE              = rng_kunnr
          EXCEPTIONS
            NO_RANGE_TAB          = 1
            CANCELLED              = 2
            INTERNAL_ERROR     = 3
            INVALID_FIELDNAME = 4
            OTHERS                           = 5.

IF NOT rng_kunnr[] IS INITIAL.
*          Read the very first entry of the range table and pass it to
*          dynpro screen field
           READ TABLE rng_kunnr INDEX 1.
           IF sy-subrc = 0.
              g_cust = rng_kunnr-low.
           ENDIF.

You can use the return table rng_kunnr to populate your own internal range table with the values entered by the user. Basically here you are just simulating the work of a select-options parameter by module pool screen elements.
 
GUI-Status - Default codes for standard buttons PDF Print E-mail
User Rating: / 0
Written by Kevin Wilson   
Tuesday, 24 February 2009
If you use the codes below, the buttons will work automatically:

BACK   = BACK
Exit   = %EX
Cancel = RW
 
Generate your own standard F4 help PDF Print E-mail
User Rating: / 0
Written by Dany Charbonneau   
Tuesday, 22 May 2007
To avoid the standard F4 help to be show, insert the event PROCESS ON-VALUE-REQUEST request in the program and add a field statement for the field that should trigger the F4 help. In the module called from PROCESS ON-VALUE-REQUEST request, call function module F4IF_FIELD_VALUE_REQUEST.

Example:
Read more...
 
How do I hide a column in a table control at runtime? PDF Print E-mail
User Rating: / 1
Written by Manoj Nair   
Thursday, 12 April 2007
1. define group name(s) for the columns to be hidden
2. Add the following code...
(define)
controls tbl_ctrl type tableview ...
wa like tbl_ctrl-cols.

loop at tbl_ctrl-cols into wa.
     if wa-screen-group1 = <group defined for the column>
        wa-invisible = 1.
        modify tbl_ctrl-cols from wa
    endif
endloop

 
How do I change attributes of an item in a screen and in a table control at runtime? PDF Print E-mail
User Rating: / 1
Written by Anon.   
Tuesday, 10 April 2007
add the following code in PBO

loop at screen.                      
      if screen-name = 'NAME_OF_FIELD_HERE_IN_CAPS'.   
  set attributes of screen such as REQUIRED, INPUT, OUTPUT, INTENSIFIED, INVISIBLE, ACTIVE, DISPLAY_3D, VALUE_HELP to 1(ON) or 0(OFF)   
         e.g. screen-output = 1.              
         modify screen.                  
      endif.                             
endloop

if the field is part of a table control, put the above code within the the loop...endloop of the table control in PBO

 
Q&A on Dialog Programming PDF Print E-mail
User Rating: / 2
Written by Anon.   
Thursday, 01 March 2007
Read more...
 
Modify your recording scenario PDF Print E-mail
User Rating: / 1
Written by sasmito   
Monday, 19 February 2007

Sometimes we need to use recording added to our enhancement program. If the recording consists of a table control such as in VL31N and you need to select or deselect some line items ...

Last Updated ( Tuesday, 20 February 2007 )
Read more...
 
System GUI Status Values PDF Print E-mail
User Rating: / 3
Written by Kevin Wilson   
Thursday, 08 February 2007

BACK       %EX        RW         PRI        %SC        %SC+               P--        P-         P+         P++

Back         Exit          Cancel   Print      Search     Search Again   Duhhhh!!!
 
Saving screens created with Screen Painter PDF Print E-mail
User Rating: / 1
Written by Paul Kjaer   
Wednesday, 31 January 2007
If you are in Object Browser looking at the module program, you can highlight the screens and click the print button. Click no to print immediately, then go into System -- Services -- Output Control to select the spool request and then go into List -- Save -- Local File. (Of course, you can send it to a printer to see documentation on your screen).
 
Up/Downloading Dynpros in 4.x PDF Print E-mail
User Rating: / 3
Written by Francois Henrotte   
Wednesday, 31 January 2007

The option to download dynpros does not appear in the menu structure in 4.x. The function is there but you just don't have access through the menu. Type 'UTDL' in the command field to dowload a dynpro (you must be in display or change mode). To upload it into another system for example, create a new dynpro and enter in edit mode. Type 'UTUL' in the command field.

Note that this works in version 3.1 and up of SAP.

 
Creating a subscreen PDF Print E-mail
User Rating: / 0
Written by aNON.   
Saturday, 20 January 2007
A demo program to create subscreen in your ABAP Program
This report will display the user last login date and time.
Subscreen selection 1 : User Name
                                  2 : Last Login Date
                                  3 : Class Belong To
Read more...
 

Google Search

Google Ads