on 2025 Mar 26 2:36 PM
Hi everyone,
I'm looking for a solution on how to create a line chart in R3 system. Are there any classes/interfaces etc. that you can recommend?
Best regards,
Cassandra
Request clarification before answering.
Boa tarde,
meu nome é Raquel Souza,
sou do Brasil - Prazer em conhecê-lo.
Sim! No sistema SAP R/3 , você pode criar gráficos de linha usando a classe gráfica padrão SAP ou exportando dados para o Excel para visualização.
O SAP fornece uma classe cl_gui_chart_engine que permite gerar gráficos diretamente no sistema.
Exemplo de código ABAP usando cl_gui_chart_engine :
DADOS: gr_chart TIPO REF PARA cl_gui_chart_engine,
gr_container TIPO REF PARA cl_gui_custom_container,
gt_data TIPO TABELA DE chart_sdata,
gs_data TIPO chart_sdata.
" Crie um contêiner para exibir o gráfico na tela
CRIE OBJETO gr_container
EXPORTANDO
container_name = 'GRAPH_CONTAINER'.
" Crie uma instância do gráfico
CREATE OBJECT gr_chart
EXPORTING
parent = gr_container.
" Adicione dados ao gráfico
gs_data-value = 100.
gs_data-category = 'Jan'.
ANEXAR gs_data A gt_data.
gs_data-value = 150.
gs_data-category = 'fev'.
ANEXAR gs_data Um gt_data.
gs_data-value = 200.
gs_data-category = 'Mar'.
ANEXAR gs_data Um gt_data.
" Configurar o gráfico
gr_chart->set_data( EXPORTANDO dataset = gt_data ).
gr_chart->set_chart_type( EXPORTANDO chart_type = 'LINE' ).
gr_chart->refresh( ).
Este código cria um gráfico de linhas dentro de um contêiner SAP GUI.
Se o gráfico para complexo ou precisar ser visualizado fora do SAP, você pode gerar um relatório ALV , exportar os dados para o Excel ( ALV -> Export -> Spreadsheet ) e criar o gráfico no Excel.
Se uma empresa estiver usando SAP Fiori e S/4HANA , outra opção é construir um aplicativo Fiori com SAP UI5 e exibir gráficos usando bibliotecas como VizFrame Charts .
"Boa sorte!!
Espero ter ajudado!!!" 🚀😊
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
12 | |
9 | |
8 | |
8 | |
5 | |
4 | |
4 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.