Parametros en un reporte
Hola a Todos
Necesito saber como enviar un parametro desde una forma a un reporte. básicamente tengo el numero de matricula de una persona y ese numero de matricula necesito enviarlo a un reporte para que en base a ese numero emita un recibo
Gracias
hello,
you might want to look into RUN_REPORT_OBJECT in the forms online help system.
regards,
philipp
Similar Messages
-
Parametro que filtre otro Parametro en Cristal Report
Hola Comunidad Sap soy nuevo y me gustaria que me ayudaran con la siguiente consulta
Como puedo hacer en el caso siguiente
Tengo el HomeState de OHEM y tengo el SalePrson de OHEM los cuales estoy
Usando para parámetros dentro de un reporte el homestate es el estado del empleado y el saleprson son las serie y nombre del vendedor
Lo que deseo es que al seleccionar en el parámetro de homestate es el estado del empleado con la que desea trabajar en el reporte
En el siguiente parametreo de salesprson solo me muestre los empleados según el estado que escogi en el homestate
Como hago eso?
de que el primer parametro homestate me filtre el parametro saleprson
claro esta que todo lo estoy intentando en Cristal reportHola kevin,
Lo he utilizado en crystal en mi Reporte funcionaba de la siguiente manera:
Tenia una tabla de usuario que se llamaba Familia y otra sub familia.
Entonces cree dos parámetros familia y sub familia que tenia un campo vinculante a la tabla familia.
Familia@ select code,name from [@familia]
SUBFAMILIA@ SELECT CODE,NAME FROM [@SUB_FAMILIA] WHERE U_EX_CODFAM='@FAMILIA'
En tu caso tienes tus dos parámetros
Homestate@ select * from OHEM
Vendedor@ select * from oslp inner join ohem ON OSLP.SLPCODE=OHEM.slpcode and ohem.homstate='Homestate@'
OJO Los querys son referenciales ya que no se cual es tu query.
Saludos,
Wuilmer Venegas -
Recien estoy haciendo pruebas con el Addon de Cristal Reports y todo va bien, hice unos reportes simples y todo funciona dentro de SAP, sin embargo a la hora que quiero usar parametros como son cliente, rango de fechas, etc no funciona el reporte dentro de sap.
A alguien le ha pasado algo similiar o tiene este mismo problema??El problema es que no funciona en ningun lado......
Lo instale en el mismo server de sap, el addon corre pero no funciona al ejecutar el reporte.
Lo que hago es esto:
1.-Genero el rpt con parametros en la maquina donde esta el Crystal(ahi si funcionan estos)
2.-Copio este reporte al server via red.
3.-En sap inserto el reporte y pon full access a el.
4.-Lo ejecuto....
Ni desde el mismo SAP y no en2 maquinas diferentes me pide los parametros......
Lei en otro foro que se requeria hacer una conexion odbc o algo asi....
Lei una vez mas los manuales y no veo que haga menciona a eso.
Es necesario hacer ese tipo de conexiones en las maquinas que van a ejecutar el addon?? -
When clic in the field "i_ekpo-ebeln" tab exit in report ALV
Good Afternoon! *********************************************************
Coloquei all the code, I believe for better clarification. When clico in the field i_ekpo-ebeln in the report is called transaction ME23 c/o GRID this functioning normally, but with the reports List and Hierarquico it does not happen the same and it prints in the baseboard the message "Invalid Function". when standard use buttons, functions of course.
obs.: I had that to create a SET Pf-status for each type of report pos I wanted that when clicar in the field box and clicar in the button "TO PRINT REPORT" it printed sapscript. How I make to solve such problem?
Att, Carlos Eduardo.
REPORT ztreino NO STANDARD PAGE HEADING LINE-SIZE 220.
************************declarações*********************
DATA: BEGIN OF y_ekko OCCURS 0,
ebeln TYPE ekko-ebeln, "Nº documento de compra
bukrs TYPE ekko-bukrs, "Empresa
bsart TYPE ekko-bsart, "Documento de compra
loekz TYPE ekko-loekz, "Código de eliminação
aedat TYPE ekko-aedat, "Data de criação do registro
ernam TYPE ekko-ernam, "Nome do responsável que criou o objeto
lifnr TYPE ekko-lifnr, "Nº conta do fornecedor
ekgrp TYPE ekko-ekgrp, "Grupo de compradores
waers TYPE ekko-waers, "Chave da moeda
BOX TYPE ptrv_approval-box, "campo para chekinbox
END OF y_ekko,
BEGIN OF y_ekpo OCCURS 0,
ebeln TYPE ekpo-ebeln, "Nº documento de compra
ebelp TYPE ekpo-ebelp, "Nº item do documento de compra
loekz TYPE ekpo-loekz, "Código de eliminação
txz01 TYPE ekpo-txz01, "Texto breve
matnr TYPE ekpo-matnr, "Nº material
bukrs TYPE ekpo-bukrs, "Empresa
werks TYPE ekpo-werks, "Centro
menge TYPE ekpo-menge, "Quantidade do pedido
netpr TYPE ekpo-netpr, "Preço líquido no documento de compra
BOX TYPE ptrv_approval-box, "campo para chekinbox
END OF y_ekpo.
*início seleção de dados
SELECTION-SCREEN BEGIN OF BLOCK bl2 WITH FRAME TITLE text-000.
SELECTION-SCREEN BEGIN OF BLOCK bl1 WITH FRAME TITLE text-001.
SELECTION-SCREEN SKIP.
*Nº documento de compra
SELECT-OPTIONS : s_ebeln FOR ekko-ebeln NO INTERVALS OBLIGATORY,
s_bukrs FOR ekko-bukrs OBLIGATORY, "Empresa
s_bsart FOR ekko-bsart. "Documento de compra
SELECTION-SCREEN END OF BLOCK bl1.
SELECTION-SCREEN END OF BLOCK bl2.
**fim da seleção de dados----
**início da variante
SELECTION-SCREEN BEGIN OF BLOCK bl4 WITH FRAME TITLE text-000.
SELECTION-SCREEN BEGIN OF BLOCK bl3 WITH FRAME TITLE text-002.
PARAMETERS : p_vari LIKE disvariant-variant.
SELECTION-SCREEN END OF BLOCK bl3.
SELECTION-SCREEN END OF BLOCK bl4.
***fim variante -
***início modo relatório
SELECTION-SCREEN BEGIN OF BLOCK bl5 WITH FRAME TITLE text-000.
SELECTION-SCREEN BEGIN OF BLOCK bl6 WITH FRAME TITLE text-003.
SELECTION-SCREEN SKIP.
PARAMETERS : rb1 RADIOBUTTON GROUP TIPO DEFAULT 'X',
rb2 RADIOBUTTON GROUP TIPO,
rb3 RADIOBUTTON GROUP TIPO.
SELECTION-SCREEN END OF BLOCK bl6.
SELECTION-SCREEN END OF BLOCK bl5.
****fim modo relatório
*******início da opção de download
Dados do arquivo texto de saída.
SELECTION-SCREEN BEGIN OF BLOCK bl9 WITH FRAME TITLE text-004.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(15) text-005.
PARAMETERS: p_gerar AS CHECKBOX.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(15) text-006.
PARAMETERS: p_dir LIKE rlgrap-filename DEFAULT 'c:'.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(15) text-007.
PARAMETERS: p_arq LIKE rlgrap-filename DEFAULT 'nota-geral.txt'.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN END OF BLOCK bl9.
DATA :
i_ekko LIKE y_ekko OCCURS 0 WITH HEADER LINE,
i_ekpo LIKE y_ekpo OCCURS 0 WITH HEADER LINE.
i_tabsaida LIKE y_saida OCCURS 0 WITH HEADER LINE.
*********************Fim Declarações*******************************
*********************Declarações ALV*******************************
TYPE-POOLS : slis.
DATA :
s_layout TYPE slis_layout_alv,
t_sort TYPE slis_t_sortinfo_alv WITH HEADER LINE,
t_fieldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE,
s_grupos TYPE slis_t_sp_group_alv WITH HEADER LINE,
s_keyinfo TYPE slis_keyinfo_alv,
extab TYPE slis_t_extab.
DATA :
variant_exit(1) TYPE c,
def_variant(1) TYPE c,
s_print TYPE slis_print_alv,
s_top TYPE slis_t_listheader,
variante TYPE disvariant,
def_variante TYPE disvariant,
v_repid LIKE sy-repid,
*------pega a data que esta rodando a transação
v_datasaida(10) TYPE C,
*------para saber quantos Pedidos na EKKO
v_exibe TYPE I,
s_selfield type slis_selfield,
v_ucomm like sy-ucomm.
**********************Fim declarações ALV*************************
Contants para Sapscript e declarações *
TABLES: ITCPO.
CONSTANTS: c_on(1) TYPE C VALUE 'X', "Parâmetro para o Sapscript
c_off(1) TYPE C VALUE ''. "Parâmetro para o Sapscript
Data:
v_element(15) TYPE C, "Elemento de texto do Sap Script
v_type(15) TYPE C, "BODY
v_window(15) TYPE C, "Janela
flag TYPE I, "Uma condição para impressão do sapscript
resp TYPE C, "resposta para confirmação do download tab
zlen TYPE I, "Para verificar o um diretório válido
Para a função WS_DOWNLOAD só em declarar as variaveis deste tipo já *
seria o bastante para passar o caminho para a função
TABLES : ekko, ekpo.
initialization *
INITIALIZATION.
PERFORM zf_verifica_variante.
at selection-screen on value-request *
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari.
PERFORM zf_busca_variante_existente.
at seletion-screen *
AT SELECTION-SCREEN.
PERFORM zf_valida_variante.
validar os campo antes de fazer download do arquivo
PERFORM zf_trata_parametros_gerar_arqu.
start-of-selection *
START-OF-SELECTION.
PERFORM zf_seleciona_dados.
Criando ALV *
PERFORM zf_alv.
*& Form zf_verifica_variante
text
--> Verifica se a variante selecionada é existente
FORM zf_verifica_variante.
CLEAR variante.
v_repid = sy-repid.
variante-report = v_repid.
Buscar variante default
def_variante = variante.
CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
EXPORTING
i_save = 'A'
CHANGING
cs_variant = def_variante
EXCEPTIONS
wrong_input = 1
not_found = 2
program_error = 3
OTHERS = 4.
IF sy-subrc EQ 0.
p_vari = def_variante-variant.
ENDIF.
ENDFORM. " zf_verifica_variante
*& Form zf_busca_variante_existente
*- text
*- --> Vai buscar a variante existente
FORM zf_busca_variante_existente.
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = variante " Report com as
i_save = 'A' " Variantes Salvas
i_tabname_header = 'I_EKPO' " Tabela interna saida
it_default_fieldcat = t_fieldcat[] " Tabela de formatação
i_display_via_grid = 'X' " Dispara POPUP em ALV
IMPORTING
e_exit = variant_exit " Se não existir variante X
es_variant = def_variante " Variante default
EXCEPTIONS
not_found = 1
program_error = 2
OTHERS = 3.
IF sy-subrc = 2.
MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
IF variant_exit = space.
p_vari = def_variante-variant. " Recebe variante escolhida
ENDIF.
ENDIF.
ENDFORM. " zf_busca_variante_existente
*-& Form zf_valida_variante
*- text
*- --> Verifica se a variante digitada é válida.
FORM zf_valida_variante.
IF NOT p_vari IS INITIAL.
variante = def_variante. "nome do report
def_variante-variant = p_vari. "nome que foi digitado
CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE'
EXPORTING
i_save = 'A'
CHANGING
cs_variant = def_variante
variante = def_variante.
ELSE.
clear variante.
variante-report = v_repid.
ENDIF.
ENDFORM. " zf_valida_variante
-& Form zf_seleciona_dados
*- text
--> Seleciona os dados da ekko e ekpo
FORM zf_seleciona_dados.
SELECT ebeln
bukrs
bsart
loekz
aedat
ernam
lifnr
ekgrp
waers
FROM ekko
INTO TABLE i_ekko
WHERE
( ebeln IN s_ebeln AND
bsart EQ 'NB' ).
SORT I_EKKO ASCENDING.
IF sy-subrc EQ 0.
SELECT ebeln
ebelp
loekz
txz01
matnr
bukrs
werks
menge
netpr
FROM ekpo
INTO TABLE i_ekpo
FOR ALL ENTRIES IN i_ekko
WHERE
( ebeln EQ i_ekko-ebeln ).
ENDIF.
SORT I_EKPO ASCENDING.
Para exibir no topo do relatório no grid
DESCRIBE TABLE I_EKKO LINES v_exibe.
ENDFORM. " zf_seleciona_dados
*-& Form zf_ALV
*- text
--> Opções de alv
FORM zf_alv.
IF rb1 = 'X'.
PERFORM zf_gri.
ENDIF.
IF rb2 = 'X'.
PERFORM ZF_HIERARQUICO.
ENDIF.
IF rb3 = 'X'.
PERFORM ZF_LIST.
ENDIF.
ENDFORM. " zf_ALV
*& Form zf_gri
*- text
*- --> Seqüência para gerar o alv grid
FORM zf_gri.
PERFORM zf_layout.
PERFORM zf_ordena_campos.
PERFORM zf_monta_campos_alv.
PERFORM zf_print.
PERFORM zf_grupo.
PERFORM zf_top USING s_top.
IF NOT I_EKPO[] IS INITIAL.
PERFORM zf_imprime_alv.
ELSE.
MESSAGE s000(zcl001) WITH 'Nenhum registro encontrado.'.
STOP.
ENDIF.
ENDFORM. " zf_gri
*-& Form zf_layout
*- text
--> cria o layout do alv
FORM zf_layout.
s_layout-box_tabname = 'I_EKPO'.
s_layout-box_fieldname = 'BOX'.
s_layout-get_selinfos = 'X'.
s_layout-detail_popup = 'X'.
s_layout-detail_initial_lines = 'X'.
s_layout-zebra = 'X'.
s_layout-colwidth_optimize = 'X'.
ENDFORM. " zf_layout
*-& Form zf_ordena_campos
*- text
--> Ordenação dos campos
FORM zf_ordena_campos.
CLEAR t_sort.
t_sort-spos = '1'. "prioridade de ordenação
t_sort-fieldname = 'EBELN'. "campo da tab int. de saida
t_sort-tabname = 'I_EKPO'. "tab inter de saida
t_sort-up = 'X'. "ordenação do maior para o menor
APPEND t_sort.
ENDFORM. " zf_ordena_campos
*-& Form zf_monta_campos_alv
text
--> è passado os campos de acordo com a ordem de exibição inicial
FORM zf_monta_campos_alv.
IF rb2 = 'X'.
CLEAR t_FIELDCAT.
t_FIELDCAT-FIELDNAME = 'BOX'.
t_FIELDCAT-TABNAME = 'I_EKKO'.
t_FIELDCAT-CHECKBOX = 'X'.
t_FIELDCAT-INPUT = 'X'.
APPEND t_FIELDCAT.
CLEAR t_fieldcat.
t_fieldcat-fieldname = 'EBELN'.
t_fieldcat-tabname = 'I_EKKO'.
t_fieldcat-ref_fieldname = 'EBELN'.
t_fieldcat-ref_tabname = 'EKKO'.
APPEND t_fieldcat.
CLEAR t_fieldcat.
t_fieldcat-fieldname = 'BUKRS'.
t_fieldcat-tabname = 'I_EKKO'.
t_fieldcat-ref_fieldname = 'BUKRS'.
t_fieldcat-ref_tabname = 'EKKO'.
APPEND t_fieldcat.
CLEAR t_fieldcat.
t_fieldcat-fieldname = 'BSART'.
t_fieldcat-tabname = 'I_EKKO'.
t_fieldcat-ref_fieldname = 'BSART'.
t_fieldcat-ref_tabname = 'EKKO'.
APPEND t_fieldcat.
CLEAR t_fieldcat.
t_fieldcat-fieldname = 'AEDAT'.
t_fieldcat-tabname = 'I_EKKO'.
t_fieldcat-ref_fieldname = 'AEDAT'.
t_fieldcat-ref_tabname = 'EKKO'.
APPEND t_fieldcat.
CLEAR t_fieldcat.
t_fieldcat-fieldname = 'ERNAM'.
t_fieldcat-tabname = 'I_EKKO'.
t_fieldcat-ref_fieldname = 'ERNAM'.
t_fieldcat-ref_tabname = 'EKKO'.
APPEND t_fieldcat.
CLEAR t_fieldcat.
t_fieldcat-fieldname = 'LIFNR'.
t_fieldcat-tabname = 'I_EKKO'.
t_fieldcat-ref_fieldname = 'LIFNR'.
t_fieldcat-ref_tabname = 'EKKO'.
APPEND t_fieldcat.
CLEAR t_fieldcat.
t_fieldcat-fieldname = 'EKGRP'.
t_fieldcat-tabname = 'I_EKKO'.
t_fieldcat-ref_fieldname = 'EKGRP'.
t_fieldcat-ref_tabname = 'EKKO'.
APPEND t_fieldcat.
ENDIF.
CLEAR t_fieldcat.
t_fieldcat-fieldname = 'EBELN'.
t_fieldcat-tabname = 'I_EKPO'.
t_fieldcat-ref_fieldname = 'EBELN'.
t_fieldcat-ref_tabname = 'EKPO'.
t_fieldcat-key = 'X'.
t_fieldcat-Hotspot = 'X'.
APPEND t_fieldcat.
CLEAR t_fieldcat.
T_fieldcat-fieldname = 'EBELP'.
T_fieldcat-tabname = 'I_EKPO'.
T_fieldcat-ref_fieldname = 'EBELP'.
T_fieldcat-ref_tabname = 'EKPO'.
APPEND t_fieldcat.
CLEAR t_fieldcat.
t_fieldcat-fieldname = 'MATNR'.
t_fieldcat-tabname = 'I_EKPO'.
t_fieldcat-ref_fieldname = 'MATNR'.
t_fieldcat-ref_tabname = 'EKPO'.
APPEND t_fieldcat.
CLEAR t_fieldcat.
t_fieldcat-fieldname = 'WERKS'.
t_fieldcat-tabname = 'I_EKPO'.
t_fieldcat-ref_fieldname = 'WERKS'.
t_fieldcat-ref_tabname = 'EKPO'.
APPEND t_fieldcat.
CLEAR t_fieldcat.
t_fieldcat-fieldname = 'MENGE'.
t_fieldcat-tabname = 'I_EKPO'.
t_fieldcat-ref_fieldname = 'MENGE'.
t_fieldcat-ref_tabname = 'EKPO'.
APPEND t_fieldcat.
CLEAR t_fieldcat.
t_fieldcat-fieldname = 'NETPR'.
t_fieldcat-tabname = 'I_EKPO'.
t_fieldcat-ref_fieldname = 'NETPR'.
t_fieldcat-ref_tabname = 'EKPO'.
t_fieldcat-do_sum = 'X'. "totalizar campo
APPEND t_fieldcat.
CLEAR t_fieldcat.
t_fieldcat-fieldname = 'TXZ01'.
t_fieldcat-tabname = 'I_EKPO'.
t_fieldcat-ref_fieldname = 'TXZ01'.
t_fieldcat-ref_tabname = 'EKPO'.
APPEND t_fieldcat.
ENDFORM. " zf_monta_campos_alv
*-& Form zf_top
*- text
*- --> Cria o texto de cabeçalho do ALV, passando por parametro o
--> p_S_TOP para s_top
FORM zf_top USING p_s_top TYPE slis_t_listheader.
DATA: ls_line TYPE slis_listheader.
CLEAR ls_line.
ls_line-typ = 'H'.
ls_line-info = 'Relatório de Compras por Classificação Contábil'.
APPEND ls_line TO p_s_top.
CLEAR ls_line.
ls_line-typ = 'S'.
ls_line-KEY = 'Parametros Seleção '.
ls_line-info = '- Documento de compra'.
APPEND ls_line TO p_s_top.
CLEAR ls_line.
ls_line-typ = 'S'.
ls_line-info = '- Empresa'.
APPEND ls_line TO p_s_top.
CLEAR ls_line.
ls_line-typ = 'S'.
ls_line-info = '- Tip.doc.compra'.
APPEND ls_line TO p_s_top.
CLEAR ls_line.
ls_line-typ = 'S'.
ls_line-KEY = 'Total Pedido'.
ls_line-info = v_exibe.
APPEND ls_line TO p_s_top.
início Formatar a data
CALL FUNCTION 'DATUMSAUFBEREITUNG'
EXPORTING
IDATE = SY-DATUM
IMPORTING
TDAT8 = v_datasaida.
Fim Formatar a data
CLEAR ls_line.
ls_line-typ = 'S'.
ls_line-KEY = 'Data da execução'.
ls_line-info = v_datasaida.
APPEND ls_line TO p_s_top.
CLEAR ls_line.
ls_line-typ = 'S'.
ls_line-KEY = 'Usuário'.
APPEND ls_line TO p_s_top.
CLEAR ls_line.
ls_line-typ = 'A'.
ls_line-info = sy-uname.
APPEND ls_line TO p_s_top.
ENDFORM. " zf_top
*-& Form zf_print
*- text
*- --> Parametros de Impressão para o ALV
FORM zf_print.
s_print-no_print_selinfos = 'N'.
s_print-no_print_listinfos = 'N'.
ENDFORM. " zf_print
*-& Form zf_imprime_alv
*- text
*- --> Imprime o ALV c/ seu parametros
FORM zf_imprime_alv.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PF_STATUS_SET = 'ZSET_PF_STATUS'
I_CALLBACK_USER_COMMAND = 'ZF_USER_COMMAND'
i_callback_program = v_repid
i_callback_top_of_page = 'TOP_OF_PAGE'
is_layout = s_layout
it_fieldcat = t_fieldcat[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS = S_GRUPOS[]
it_sort = t_sort[]
IT_FILTER =
IS_SEL_HIDE =
i_default = 'X'
i_save = 'A'
is_variant = variante
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT = S_PRINT
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IT_ALV_GRAPHICS =
IT_ADD_FIELDCAT =
IT_HYPERLINK =
I_HTML_HEIGHT_TOP =
I_HTML_HEIGHT_END =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = I_EKPO
EXCEPTIONS
program_error = 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.
ENDFORM. " zf_imprime_alv
*-& Form zf_top-of-page
*- text
--> Cabeçalho ALV
FORM top_of_page.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = s_top
i_logo = 'CARLOS_LOGO3'.
I_END_OF_LIST_GRID = .
ENDFORM. " zf_top-of-page
*-& Form ZF_HIERARQUICO
*- text
*- --> RELATÓRIO HIERÁQUICO
form ZF_HIERARQUICO.
PERFORM zf_layout.
PERFORM zf_ordena_campos.
PERFORM zf_monta_campos_alv.
PERFORM zf_print.
PERFORM zf_grupo.
IF NOT I_EKPO[] IS INITIAL.
PERFORM zf_imprime_hierarquico_alv.
ELSE.
MESSAGE s000(zcl001) WITH 'Nenhum registro encontrado.'.
STOP.
ENDIF.
endform. " ZF_HIERARQUICO
*-& Form zf_grupo
text
--> Não é fundamental a criação de grupos de campos, mas facilita
ao usuário na hora de escolher os campos de exibição após o clique do
botão MODIFICAR LAYOUT . Vários campos da fieldcat podem ser
definidos para um mesmo grupo de campo.
form zf_grupo.
MOVE:'Moeda' TO S_GRUPOS-SP_GROUP,
'Campos moeda' TO S_GRUPOS-TEXT.
APPEND S_GRUPOS.
endform. " zf_grupo
*& Form zf_imprime_hierarquico_alv
text
--> p1 text
<-- p2 text
form zf_imprime_hierarquico_alv.
Vamos definir as ligações entre as tabelas para as quebras no momento
da impressão.
s_keyinfo-header01 = 'EBELN'.
s_keyinfo-item01 = 'EBELN'.
CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
EXPORTING
I_CALLBACK_USER_COMMAND = 'ZF_USER_COMMAND'
I_CALLBACK_PF_STATUS_SET = 'ZF_SET_PF_STATUS_HIERARQ'
I_CALLBACK_PROGRAM = v_repid
IS_LAYOUT = S_LAYOUT
IT_FIELDCAT = T_FIELDCAT[]
IT_SPECIAL_GROUPS = S_GRUPOS[]
IT_SORT =
IT_FILTER =
- Parâmetro p/executar sempre com a variante default
I_DEFAULT = 'X'
- Se é possível salvar as variantes
I_SAVE = 'A'
- Nome da variante selecionada
IS_VARIANT = VARIANTE
IT_EVENTS =
IT_EVENT_EXIT =
i_tabname_header = 'I_EKKO'
i_tabname_item = 'I_EKPO'
I_STRUCTURE_NAME_HEADER =
I_STRUCTURE_NAME_ITEM =
is_keyinfo = S_KEYINFO
IS_PRINT = S_PRINT
IS_REPREP_ID =
I_BUFFER_ACTIVE =
I_BYPASSING_BUFFER =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
tables
t_outtab_header = I_EKKO
t_outtab_item = I_EKPO.
endform. " zf_imprime_hierarquico_alv
*& Form ZF_LIST
text
--> p1 text
<-- p2 text
form ZF_LIST.
PERFORM zf_layout.
PERFORM zf_ordena_campos.
PERFORM zf_monta_campos_alv.
PERFORM zf_print.
PERFORM zf_grupo.
IF NOT I_EKPO[] IS INITIAL.
PERFORM zf_imprime_list_alv.
ELSE.
MESSAGE s000(zcl001) WITH 'Nenhum registro encontrado.'.
STOP.
ENDIF.
endform. " ZF_LIST
*& Form zf_imprime_list_alv
text
--> p1 text
<-- p2 text
form zf_imprime_list_alv.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PF_STATUS_SET = 'ZF_SET_PF_STATUS_LIST'
I_CALLBACK_USER_COMMAND = 'ZF_USER_COMMAND'
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = v_repid
I_STRUCTURE_NAME = 'I_EKPO'
IS_LAYOUT = S_LAYOUT
IT_FIELDCAT = T_FIELDCAT[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS = S_GRUPOS[]
IT_SORT = T_SORT[]
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = 'A'
IS_VARIANT = VARIANTE
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT = S_PRINT
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = I_EKPO.
endform. " zf_imprime_list_alv
*& Form zf_user_command
text
--> p1 text
<-- p2 text
form zf_user_command using p_v_ucomm like SY-UCOMM
p_s_selfield type slis_selfield.
*---tratamento de impressão do Sapscript----
CASE p_v_ucomm.
FLAG = 0.
WHEN 'IMPRIMIR' OR 'PRINT'.
LOOP AT i_ekpo.
IF NOT i_ekpo-BOX IS INITIAL.
FLAG = FLAG + 1.
ENDIF.
ENDLOOP.
se tiver selecionado apenas uma box
IF flag EQ 1.
IF p_gerar EQ 'X'.
*-----perform para confirmação de download
PERFORM zf_popup_to_confirm.
ENDIF.
*------chama o form para imprimir o sapscript
PERFORM zf_sapscript.
ENDIF.
box estiver vazia
IF flag EQ 0.
MESSAGE E017(ZCL_GRUPO04). "Selecione apenas uma BOX
"referente ao pedido de compras.
STOP.
ENDIF.
"estiver selecionado + de uma box
IF flag GT 1.
MESSAGE E017(ZCL_GRUPO04). "Selecione apenas uma
"BOX referente ao pedido de compra.
STOP.
ENDIF.
ENDCASE.
CASE p_s_selfield-sel_tab_field.
*observe na exibição do relatório(hierarquico) que temos o EKKO-EBELN
ficaria melhor visualmente, a utilização de clicar no mesmo
WHEN 'I_EKPO-EBELN'. "tab de saida
SET PARAMETER ID 'BES' FIELD p_s_selfield-VALUE.
CALL TRANSACTION 'ME23' AND SKIP FIRST SCREEN.
ENDCASE.
endform. " zf_user_command
*& Form ZSET_PF_STATUS
text
-->P_EXTAB text
form ZSET_PF_STATUS using p_extab.
set pf-status 'BOTOES' EXCLUDING extab.
endform. " ZSET_PF_STATUS
*& Form zf_sapscript
text
--> p1 text
<-- p2 text
form zf_sapscript.
--carregar a ITCPO----
PERFORM zf_itcpo.
----chamar a função Open_form
PERFORM zf_open_form.
*----buscar o fornecedor e seus dados
LOOP AT I_ekko.
v_element = 'CABPRIN'.
v_type = 'BODY'.
v_window = 'JANCABEC'.
PERFORM zf_imprime_form USING v_element
v_type
v_window.
ENDLOOP.
*----buscar o documento de compra selecionado
LOOP AT i_ekpo.
IF i_ekpo-BOX = 'X'.
v_element = 'MAIN'.
v_type = 'BODY'.
v_window = 'MAIN'.
PERFORM zf_imprime_form USING v_element
v_type
v_window.
*---o comando EXIT é para que somente quando 1 registro for selecionado
no relatório e a verificação da igualdade acontecer faz que saia do
Loop
EXIT.
ENDIF.
ENDLOOP.
PERFORM zf_close_form.
endform. " zf_sapscript
*& Form zf_itcpo
text
--> p1 text
<-- p2 text
form zf_itcpo.
*Parâmetros para impressão da tabela ITCPO
ITCPO-TDCOPIES = 1. "Quantidade de cópias
ITCPO-TDPAGESLCT = ''. "Seleção de páginas
ITCPO-TDPROGRAM = SY-REPID. "Captura o nome do programa
ITCPO-TDIMMED = c_on. "Saída imediata do relatório
ITCPO-TDPREVIEW = c_on. "Exibição prévia do relatório
ITCPO-TDDEST = 'LOCL'. "SPOOL: dispositivo de saída
ITCPO-TDFAXUSER = SY-UNAME. "Usuário logado naquele momento
ITCPO-TDSENDDATE = SY-DATUM. "Data de envio desejada
ITCPO-TDSENDTIME = SY-UZEIT. "Hora envio desejada
ITCPO-TDNEWID = c_on. "Nova ordem SPOOL
ITCPO-TDARMOD = c_on. "IMPRIMIR: modo de arquivamento
ITCPO-TDTITLE = 'Relatório de Compras por Classificação Contábil'.
endform. " zf_itcpo
*& Form zf_open_formBoa Tarde Carlos,
Welcome to the SDN Forums. SDN gets it's power from the large community throughout the world. To harvest that power of knowledge we have settled on one language for posts here which is English.
Clearly English is not your first language, but don't be afraid, I would vouch that for most of the participant here on SDN English is the second language.
As it is for me. I am just lucky, that I am living in the States long enough that German colleagues start to look at me strangely when I talk to them in German, because it doesn't totally sound right anymore
So we are very forgiving her in SDNland regarding grammar and spelling (although not as much anymore in the Weblogs), we even provide a spell checker.
Please post your question again in English.
If people don't understand you they will ask you about the things that they don't understand and you can then clarify.
Try it out. Your chance of an excellent responds is way higher.
Boa sorte, Mark. -
Problem with the crystal reports XI
Portuguese
Boa Tarde, tenho um problema com o cristal reports XI.
ele esta em producao fazendo a consulta em um servidor mas quando eu acesso passando parametro connectionInfo.ServerName = <endereco do servidor> para um servidor de teste pelo VStudio 2005, ele nao busca os dados deste e continua acessando o servidor de producao.
gostaria de saber como consertar isso
English
Good afternoon, I have a problem with the crystal reports XI. him this in production making the consultation in a servant but when I access passing parameter connectionInfo.ServerName = I address of the servant > for a test servant for VStudio 2005, he doesn't look for the data of this and it continues accessing the production servant.Fabiano, here is what I understand of the issue:
1) You are using CR XI (I am not sure if release 1 or release 2)
2) you are using .NET 2005
3) you are trying to change the server name, but the report keeps giving you data from the original server
Please answer the following:
1) Are you using CR XI release 1 or release 2?
2) Can you change to the new server, using the Crystal Reports Designer?
3) Can you duplicate the issue on your development computer?
4) What Crystal Reports service pack are you on?
5) Are you connecting to the database using OLE DB?
Ludek -
se ejecuta los reportes a traves de run-product, desde form 4.5 en una BD 8i, no levanta la ventana de parametros. generando el error:
REP-3301: Error occurred in Error Checking(RXGLER)Well,the issue has been resolved.
It was related to table in the database wherein the session information is getting stored in the table whenever a users runs the report. We had a restart of the server and the old session information was still there in that table.
Therefore, when user connected again and tried to run the same report, error was raised as the session id and other information was still existing.
Recycled the table and it resolved the error.
Thanks -
Report Writer many Controlling areas
Im from mexico, i will try to write in english my problem.......
here the users use a report or inform, the users run this inform in the KSBB transaction, and then they choose 'Plan/actual comparisons' then they select 'Cost Centers: Actual/ Plan/ Variance and they run this report, but in the parameters display, they only can put one Controlling Area, and they need run this report or inform to many Controlling areas, i need to change this report to make this posible.
I copied the report into a Z, but i don´t know how i change this parameter to make a select-option or a Range of values.
Help!.
Para los que saben español:
Aqui los usuarios usan un reporte o informe, que corren en la transaccion KSBB, y luego escogen la opcion de 'Comparaciones Plan/ Real' luego escogen el reporte 'Centros coste: Real/plan/desviacion' y corren el reporte, pero solo pueden seleccionar una sociedad de CO, y lo que desean es que se pueda correr el reporte para muchas sociedades, ya copie el reporte a un Z pero no se como hacer para cabiarle el parametro por un Select options o colocar un Rango para sociedades.
Ayuda!Thanks Much Janardhan for your response. The only thing which is different is: It is: KKSM.
Thanks again. -
HOW TO HIDE USERID PARAMETER, WHEN CALL REPORT FROM MENU USING FORM 10G
good morning colegas
i'm from panama
when i call a report from a oracle forms menu, its send a user, pass and bd in the url, i need to hide this parameter userid,
cuando llamo un reporte desde forms, se envia el usuario, pass y bd en el url nesesito ocultar estos parametros del url, le agradeceria si alguno tiene algun eejmplo q me de, de como ocultar estos parametros
i'm using oracle forms y report 10g
this is my msn [email protected]
slds desde panamathis document show us, only when i call a report from a forms, but not from a menu!
but to hide these parameters, i need to create a bean in a block a way and the menus do not allow me to create these objects
you done this before?
you have a example?
slds desde panama -
Report Server? it lose presentation of the reports
Hello friends,
Has been working in Forms Server 6!, the who I attempt to mount an application of 3 coverings ([multi-tier]), I of the Forms side don't have problems, then through the navigator succeeds in seeing the forms (Java Code), but when I attempt to run a report I it don't like like it look at, you/he/she/it then lose their wit.
That is to say, When I design the reports in Reports 6i, in order to see it in format html, it you leaves me very good, but when I see 6i through the Report Server, you/he/she/it lose all the aesthetic, not if
You could help me.
Another thing, the screen of [parametros], will there be any form of Improving the capture?
I wait for that I/he/she/it/you understand me
Greeting.
nullHello shay,
my pdf report output is catastrophic!!!
I is completely garbled...font sizes have changed, lines offset,....
any idea? my forms and reports server runs on hp-ux.
thanks -
Como crear un reporte en Crystal Reports
Estimados, para los que esten aprendiendo crystal reports ("como yo"), les dejo este video que esta exelente, pueden aprender como colocar parametros y drilldown (fechas naranjas) e intregrar el reporte a SBO
Saludos
Felipe LoyolaMuchas gracias por compartirlo, me fué de mucha utilidad.
saludos
NANCY -
Formatos que trae Crystal Report
Hola
Tenemos la colección de formatos que trae Crystal Report, los mismos son en inglés y los deseamos en español para los clientes.
Donde se pueden conseguir los mismos.
Se les agradece su colaboración.Se que el post es de hace mucho, pero por si aun no lo has solucionado.
Para que solo te tome el valor del documento debes poner el siguiente parametro
dockey@
y luego debes hacer un flitro con ese documento:
comando.docnum = dockey@ -
Lanzar un Reporte(Reports) en JDeveloper
Saludos, lo que estoy tratando de hacer es lo siguiente: Tengo un JSP con ADF en el cual realizo una consula a partir de ciertos parametros, lo que quiero es lanzar desde un boton un reporte creado en Reports Builder alimentado por parametros. Gracias por su ayuda.
SagaRobi,
Frank did give you a serious answer. I made an observation in my first post, and posted a light-hearted comment in Morse code in my latest one.
If you'd like to continue discussing your question, posting it in English will probably get you more help.
As Frank said... Oracle Reports are deployed just through a JSP engine, so you can just call the URL for the report you want to run and append any parameters you need in the URL. You can also display the report in an iFrame if you want.
If you are using ADF Faces, you can have a look at the af:goButton and af:goLink components, both of which would let you invoke an arbitrary URL.
John -
Hola, usando la nueva version de Crystal para VS 2010 me encuentro que cuando genero un reporte usando el Viewer me sale una pantalla pidiendo de nuevo los valores de los parametros lo cual ya los defini en el codigo, hay alguna manera de desactivar o esconder la ventana que pide los parametros ?. Detallo el codigo de como defino el parametro en VB (siempre lo he hecho asi con versiones anteriores y funciona bien)
Dim rptReporte As New CrystalDecisions.CrystalReports.Engine.ReportDocument
rptReporte.Load("test.rpt")
Dim myParameterFieldDefinitions As ParameterFieldDefinitions = rptReporte.DataDefinition.ParameterFields
Dim myParameterFieldDefinition As ParameterFieldDefinition = myParameterFieldDefinitions("Empresa")
Dim pvCol1 As New CrystalDecisions.Shared.ParameterValues
Dim pdvEmpresa As New CrystalDecisions.Shared.ParameterDiscreteValue
pdvEmpresa.Value = "Integrama"
pvCol1.Add(pdvEmpresa)
myParameterFieldDefinition.ApplyCurrentValues(pvCol1)
rptReporte.ReportOptions.EnableSaveDataWithReport = False
crwViewer.ReportSource = rptReporte
crwViewer.RefreshHola,
Yo estoy en España y lo hago de la sigueinte manera siguiendo los pasos de la ayuda de SAP, llevamos varios ejercicios hacíndolo y nos va perfecto.
Las cuentas de socios de negocios tienes que cerrarlas ya que con ello lo que haces es traspasar los saldos vivos al ejercico siguiente, es decir, si no las cierras el saldo lo sigues teniendo en el cliente o en el proveedor sin problema y lo puedes pagar y cobrar pero si emites un balance con fecha desde el 01 de enero, cómo no has hecho el traslado de los saldos te saldrán las cuenatas a 0 y eso es una información erronea.
Nosotros hacemos el cierre en dos pasos:
1º cerramos todas la cuentas de ingresos y gastos solas contra la cuenta de resultados y las fechas siempre ponemos para cierre 31/12/año cierre (en las dos fechas) y 01/01/año apertura (en las 3 fechas)
2º una vez cerrado ingresos y gastos ya tenemos el saldo en la cuenata de resultado en el año de cierre y a continuación cerramos activo, pasivo, neto y socios de negocio contra la misma cuenta de resultados. Con las fechas hacemos lo mismo que en la primera ejecución.
Con esto conseguimos traspasar todos los saldos al ejercicio sigueinte.
El cierre lo puedes repetir todas las veces que necesites, es decir si una vez hecho necesitas hacer una contabilización en el año antaerior basta con que repitas el procedimiento (pasos 1 y 2) de maenra que sólo te mostrará las cuentas que no hayan sido cerradas.
Puedes hacer una preuba en un entorno de pruebas y ver si los resultados son los correctos.
Un saludo,
Tere -
Reporting ret.Impuestos Venezuela - Formulario IDWTCERT_VE_04
Saludos a todos,
Actualmente, luego de ejecutar la transacción S_P00_07000134 <Reporting ret.impuestos (generico)> necesito mostrar en el formulario IDWTCERT_VE_04 (Ret. IVA), cuando haya sido marcado el campo 'Ejecución Test' (check P_TEST) un texto que diga u201CIMPRESIÓN DE PRUEBAu201D o algo que indique que no es válido.
Esto con el fin de evitar que se impriman y entreguen comprobantes con numeración no registrada.
Hice una copia del formulario, pero no he podido identificar dentro del formulario el campo con el valor del parametro P_TEST.
Alguien tiene alguna idea o alguien que lo haya hecho antes, podría prestarme su ayuda???
Gracias!!!Hola Alex,
Ya había revisado todos los atributos que pasa el programa al Formulario y ese que mencionas, dentro del formulario no consigo el WTCOMPCD-BE_TEST_RUN que mencionas.
Yo estuve probando con Modulos de Funciones dentro del Smartform, para obtener el valor de un campo en un Dynpro - Programa especificado, pero tampoco me funcionó.
Cualquier cosa que se te ocurra me la cuentas. Eso tiene que poder hacerse de alguna manera.
Muchisimas Gracias...!!! -
Hola a Todos.
Si alguien me puede ayudar por favor:
no se como se envia un parametro desde una forma a un reporte. alguiien me puede decir como?
básicamente necesito enviar el numero de matricula de una persona a un reporte para con ello emitir un recibo
GraciasThe following is a translated version to my reply above:
Luis Ortuno asks how to pass a parameter from a form to a report.
I answered:
Hi Luis:
The following code works if you are using client/server, if not, you have to investigate RUN_REPORT_OBJECT. I will investigate tomorrow.
Note that I assume that the parameter in your report is called MATRICULA and in the form B1.MATRICULA. Also, you need to substitute the name of your report.
Unfortunately the code is not indented because it is not possible in this page.
PROCEDURE PRODUCIR_RECIBO IS
V_PARAMS_LIST PARAMLIST;
BEGIN
V_PARAMS_LIST := GET_PARAMETER_LIST('INPUT_PARAMS');
IF NOT ID_NULL(V_PARAMS_LIST) THEN
DESTROY_PARAMETER_LIST(V_PARAMS_LIST);
END IF;
V_PARAMS_LIST := CREATE_PARAMETER_LIST('INPUT_PARAMS');
ADD_PARAMETER(V_PARAMS_LIST, 'MATRICULA', TEXT_PARAMETER, :B1.MATRICULA);
RUN_PRODUCT(REPORTS, 'NOMBRE_DE_REPORTE',
SYNCHRONOUS, RUNTIME, FILESYSTEM,list_id, NULL);
END;
Hope this helps you,
Thomas
Maybe you are looking for
-
Managing user sessions in RDS on Server 2012 R2
I'm planning on deploying Server 2012 R2 Remote Desktop Services, and I'm finding I'm going to have to go to a training class! Unfortunately, I don't have the time to do that before deploying. I've figured out how to use policy editor to configure w
-
Where's the right place to submit bugs for Server.app? The feedback page I go to for most Apple stuff doesn't seem to recognize any server since 10.6...
-
Hi , Actually I was trying to build one dimension in ASO database using rules files, after saving the rules file when i am gonna update it with source file I really wonder when I dint see the option "update outline" in the outline tab in the menu.any
-
Hi all I have been trying to do some work in the catalog manager. I login as Administrator in online mode ... I can get to the shared folder, system folder. When I go to users I can access /users/Administrator However, I cannot seem to access the oth
-
Condition values and validity periods of a Scheduling agreement .
Dear Friends, I have one querry .Where does (in Database table) , the condition values and validity periods of a Scheduling agreement stored . Thanks and regards in advance. Vijay. Edited by: vij kot on Sep 9, 2008 12:09 PM