SlideShare a Scribd company logo
REPORT ZJOMS_ALVINTERATIVO.
TABLES: BKPF.
TYPES: BEGIN OF TY_BKPF,
BUKRS TYPE BKPF-BUKRS,
GJAHR TYPE BKPF-GJAHR,
BELNR TYPE BKPF-BELNR,
MONAT TYPE BKPF-MONAT,
XBLNR TYPE BKPF-XBLNR,
BKTXT TYPE BKPF-BKTXT,
KURS2 TYPE BKPF-KURS2,
END OF TY_BKPF.
DATA: T_BKPF TYPE STANDARD TABLE OF TY_BKPF.
* DECLARACION DE DATOS
*DATA: V_BUKRS TYPE BKPF-BUKRS,
* V_GJAHR TYPE BKPF-GJAHR,
* V_BELNR TYPE BKPF-BELNR.
* DECLARAR LA CLASE
CLASS GCL_EVENT DEFINITION.
PUBLIC SECTION.
* Metodo double click
METHODS:
HANDLE_DOUBLE_CLICK
FOR EVENT DOUBLE_CLICK OF CL_GUI_ALV_GRID
IMPORTING E_ROW E_COLUMN ES_ROW_NO.
ENDCLASS. "gcl_event DEFINITION
CLASS GCL_EVENT IMPLEMENTATION.
* Implementacion del metodo doble click
METHOD HANDLE_DOUBLE_CLICK.
DATA: LTD_READ TYPE STANDARD TABLE OF TY_BKPF.
DATA: LWA_READ TYPE TY_BKPF.
READ TABLE T_BKPF INDEX E_ROW-INDEX INTO LWA_READ.
FIELD-SYMBOLS : <FV_P> LIKE LINE OF T_BKPF.
READ TABLE T_BKPF ASSIGNING <FV_P> INDEX E_ROW.
SET PARAMETER ID 'BLN' FIELD <FV_P>-BELNR.
SET PARAMETER ID 'BUK' FIELD <FV_P>-BUKRS.
SET PARAMETER ID 'GJR' FIELD <FV_P>-GJAHR.
CALL TRANSACTION 'FB03' AND SKIP FIRST SCREEN.
ENDMETHOD. "handle_double_click
ENDCLASS. "gcl_event IMPLEMENTATION
* DECLARACION DE TABLAS INTERNAS
DATA: GO_EVENT TYPE REF TO GCL_EVENT,
GO_CL_ALVGRID TYPE REF TO CL_GUI_ALV_GRID,
GO_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
GTD_FIELDCAT TYPE LVC_T_FCAT,
GST_LAYOUT TYPE LVC_S_LAYO.
* SELECCION PARA LA CONSULTA
SELECTION-SCREEN BEGIN OF BLOCK BLOQUE1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS: S_BUKRS FOR BKPF-BUKRS.
SELECT-OPTIONS: S_GJAHR FOR BKPF-GJAHR.
PARAMETERS: P_MONAT LIKE BKPF-MONAT.
SELECTION-SCREEN END OF BLOCK BLOQUE1.
* START-OPF-SELECTION.
START-OF-SELECTION.
PERFORM CARGAR_DATOS.
CALL SCREEN '0100'.
END-OF-SELECTION.
* FORM CARGAR_DATOS
FORM CARGAR_DATOS.
SELECT BUKRS GJAHR BELNR MONAT XBLNR BKTXT KURS2 INTO TABLE T_BKPF
FROM BKPF
WHERE BUKRS IN S_BUKRS AND GJAHR IN S_GJAHR.
ENDFORM. "CARGAR_DATOS
*------------------------------------------------------------
FORM CREAR_ALVGRID .
IF GO_CONTAINER IS INITIAL.
CREATE OBJECT GO_CONTAINER
EXPORTING
CONTAINER_NAME = 'CONTENEDOR'
EXCEPTIONS
CNTL_ERROR = 1
CNTL_SYSTEM_ERROR = 2
CREATE_ERROR = 3
LIFETIME_ERROR = 4
OTHERS = 5.
IF SY-SUBRC EQ 0.
CREATE OBJECT GO_CL_ALVGRID
EXPORTING
I_PARENT = GO_CONTAINER.
* Invocar a los metodos del objeto go_cl_alvgrid.
CALL METHOD GO_CL_ALVGRID->REGISTER_EDIT_EVENT
EXPORTING
I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_MODIFIED.
CALL METHOD GO_CL_ALVGRID->REGISTER_EDIT_EVENT
EXPORTING
I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_ENTER.
CALL METHOD GO_CL_ALVGRID->SET_READY_FOR_INPUT
EXPORTING
I_READY_FOR_INPUT = 1.
PERFORM GENERA_CATALOGO CHANGING GTD_FIELDCAT.
PERFORM GENERA_LAYOUT CHANGING GST_LAYOUT.
CREATE OBJECT GO_EVENT.
SET HANDLER GO_EVENT->HANDLE_DOUBLE_CLICK FOR GO_CL_ALVGRID.
CALL METHOD GO_CL_ALVGRID->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
IS_LAYOUT = GST_LAYOUT
I_SAVE = 'A'
CHANGING
IT_OUTTAB = T_BKPF[]
IT_FIELDCATALOG = GTD_FIELDCAT.
ENDIF.
ELSE.
CALL METHOD GO_CL_ALVGRID->REFRESH_TABLE_DISPLAY.
ENDIF.
ENDFORM. " crear_alvgrid
FORM GENERA_CATALOGO CHANGING PO_FIELDCAT TYPE LVC_T_FCAT.
DATA: GS_CAMPOCAT TYPE LVC_S_FCAT.
CLEAR GS_CAMPOCAT.
GS_CAMPOCAT-TABNAME = 'TI_BKPF'.
GS_CAMPOCAT-FIELDNAME = 'BUKRS'.
GS_CAMPOCAT-REPTEXT = 'Sociedad'.
GS_CAMPOCAT-COL_POS = 1.
GS_CAMPOCAT-OUTPUTLEN = 12.
APPEND GS_CAMPOCAT TO PO_FIELDCAT.
CLEAR GS_CAMPOCAT.
GS_CAMPOCAT-TABNAME = 'TI_BKPF'.
GS_CAMPOCAT-FIELDNAME = 'GJAHR'.
GS_CAMPOCAT-REPTEXT = 'Ejercicio'.
GS_CAMPOCAT-COL_POS = 2.
GS_CAMPOCAT-OUTPUTLEN = 10.
APPEND GS_CAMPOCAT TO PO_FIELDCAT.
CLEAR GS_CAMPOCAT.
GS_CAMPOCAT-TABNAME = 'TI_BKPF'.
GS_CAMPOCAT-FIELDNAME = 'BELNR'.
GS_CAMPOCAT-REPTEXT = 'Num.Doc.Cont.'.
GS_CAMPOCAT-COL_POS = 3.
GS_CAMPOCAT-OUTPUTLEN = 13.
APPEND GS_CAMPOCAT TO PO_FIELDCAT.
CLEAR GS_CAMPOCAT.
GS_CAMPOCAT-TABNAME = 'TI_BKPF'.
GS_CAMPOCAT-FIELDNAME = 'MONAT'.
GS_CAMPOCAT-REPTEXT = 'MesCont.'.
GS_CAMPOCAT-COL_POS = 4.
GS_CAMPOCAT-OUTPUTLEN = 8.
APPEND GS_CAMPOCAT TO PO_FIELDCAT.
CLEAR GS_CAMPOCAT.
GS_CAMPOCAT-TABNAME = 'TI_BKPF'.
GS_CAMPOCAT-FIELDNAME = 'XBLNR'.
GS_CAMPOCAT-REPTEXT = 'Num.Doc.Ref.'.
GS_CAMPOCAT-COL_POS = 5.
GS_CAMPOCAT-OUTPUTLEN = 12.
APPEND GS_CAMPOCAT TO PO_FIELDCAT.
CLEAR GS_CAMPOCAT.
GS_CAMPOCAT-TABNAME = 'TI_BKPF'.
GS_CAMPOCAT-FIELDNAME = 'BKTXT'.
GS_CAMPOCAT-REPTEXT = 'TextoCabec.Doc.'.
GS_CAMPOCAT-COL_POS = 6.
GS_CAMPOCAT-OUTPUTLEN = 20.
APPEND GS_CAMPOCAT TO PO_FIELDCAT.
CLEAR GS_CAMPOCAT.
GS_CAMPOCAT-TABNAME = 'TI_BKPF'.
GS_CAMPOCAT-FIELDNAME = 'KURS2'.
GS_CAMPOCAT-REPTEXT = 'T.CambioMon.Loc.'.
GS_CAMPOCAT-COL_POS = 7.
GS_CAMPOCAT-OUTPUTLEN = 12.
APPEND GS_CAMPOCAT TO PO_FIELDCAT.
ENDFORM. "genera_catalogo
FORM GENERA_LAYOUT CHANGING PO_LAYOUT TYPE LVC_S_LAYO.
PO_LAYOUT-GRID_TITLE = 'Resultado de la Consulta'.
* po_layout-no_toolbar = 'X'.
ENDFORM. "genera_layout
FORM SET_CAT USING PI_LOG PI_FIELD PI_TEXTO PI_LONG PI_EDIT PI_CHECKBO
X
CHANGING PO_FIELDCAT TYPE LVC_T_FCAT.
DATA: LWA_FIELDCAT TYPE LVC_S_FCAT.
LWA_FIELDCAT-TABNAME = PI_LOG.
LWA_FIELDCAT-FIELDNAME = PI_FIELD.
LWA_FIELDCAT-EDIT = PI_EDIT.
LWA_FIELDCAT-CHECKBOX = PI_CHECKBOX.
LWA_FIELDCAT-COLTEXT = PI_TEXTO.
LWA_FIELDCAT-SELTEXT = PI_TEXTO.
LWA_FIELDCAT-REPTEXT = PI_TEXTO.
LWA_FIELDCAT-OUTPUTLEN = PI_LONG.
APPEND LWA_FIELDCAT TO PO_FIELDCAT.
ENDFORM. "set_cat
MODULE STATUS_0100 OUTPUT.
PERFORM CREAR_ALVGRID.
**********************************************************************
SET PF-STATUS '0100'.
SET TITLEBAR '0100'.
ENDMODULE. "STATUS_0100 OUTPUT
MODULE USER_COMMAND_0100 INPUT.
DATA: OK_CODE TYPE SY-UCOMM.
OK_CODE = SY-UCOMM.
CASE OK_CODE.
WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
SET SCREEN 0.
LEAVE SCREEN.
CLEAR SY-UCOMM.
ENDCASE.
ENDMODULE. "USER_COMMAND_0100 INPUT
Screen 100
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
*MODULE CREAR_ALV.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0100.
Status
Alv iterativo

More Related Content

Recently uploaded

GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 

Recently uploaded (20)

GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
Christy Abraham Joy
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
Vit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
MindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Alv iterativo

  • 1. REPORT ZJOMS_ALVINTERATIVO. TABLES: BKPF. TYPES: BEGIN OF TY_BKPF, BUKRS TYPE BKPF-BUKRS, GJAHR TYPE BKPF-GJAHR, BELNR TYPE BKPF-BELNR, MONAT TYPE BKPF-MONAT, XBLNR TYPE BKPF-XBLNR, BKTXT TYPE BKPF-BKTXT, KURS2 TYPE BKPF-KURS2, END OF TY_BKPF. DATA: T_BKPF TYPE STANDARD TABLE OF TY_BKPF. * DECLARACION DE DATOS *DATA: V_BUKRS TYPE BKPF-BUKRS, * V_GJAHR TYPE BKPF-GJAHR, * V_BELNR TYPE BKPF-BELNR. * DECLARAR LA CLASE CLASS GCL_EVENT DEFINITION. PUBLIC SECTION. * Metodo double click METHODS: HANDLE_DOUBLE_CLICK FOR EVENT DOUBLE_CLICK OF CL_GUI_ALV_GRID IMPORTING E_ROW E_COLUMN ES_ROW_NO. ENDCLASS. "gcl_event DEFINITION CLASS GCL_EVENT IMPLEMENTATION. * Implementacion del metodo doble click METHOD HANDLE_DOUBLE_CLICK. DATA: LTD_READ TYPE STANDARD TABLE OF TY_BKPF. DATA: LWA_READ TYPE TY_BKPF. READ TABLE T_BKPF INDEX E_ROW-INDEX INTO LWA_READ. FIELD-SYMBOLS : <FV_P> LIKE LINE OF T_BKPF. READ TABLE T_BKPF ASSIGNING <FV_P> INDEX E_ROW. SET PARAMETER ID 'BLN' FIELD <FV_P>-BELNR. SET PARAMETER ID 'BUK' FIELD <FV_P>-BUKRS. SET PARAMETER ID 'GJR' FIELD <FV_P>-GJAHR. CALL TRANSACTION 'FB03' AND SKIP FIRST SCREEN. ENDMETHOD. "handle_double_click ENDCLASS. "gcl_event IMPLEMENTATION * DECLARACION DE TABLAS INTERNAS DATA: GO_EVENT TYPE REF TO GCL_EVENT, GO_CL_ALVGRID TYPE REF TO CL_GUI_ALV_GRID, GO_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
  • 2. GTD_FIELDCAT TYPE LVC_T_FCAT, GST_LAYOUT TYPE LVC_S_LAYO. * SELECCION PARA LA CONSULTA SELECTION-SCREEN BEGIN OF BLOCK BLOQUE1 WITH FRAME TITLE TEXT-001. SELECT-OPTIONS: S_BUKRS FOR BKPF-BUKRS. SELECT-OPTIONS: S_GJAHR FOR BKPF-GJAHR. PARAMETERS: P_MONAT LIKE BKPF-MONAT. SELECTION-SCREEN END OF BLOCK BLOQUE1. * START-OPF-SELECTION. START-OF-SELECTION. PERFORM CARGAR_DATOS. CALL SCREEN '0100'. END-OF-SELECTION. * FORM CARGAR_DATOS FORM CARGAR_DATOS. SELECT BUKRS GJAHR BELNR MONAT XBLNR BKTXT KURS2 INTO TABLE T_BKPF FROM BKPF WHERE BUKRS IN S_BUKRS AND GJAHR IN S_GJAHR. ENDFORM. "CARGAR_DATOS *------------------------------------------------------------ FORM CREAR_ALVGRID . IF GO_CONTAINER IS INITIAL. CREATE OBJECT GO_CONTAINER EXPORTING CONTAINER_NAME = 'CONTENEDOR' EXCEPTIONS CNTL_ERROR = 1 CNTL_SYSTEM_ERROR = 2 CREATE_ERROR = 3 LIFETIME_ERROR = 4 OTHERS = 5. IF SY-SUBRC EQ 0. CREATE OBJECT GO_CL_ALVGRID EXPORTING I_PARENT = GO_CONTAINER. * Invocar a los metodos del objeto go_cl_alvgrid. CALL METHOD GO_CL_ALVGRID->REGISTER_EDIT_EVENT EXPORTING I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_MODIFIED. CALL METHOD GO_CL_ALVGRID->REGISTER_EDIT_EVENT EXPORTING I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_ENTER. CALL METHOD GO_CL_ALVGRID->SET_READY_FOR_INPUT EXPORTING I_READY_FOR_INPUT = 1. PERFORM GENERA_CATALOGO CHANGING GTD_FIELDCAT.
  • 3. PERFORM GENERA_LAYOUT CHANGING GST_LAYOUT. CREATE OBJECT GO_EVENT. SET HANDLER GO_EVENT->HANDLE_DOUBLE_CLICK FOR GO_CL_ALVGRID. CALL METHOD GO_CL_ALVGRID->SET_TABLE_FOR_FIRST_DISPLAY EXPORTING IS_LAYOUT = GST_LAYOUT I_SAVE = 'A' CHANGING IT_OUTTAB = T_BKPF[] IT_FIELDCATALOG = GTD_FIELDCAT. ENDIF. ELSE. CALL METHOD GO_CL_ALVGRID->REFRESH_TABLE_DISPLAY. ENDIF. ENDFORM. " crear_alvgrid FORM GENERA_CATALOGO CHANGING PO_FIELDCAT TYPE LVC_T_FCAT. DATA: GS_CAMPOCAT TYPE LVC_S_FCAT. CLEAR GS_CAMPOCAT. GS_CAMPOCAT-TABNAME = 'TI_BKPF'. GS_CAMPOCAT-FIELDNAME = 'BUKRS'. GS_CAMPOCAT-REPTEXT = 'Sociedad'. GS_CAMPOCAT-COL_POS = 1. GS_CAMPOCAT-OUTPUTLEN = 12. APPEND GS_CAMPOCAT TO PO_FIELDCAT. CLEAR GS_CAMPOCAT. GS_CAMPOCAT-TABNAME = 'TI_BKPF'. GS_CAMPOCAT-FIELDNAME = 'GJAHR'. GS_CAMPOCAT-REPTEXT = 'Ejercicio'. GS_CAMPOCAT-COL_POS = 2. GS_CAMPOCAT-OUTPUTLEN = 10. APPEND GS_CAMPOCAT TO PO_FIELDCAT. CLEAR GS_CAMPOCAT. GS_CAMPOCAT-TABNAME = 'TI_BKPF'. GS_CAMPOCAT-FIELDNAME = 'BELNR'. GS_CAMPOCAT-REPTEXT = 'Num.Doc.Cont.'. GS_CAMPOCAT-COL_POS = 3. GS_CAMPOCAT-OUTPUTLEN = 13. APPEND GS_CAMPOCAT TO PO_FIELDCAT. CLEAR GS_CAMPOCAT. GS_CAMPOCAT-TABNAME = 'TI_BKPF'. GS_CAMPOCAT-FIELDNAME = 'MONAT'. GS_CAMPOCAT-REPTEXT = 'MesCont.'. GS_CAMPOCAT-COL_POS = 4. GS_CAMPOCAT-OUTPUTLEN = 8. APPEND GS_CAMPOCAT TO PO_FIELDCAT. CLEAR GS_CAMPOCAT.
  • 4. GS_CAMPOCAT-TABNAME = 'TI_BKPF'. GS_CAMPOCAT-FIELDNAME = 'XBLNR'. GS_CAMPOCAT-REPTEXT = 'Num.Doc.Ref.'. GS_CAMPOCAT-COL_POS = 5. GS_CAMPOCAT-OUTPUTLEN = 12. APPEND GS_CAMPOCAT TO PO_FIELDCAT. CLEAR GS_CAMPOCAT. GS_CAMPOCAT-TABNAME = 'TI_BKPF'. GS_CAMPOCAT-FIELDNAME = 'BKTXT'. GS_CAMPOCAT-REPTEXT = 'TextoCabec.Doc.'. GS_CAMPOCAT-COL_POS = 6. GS_CAMPOCAT-OUTPUTLEN = 20. APPEND GS_CAMPOCAT TO PO_FIELDCAT. CLEAR GS_CAMPOCAT. GS_CAMPOCAT-TABNAME = 'TI_BKPF'. GS_CAMPOCAT-FIELDNAME = 'KURS2'. GS_CAMPOCAT-REPTEXT = 'T.CambioMon.Loc.'. GS_CAMPOCAT-COL_POS = 7. GS_CAMPOCAT-OUTPUTLEN = 12. APPEND GS_CAMPOCAT TO PO_FIELDCAT. ENDFORM. "genera_catalogo FORM GENERA_LAYOUT CHANGING PO_LAYOUT TYPE LVC_S_LAYO. PO_LAYOUT-GRID_TITLE = 'Resultado de la Consulta'. * po_layout-no_toolbar = 'X'. ENDFORM. "genera_layout FORM SET_CAT USING PI_LOG PI_FIELD PI_TEXTO PI_LONG PI_EDIT PI_CHECKBO X CHANGING PO_FIELDCAT TYPE LVC_T_FCAT. DATA: LWA_FIELDCAT TYPE LVC_S_FCAT. LWA_FIELDCAT-TABNAME = PI_LOG. LWA_FIELDCAT-FIELDNAME = PI_FIELD. LWA_FIELDCAT-EDIT = PI_EDIT. LWA_FIELDCAT-CHECKBOX = PI_CHECKBOX. LWA_FIELDCAT-COLTEXT = PI_TEXTO. LWA_FIELDCAT-SELTEXT = PI_TEXTO. LWA_FIELDCAT-REPTEXT = PI_TEXTO. LWA_FIELDCAT-OUTPUTLEN = PI_LONG. APPEND LWA_FIELDCAT TO PO_FIELDCAT. ENDFORM. "set_cat MODULE STATUS_0100 OUTPUT. PERFORM CREAR_ALVGRID. ********************************************************************** SET PF-STATUS '0100'.
  • 5. SET TITLEBAR '0100'. ENDMODULE. "STATUS_0100 OUTPUT MODULE USER_COMMAND_0100 INPUT. DATA: OK_CODE TYPE SY-UCOMM. OK_CODE = SY-UCOMM. CASE OK_CODE. WHEN 'BACK' OR 'EXIT' OR 'CANCEL'. SET SCREEN 0. LEAVE SCREEN. CLEAR SY-UCOMM. ENDCASE. ENDMODULE. "USER_COMMAND_0100 INPUT Screen 100 PROCESS BEFORE OUTPUT. MODULE STATUS_0100. *MODULE CREAR_ALV. PROCESS AFTER INPUT. MODULE USER_COMMAND_0100. Status