SlideShare a Scribd company logo
1 of 6
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

"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaWSO2
 
Simplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxSimplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxMarkSteadman7
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...WSO2
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityVictorSzoltysek
 
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformLess Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformWSO2
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....rightmanforbloodline
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard37
 
Decarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceDecarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceIES VE
 
Choreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringChoreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringWSO2
 

Recently uploaded (20)

"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using Ballerina
 
Simplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxSimplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptx
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps Productivity
 
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformLess Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
Decarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceDecarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational Performance
 
Choreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringChoreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software Engineering
 

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 HubspotMarius 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 ChatGPTExpeed 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 EngineeringsPixeldarts
 
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 HealthThinkNow
 
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.pdfmarketingartwork
 
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 2024Neil 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 2024Albert 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 InsightsKurio // 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 2024Search 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 summarySpeakerHub
 
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 IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit 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 managementMindGenius
 
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