PROGRAM YLWMM005 MESSAGE-ID YL.
*-----------------------------------------------------------------------
* maintain additional fields on table t336 - difference indicators
* written by sheila titchener
*-----------------------------------------------------------------------
TABLES: T336, " Difference indicators
T300T, " Warehouse description
T336T. " Difference indicator text
DATA: OK_CODE(4),
OK_CODE2(4),
W_ERR_FLAG.
DATA: BEGIN OF XT336 OCCURS 1,
X LIKE T336,
DTEXT LIKE T336T-DTEXT,
END OF XT336.
DATA C LIKE SY-INDEX.
*&---------------------------------------------------------------------*
*& Module USER_COMMAND_0100 INPUT
*&---------------------------------------------------------------------*
* text *
*----------------------------------------------------------------------*
MODULE USER_COMMAND_0100 INPUT.
* Warehouse must not be space.
CHECK T336-LGNUM NE ' '.
CASE OK_CODE.
WHEN 'SAVE'.
PERFORM SAVE_T336.
WHEN 'DISP'.
PERFORM DISPLAY_T336.
WHEN 'LIST'.
C = 0.
PERFORM LIST_T336.
WHEN OTHERS.
PERFORM DISPLAY_T336.
ENDCASE.
CLEAR OK_CODE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*&---------------------------------------------------------------------*
*& Module STATUS_0100 OUTPUT
*&---------------------------------------------------------------------*
* text *
*----------------------------------------------------------------------*
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'AMEND'.
SET TITLEBAR '100'.
ENDMODULE. " STATUS_0100 OUTPUT
*&---------------------------------------------------------------------*
*& Form SAVE_T336
*&---------------------------------------------------------------------*
* Save screen details
*&---------------------------------------------------------------------*
FORM SAVE_T336.
* reread record to make sure key is for last record read
* but store new value of ZZNOTO first
DATA: W_ZZNOTO LIKE T336-ZZNOTO.
W_ZZNOTO = T336-ZZNOTO.
SELECT SINGLE * FROM T336
WHERE LGNUM = T336-LGNUM
AND KZDIF = T336-KZDIF .
IF SY-SUBRC = 0.
T336-ZZNOTO = W_ZZNOTO.
UPDATE T336.
MESSAGE I018 WITH 'T336'.
COMMIT WORK.
ELSE.
MESSAGE I029 WITH T336-LGNUM T336-KZDIF.
W_ERR_FLAG = 'Y'.
ENDIF.
*
CLEAR OK_CODE.
ENDFORM.
*&---------------------------------------------------------------------*
*& Form DISPLAY_LOC
*&---------------------------------------------------------------------*
*----------------------------------------------------------------------*
FORM DISPLAY_T336.
W_ERR_FLAG = 'N'.
*
SELECT SINGLE * FROM T336
WHERE LGNUM = T336-LGNUM
AND KZDIF = T336-KZDIF.
IF SY-SUBRC NE 0.
MESSAGE I065.
W_ERR_FLAG = 'Y'.
ENDIF.
CLEAR T300T-LNUMT.
SELECT SINGLE * FROM T300T
WHERE SPRAS = SY-LANGU
AND LGNUM = T336-LGNUM.
SELECT SINGLE * FROM T336T
WHERE SPRAS = SY-LANGU
AND LGNUM = T336-LGNUM
AND KZDIF = T336-KZDIF.
* Abort if no warehouse
CHECK W_ERR_FLAG = 'N'.
*
ENDFORM.
*&---------------------------------------------------------------------*
*& Module EXIT_COMMAND INPUT
*&---------------------------------------------------------------------*
* exit commands are processed before validation *
*----------------------------------------------------------------------*
MODULE EXIT_COMMAND INPUT.
CASE OK_CODE.
WHEN 'EXIT'. CLEAR OK_CODE. SET SCREEN 0. LEAVE SCREEN.
WHEN 'CANC'. CLEAR OK_CODE. SET SCREEN 0. LEAVE SCREEN.
WHEN 'BACK'. CLEAR OK_CODE. SET SCREEN 0. LEAVE SCREEN.
ENDCASE.
ENDMODULE. " EXIT_COMMAND INPUT
*&---------------------------------------------------------------------*
*& Form READ_T336
*&---------------------------------------------------------------------*
* text *
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM LIST_T336.
DATA: T336-DTEXT_ST LIKE T336T-DTEXT.
T336-DTEXT_ST = T336T-DTEXT.
SELECT * FROM T336 INTO TABLE XT336
WHERE LGNUM = T336-LGNUM.
LOOP AT XT336.
SELECT SINGLE * FROM T336T
WHERE SPRAS = 'E'
AND LGNUM = T336-LGNUM
AND KZDIF = XT336-X-KZDIF.
XT336-DTEXT = T336T-DTEXT.
MODIFY XT336.
ENDLOOP.
T336T-DTEXT = T336-DTEXT_ST.
CLEAR OK_CODE. SET SCREEN 200. LEAVE SCREEN.
ENDFORM. " LIST_T336
*&---------------------------------------------------------------------*
*& Module EXIT_COMMAND_200 INPUT
*&---------------------------------------------------------------------*
* text *
*----------------------------------------------------------------------*
MODULE EXIT_COMMAND_200 INPUT.
CASE OK_CODE2.
WHEN 'EXIT'. CLEAR OK_CODE2. SET SCREEN 0. LEAVE SCREEN.
WHEN 'CANC'. CLEAR OK_CODE2. SET SCREEN 0. LEAVE SCREEN.
WHEN 'BACK'. CLEAR OK_CODE2. SET SCREEN 100. LEAVE SCREEN.
ENDCASE.
ENDMODULE. " EXIT_COMMAND_200 INPUT
*&---------------------------------------------------------------------*
*& Module STATUS_0200 OUTPUT
*&---------------------------------------------------------------------*
* text *
*----------------------------------------------------------------------*
MODULE STATUS_0200 OUTPUT.
SET PF-STATUS 'POPUP'.
* SET TITLEBAR 'xxx'.
IF T300T-LGNUM NE T336-LGNUM.
SELECT SINGLE * FROM T300T
WHERE SPRAS = SY-LANGU
AND LGNUM = T336-LGNUM .
ENDIF.
ENDMODULE. " STATUS_0200 OUTPUT
Tuesday, May 6, 2008
Sample ABAP Program of Dialogue Module Pool
Labels:
Sample ABAP Code Programs
Subscribe to:
Post Comments (Atom)
Blog Archive
-
▼
2008
(300)
-
▼
May
(80)
- Object oriented programming (OOP) All Steps
- Object oriented programming (OOP) Step2
- Object oriented programming (OOP) Step-by-step
- Object oriented programming (OOP) explained with a...
- Interview Question on BAPI, RFC, ABAP Objects, Tables
- The Other 50 ABAP Interview Faq's
- More than 100 ABAP Interview Faq's
- Events in Report
- Example: The IDoc Type ORDERS01
- Program for Outbound IDOC
- Basic Configuration in IDOC
- Sample ABAP Program to Upload table using new func...
- Sample ABAP Program for Submitting report with sel...
- Sample ABAP Program for Submitting report with sel...
- Sample ABAP Program for Sending SAP Mail
- Sample ABAP Program for Search Layout sets for giv...
- Sample ABAP Program for Sapscript PerForm Module
- Sample ABAP Program for Create IDOC
- Sample ABAP Program for Output file to application...
- Sample ABAP Program for Module Pool Skeleton
- Sample ABAP Program for Module Pool containing scr...
- Sample ABAP Program for MB1B Call Transaction
- Sample ABAP Program of Function Module to Convert ...
- Sample ABAP Program of FTP Function Module
- Sample ABAP Program to EXPORT LIST TO MEMORY
- Sample ABAP Program to Execute Unix command from w...
- Sample ABAP Program to Get Output in EXCEL
- Sample ABAP Program to Implement EDI
- Sample Program to dynamically change upload/downlo...
- Sample ABAP Program to download table using new fu...
- Sample ABAP Program to Download file to Presentati...
- Sample ABAP Program to display pop message to avoi...
- Sample ABAP Program of ALV Grid
- Sample ABAP Program of Dialogue Module Pool
- Sample ABAP Program to DIALOGUE FLOW LOGIC
- Sample ABAP Program to Delete a file from the appl...
- Sample ABAP Program to Compare to Unix or PC files...
- Sample ABAP Program to Colour cells in ALV
- Sample ABAP Program to Calculate difference betwee...
- Sample ABAP Program of BW User Exit
- Sample SAP ABAP Program to Browse a file on the ap...
- Sample SAP ABAP Program of ALV Grid control using ...
- SE30 - Runtime Analysis Tool
- List of System fields
- Write a report that displays the text 'Hello world...
- HR (Human Resource) Tutorials Free downloads
- FI (Financial) Tutorials Free downloads
- PM (Plant Maintenance) Tutorials Free downloads
- WM (Warehouse Management) Tutorials Free downloads
- QM (Quality Management) Tutorials Free downloads
- PP (Production Planning) Tutorials Free downloads
- SD (Sales and Distribution) Tutorials Free downloads
- MM (Material Management) Tutorials Free downloads
- IDOC INTRODUCTION & STRUCTURE
- Step-by-Step Guide for using LSMW to Update Custom...
- LIST of TABLES
- Transporting Objects and Standard Text from one cl...
- SAP R/3 INTERVIEW ARCHITECTURE QUESTIONS
- SAP TRANSACTIONS INTERVIEW QUESTIONS
- SAP MODULARIZATION INTERVIEW QUESTIONS
- SAP LOGICAL DATABASE INTERVIEW QUESTIONS
- SAP R/3 DATA DICTIONARY INTERVIEW QUESTIONS
- SAP BDC INTERVIEW QUESTIONS & ANSWERS
- SAP ABAP MENU PAINTER & SCREEN PAINTER Tutorials
- SAP ABAP WORKFLOW Tutorials PDF Free downloads
- SAP ABAP ITS Tutorials PDF Free downloads
- SAP ABAP EDI Tutorials PDF Free downloads
- SAP ABAP BAPI Tutorials PDF Free downloads
- SAP ABAP Change&Transport System Tutorials PDF Fre...
- SAP ABAP OBJECTS Tutorials PDF Free downloads
- SAP ABAP USER EXITS Tutorials PDF Free downloads
- SAP ABAP ALE Tutorials PDF Free downloads
- SAP ABAP IDOC Tutorials PDF Free downloads
- SAP ABAP LSMW Tutorials PDF Free downloads
- SAP ABAP BDC (Batch Data Communication) Tutorials ...
- SAP ABAP SAPSCRIPTS Tutorials Free downloads
- ALV Grid free download
- SAP ABAP INTERACTIVE REPORTING FAQs
- SAP ABAP REPORTING GENERAL
- SAP REPORTS FAQ
-
▼
May
(80)
No comments:
Post a Comment