0% found this document useful (0 votes)
34 views1 page

Prog. Cadastro - Snro

The document describes a SAP report that registers a responsible person by calling a function to generate a task number, modifying a database table with the new data, and committing or rolling back based on the result code.

Uploaded by

Leandro Faria
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views1 page

Prog. Cadastro - Snro

The document describes a SAP report that registers a responsible person by calling a function to generate a task number, modifying a database table with the new data, and committing or rolling back based on the result code.

Uploaded by

Leandro Faria
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

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

*& Report ZCAD_RESPON


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

REPORT zcad_respon.

TABLES ztresponsavel.

DATA: wa_ztresponsavel TYPE ztresponsavel,


lv_number_ranger TYPE zel_tasker.

PARAMETERS: cp_resp TYPE ztresponsavel-cp_resp.

wa_ztresponsavel-cp_resp = cp_resp.

CALL FUNCTION 'NUMBER_GET_NEXT'


EXPORTING
nr_range_nr = '01'
object = 'ZTASKER_N'
IMPORTING
number = lv_number_ranger.

wa_ztresponsavel-cp_tasker = lv_number_ranger.

MODIFY ztresponsavel FROM wa_ztresponsavel.

IF sy-subrc = 0.

COMMIT WORK AND WAIT. "Comando para gravar no Banco de Dados


MESSAGE 'Respons�vel Cadastrado no SAP' TYPE 'S'.

ELSE.

ROLLBACK WORK. "Comando para retornar as informa��es caso apresente erro


MESSAGE 'Houve um Problema !' TYPE 'E'.

ENDIF.

You might also like