Vous êtes sur la page 1sur 3

*&---------------------------------------------------------------------*

*& NOME DO PROGRAMA : ZZ_SHLP_PAGTOSPB


*& TTULO DO PROGRAMA : EXIT DE AJUDA DE PESQUISA CDIGO DO TIPO DE PAGAMENTO SPB
*& PROGRAMADOR : Bruno Santos(T0695)
*& DATA : 20/05/2013
*& LTIMA ATUALIZAO : 20/05/2013
*&
*& DESCRIO
*&---------------------------------------------------------------------*
*& LISTA DE MODIFICAES: *
*& DATA AUTOR REQUEST # DESCRIO *
*& 14/05/2013 T0695 SPDK900013 CODIFICAO INICIAL *
*&---------------------------------------------------------------------*

FUNCTION zz_shlp_pagtospb.
*"----------------------------------------------------------------------
*"*"Interface local:
*" TABLES
*" SHLP_TAB TYPE SHLP_DESCT
*" RECORD_TAB STRUCTURE SEAHLPRES
*" CHANGING
*" REFERENCE(SHLP) TYPE SHLP_DESCR
*" REFERENCE(CALLCONTROL) LIKE DDSHF4CTRL STRUCTURE DDSHF4CTRL
*"----------------------------------------------------------------------

* EXIT immediately, if you do not want to handle this step


IF callcontrol-step <> 'SELONE' AND
callcontrol-step <> 'SELECT' AND
" AND SO ON
callcontrol-step <> 'DISP'.
EXIT.
ENDIF.

*"----------------------------------------------------------------------
* STEP SELONE (Select one of the elementary searchhelps)
*"----------------------------------------------------------------------
* This step is only called for collective searchhelps. It may be used
* to reduce the amount of elementary searchhelps given in SHLP_TAB.
* The compound searchhelp is given in SHLP.
* If you do not change CALLCONTROL-STEP, the next step is the
* dialog, to select one of the elementary searchhelps.
* If you want to skip this dialog, you have to return the selected
* elementary searchhelp in SHLP and to change CALLCONTROL-STEP to
* either to 'PRESEL' or to 'SELECT'.
IF callcontrol-step = 'SELONE'.
* PERFORM SELONE .........
EXIT.
ENDIF.

*"----------------------------------------------------------------------
* STEP PRESEL (Enter selection conditions)
*"----------------------------------------------------------------------
* This step allows you, to influence the selection conditions either
* before they are displayed or in order to skip the dialog completely.
* If you want to skip the dialog, you should change CALLCONTROL-STEP
* to 'SELECT'.
* Normaly only SHLP-SELOPT should be changed in this step.
IF callcontrol-step = 'PRESEL'.
* PERFORM PRESEL ..........
EXIT.
ENDIF.
*"----------------------------------------------------------------------
* STEP SELECT (Select values)
*"----------------------------------------------------------------------
* This step may be used to overtake the data selection completely.
* To skip the standard seletion, you should return 'DISP' as following
* step in CALLCONTROL-STEP.
* Normally RECORD_TAB should be filled after this step.
* Standard function module F4UT_RESULTS_MAP may be very helpfull in this
* step.

IF callcontrol-step = 'SELECT'.

* Seleciona o tipo de pagamento e a descrio


SELECT cod_tp_pagto desc_tp_pagto
INTO TABLE t_tppamento
FROM zfi_t_spbpagto.

* Ordena a tabela pelo cdigo de pagamento


SORT t_tppamento BY cod_tp_pagto.

* Deleta os cdigos duplicados


DELETE ADJACENT DUPLICATES FROM t_tppamento COMPARING cod_tp_pagto.

EXIT.

ENDIF.

*"----------------------------------------------------------------------
* STEP DISP (Display values)
*"----------------------------------------------------------------------
* This step is called, before the selected data is displayed.
* You can e.g. modify or reduce the data in RECORD_TAB
* according to the users authority.
* If you want to get the standard display dialog afterwards, you
* should not change CALLCONTROL-STEP.
* If you want to overtake the dialog on you own, you must return
* the following values in CALLCONTROL-STEP:
* - "RETURN" if one line was selected. The selected line must be
* the only record left in RECORD_TAB. The corresponding fields of
* this line are entered into the screen.
* - "EXIT" if the values request should be aborted
* - "PRESEL" if you want to return to the selection dialog
* Standard function modules F4UT_PARAMETER_VALUE_GET and
* F4UT_PARAMETER_RESULTS_PUT may be very helpfull in this step.

IF callcontrol-step = 'DISP'.

LOOP AT t_tppamento INTO wa_tppamento.

CONCATENATE wa_tppamento-cod_tp_pagto
wa_tppamento-desc_tp_pagto
INTO record_tab-string RESPECTING BLANKS.

APPEND record_tab.

ENDLOOP.
callcontrol-sortoff = 'X'.

ENDIF.

ENDFUNCTION.

Vous aimerez peut-être aussi