Professional Documents
Culture Documents
*Estructura de parmetros
DATA: LF_SP_GROUP TYPE SLIS_T_SP_GROUP_ALV,"Manejar grupos de campos
LF_LAYOUT TYPE SLIS_LAYOUT_ALV, "Manejar diseo de layout
IT_TOPHEADER TYPE SLIS_T_LISTHEADER, "Manejar cabecera del rep
WA_TOP LIKE LINE OF IT_TOPHEADER. "Lnea para cabecera
menu entries and favorites. entries. You can adjust the favorites. area in particular to
your needs. The entries of the SAP menus and the user menus can only be changed by
system administrators.
*Llamado al ALV
*ALV Report
PERFORM alv_report USING itab[].
their user menus. If both menus are disallowed, then the user menu is still
displayed. The availability of the user or SAP menu does not affect a user.s
authorizations. This means that a user can always call authorized functions
using a transaction code, independent of the menu structure.
The role-based user menu is created on the basis of the role(s) assigned to the user
and transferred to the front end. This means that it makes sense to keep roles as small
as possible because large roles could take a long time to transfer
*FORM ALV_INI_FIELDCAT para crear el catlogo de campos con sus propiedades.
FORM ALV_INI_FIELDCAT .
*Documento Comercial
CLEAR alv_git_fieldcat.
alv_git_fieldcat-fieldname = 'PEDIDO'.
alv_git_fieldcat-key = 'X'.
alv_git_fieldcat-seltext_m = 'Doc. Comercial'.
alv_git_fieldcat-seltext_l = 'Doc. Comercial'.
alv_git_fieldcat-col_pos = 0.
alv_git_fieldcat-sp_group = 'A'.
alv_git_fieldcat-outputlen = '20'.
APPEND alv_git_fieldcat TO alv_git_fieldcat.
CLEAR alv_git_fieldcat.
alv_git_fieldcat-SP_GROUP = 'A'.
MODIFY alv_git_fieldcat FROM alv_git_fieldcat
TRANSPORTING SP_GROUP WHERE FIELDNAME = 'VBTYP'
.
Hint: As long as you have the appropriate authorization, you can also display
user menus other than the ones assigned to you in your user master record.
To do this, choose Other menu. Use Create role to start the role maintenance
transaction, PFCG.
The user and SAP menus can be structured in a pretty complex way. It is then difficult
to remember the exact path for the transaction you are looking for. As long as the
transaction has not been copied into the favorite area, you can find it more easily
with special search transactions. The transactions SEARCH_SAP_MENU and
SEARCH_USER_MENU search the corresponding menus for the predefined text
pattern. The search result is prepared in a list view from which you can take the
navigation path. The transactions found cannot be started directly with a double-click.
A further search option for SAP menu entries is the transaction SDMO, which also
allows you to search for a text pattern. A (technically out-of-date) dynamic menu is
generated, from which the transactions found can be started with a double-click.
Favorites Management
In addition to the area menu or SAP menu, the user is also provided with functions
in the favorites. area. Links to frequently used transactions, web links or files can
be stored in the favorites. area.
The users. favorites. entries are in the system tables SMEN_BUFFC and
SMEN_BUFFI. Administrators can access these table to make changes and thereby
change or delete the favorites of large user groups.
The favorites list thus contains references to SAP system functions or links to internet
content or to files on the end user.s front-end computer. The favorites list, which
is initially empty, can be edited by each end user in accordance with his or her
preferences; you can only view your own favorites list. Since data on the favorites is
stored within the SAP system, each user might have different collections of favorites
in different systems.
62
* FORM LAYOUT_BUILD para disear el Layout de salida del ALV
FORM LAYOUT_BUILD USING U_LF_LAYOUT TYPE SLIS_LAYOUT_ALV.
extent. If you have highlighted a menu entry using the mouse, you can copy
the selected node in the favorites. area by right-hand mouse click.
Alternatively, you can also drag the elements from the menu area using the mouse and
store them in the favorites. area (Drag&Drop). You can add URLs or links to files to
your list of favorites by choosing FavoritesAdd other objects. Click on the triangle
symbol to the left of the file symbol to expand or collapse the list of favorites.
Hint: To change the name of a transaction in Favorites, highlight the
corresponding favorites entry and select the menu path Favorites Change.
You can change and save the text in the dialog box that opens.
You can delete favorites. entries that you no longer need. In doing so, the link to the
corresponding function is deleted from your favorites. list. If you want to delete the
entire Favorites menu, highlight the entry Favorites and right-click to call up the
available context menu. Choose Delete all favorites.
2008
*EVENTOS
*El FORM TOP_OF_PAGE nos permite configurar la cabecera del reporte
FORM top_of_page.
REFRESH it_topheader.
* Clientes
MOVE: 'S' TO wa_top-typ,
l_cli TO wa_top-info,
'Clientes:' TO wa_top-key.
APPEND wa_top TO it_topheader.
ENDFORM. "top_of_page
* EL FORM PF_STATUS nos permite asignar el Status GUI que queremos para el reporte.
ENDFORM.
You can reach the menus in the menu bar by simply using the key combination
Alt+<#> (# corresponds to the underlined letter of the selected menu item) or Alt
and cursor navigation using the arrow keys on the keyboard.
You can use the keyboard to get to the SAP Easy Access screen or the OK Code field
and call system functions from there.
Hint: Use the following keys to navigate using the keyboard:
. TAB moves from one field element to the next within a field group.
. Ctrl + TAB goes from one field group to the first element of the next
field group.
. Ctrl + / goes directly to the OK Code field.
You can find further shortcuts using Customizing of local layout (Alt+F12)
SAP GUI Help.
64
* El FORM USER_COMMAND nos permite controlar los eventos dentro del reporte
CASE R_UCOMM.
WHEN 'BEAN'.
*** CUANDO EL USUARIO DA CLIC EN UNA COLUMNA DEL REPORTE
READ TABLE itab INDEX RS_SELFIELD-TABINDEX.
PERFORM bath.
rs_selfield-refresh = 'X'.
rs_selfield-col_stable = 'X'.
rs_selfield-row_stable = 'X'.
CALL TRANSACTION 'VA43' USING bdc_tabla[] MODE 'E'.
WHEN '&NFO'.
LOOP AT itab INTO linea WHERE check = 'X'.
*** CUANDO EL USUARIO DA CLIC EN UN BOTON/PULSADOR CREADO POR NOSOTROS
CALL FUNCTION 'SD_ORDER_CREDIT_RELEASE'
EXPORTING
VBELN = linea-pedido.
IF sy-subrc EQ 0.
MESSAGE i398(00) WITH 'Documento' linea-pedido 'desbloquead
o y liberado'.
MODIFY itab FROM linea INDEX index TRANSPORTING check.
ELSE.
MESSAGE i398(00) WITH 'Documento' linea-pedido 'no liberado
'.
ENDIF.
ENDCASE.
ENDFORM.