***********************************************************************
* AUTO DISALLOWED BACK POSTING TO PREVIOUS PERIOD
***********************************************************************
REPORT ZBDCMMRV.
TABLES: MARV.
* Batch Input Name
PARAMETERS P-BTCHSN(12) DEFAULT 'MMRVCHANGE'.
* Company Code
PARAMETERS P-BUKRS LIKE MARV-BUKRS.
* Auto / Manual run the Batch Input Program
PARAMETERS P-RUN AS CHECKBOX DEFAULT 'X'.
* INTERNAL TABLE FOR DATA
DATA: BEGIN OF ULTAB OCCURS 50,
BUKRS LIKE MARV-BUKRS, "Company Code
END OF ULTAB.
* INTERNAL TABLE FOR BATCH INPUT DATA
DATA: BEGIN OF IPUTTAB OCCURS 50.
INCLUDE STRUCTURE BDCDATA.
DATA: END OF IPUTTAB.
* INTERNAL TABLE FOR BATCH INPUT ERROR MESSAGE.
DATA: BEGIN OF MESSTAB OCCURS 50.
INCLUDE STRUCTURE BDCMSGCOLL.
DATA: END OF MESSTAB.
DATA: C_TAXKM LIKE MG03STEUER-TAXKM VALUE '1',
W-LINE-NO TYPE I.
REFRESH ULTAB.
SELECT * FROM MARV WHERE BUKRS = P-BUKRS.
ULTAB-BUKRS = MARV-BUKRS.
APPEND ULTAB.
ENDSELECT.
* CHECK WHETHER TABLE IS EMPTY
IF ULTAB[] is initial.
WRITE: / 'TABLE EMPTY'.
ENDIF.
* Create Batch session
PERFORM CRE-BATCH-SESS.
** LOOP TABLE TO CREATE SCREEN INPUT
SORT.
LOOP AT ULTAB.
REFRESH IPUTTAB.
PERFORM SCREEN1.
PERFORM SCREEN2.
PERFORM PRN_ULTAB.
PERFORM CLOSE-SESS.
ENDLOOP.
CALL FUNCTION 'BDC_CLOSE_GROUP'.
* END OF MAIN PROGRAM
FORM SCREEN1.
* SCREEN #1: INITAL SCREEN FOR MAINTAINING SOURCE LIST
CLEAR IPUTTAB.
IPUTTAB-PROGRAM = 'SAPMM03Y'.
IPUTTAB-DYNPRO = '100'.
IPUTTAB-DYNBEGIN = 'X'.
APPEND IPUTTAB.
* MMRV ENQUIRY BY COMPANY CODE
CLEAR IPUTTAB.
IPUTTAB-FNAM = 'MARV-BUKRS'.
IPUTTAB-FVAL = ULTAB-BUKRS.
APPEND IPUTTAB.
ENDFORM.
***********************************************************************
* FORM : SCREEN1 *
***********************************************************************
FORM SCREEN2.
* MODIFY SCREEN IN MMRV
CLEAR IPUTTAB.
IPUTTAB-PROGRAM = 'SAPMM03Y'.
IPUTTAB-DYNPRO = '110'.
IPUTTAB-DYNBEGIN = 'X'.
APPEND IPUTTAB.
* UNTICK ALLOWED POSTING TO PREVIOUS PERIOD
CLEAR IPUTTAB.
IPUTTAB-FNAM = 'MARV-XRUEM'.
IPUTTAB-FVAL = ' '.
APPEND IPUTTAB.
* DISALLOWED BACKPOSTING GENERALLY
CLEAR IPUTTAB.
IPUTTAB-FNAM = 'MARV-XRUEV'.
IPUTTAB-FVAL = 'X'.
APPEND IPUTTAB.
* Specify that we are now done with this screen (Save it with F11)
CLEAR IPUTTAB.
IPUTTAB-FNAM = 'BDC_OKCODE'.
IPUTTAB-FVAL = '/11'.
APPEND IPUTTAB.
ENDFORM.
***********************************************************************
* FORM : CLOSE-SESS *
* DESCRIPTION : CLOSE THE SESSION *
***********************************************************************
FORM CLOSE-SESS.
* closing the session.
IF P-RUN = 'X'.
* Auto run the Batch Input Program
CALL TRANSACTION 'MMRV'
USING IPUTTAB
MODE 'E'
UPDATE 'S'
MESSAGES INTO MESSTAB.
ELSE.
* Maual run the Batch Input Program
CALL FUNCTION 'BDC_INSERT'
EXPORTING
TCODE = 'MMRV'
TABLES
DYNPROTAB = IPUTTAB.
ENDIF.
ENDFORM.
***********************************************************************
* FORM : PRN-ULTAB *
* DESCRIPTION : PRINT OK TABLE *
***********************************************************************
FORM PRN_ULTAB.
WRITE: / ULTAB-BUKRS.
W-LINE-NO = W-LINE-NO + 1.
WRITE: ' RECORD# ', W-LINE-NO.
ENDFORM.
***********************************************************************
* FORM : CRE-BATCH-SESS *
* DESCRIPTION : CREATE BATCH SESSION *
***********************************************************************
FORM CRE-BATCH-SESS.
** Create BTCI session **
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
CLIENT = SY-MANDT
GROUP = P-BTCHSN
USER = SY-UNAME
KEEP = 'X'.
ENDFORM.
SD ABAP Reports, Account Payable, Availability Check, Billing, CIN,QM in Logistics, Production ,Inventory Posting, Source Inspection, MM Archiving, Certification Exam, Inventory Management, Material Master
Saturday, October 11, 2008
Subscribe to:
Post Comments (Atom)
Archive
-
▼
2008
(198)
-
▼
October
(80)
- SAP Creating The Stock Transfer Order
- Difference for Stock Transfer and Transfer Posting
- SAP Process Of Imported Material With Excise
- SAP Re-Open The Previous Period
- SAP Movement Error - Posting Only Possible Between
- Allow/Disallowed Backposting of Inventory Posting
- SAP Automate the opening of MM periods
- Difference Between Cancellation and Reversal
- SAP MBST: Reversal of cleared items in FI
- SAP Valuation Category
- SAP What is A, B, C and D Indicator for a material...
- SAP Physical Inventory Process
- SAP Physical Inventory Item Class
- SAP Planned Delivery Time as Workdays
- Variances between material and account of stock wh...
- SAP Inventory Beginning Balances
- SAP Setting Cross-company transaction
- SAP MM Process Flow
- MM Change Base Unit of Measure using
- SAP Mass Change Material Group In Materials Master
- Configuration How to do? SAP MM
- My Certification Experience SAP MM
- SAP Material Management MCQ MM
- General Test of Knowledge SAP MM
- Self Test Questions SAP MM
- Sample Questions for Materials Management SAP MM
- mySAP Certification - Criteria For Application
- SAP MM Basic Functions
- SAP MM Consignment
- SAP MM Solution Manager
- SAP MM Difference between Client , Purchasing Org ...
- MM Inventory - Allow Negative stocks
- SAP Maintain the user default settings when creati...
- SAP MM - Controlling the Fields in Material Master
- SAP Control the Output Format of your Material Num...
- SAP Control the Number Range Intervals for Materia...
- SAP One Storage Location for Two Different Plant M...
- SAP Creation of same Material Code in Different Co...
- SAP Functional Split Valuation for Materials
- SAP Price Control V or S in material type
- SAP Changing the Material Valuation Types MM Archi...
- SAP Deletion of Info Record
- SAP Deletion of Vendor Consignment Records
- SAP - How to use "me98" to delete PO from system c...
- SAP Meaning of Archiving Residence Time
- Report to display 12 weeks forecast, Yesterday Sto...
- Mass Select and Print Material Master Changed History
- Functional Purchase Order History Mass Display
- Total number of Purchasing Documents by Purchasing...
- Auto Disallowed Back Posting to Previous Period
- SAP Conventional Versus Logistic Invoice Verification
- SAP Important Accounts for Invoice Verification
- SAP No tax information during consignment Settlement
- Consignment Process - Settlement
- SAP Use of Invoice Plan in SAP
- SAP Functional LIS - Wrong figures in Logistics In...
- SAP List of standard Reports in MM
- SAP Project Status set to TECO
- SAP List of RA caculated values
- SAP - Stop Commitments Before Release Of Projects
- What is WBS element?
- SAP Aggregate POC Calculation
- SAP Dynamic Selection on Report Not Working
- SAP PS Substitutions
- SAP Progress Analysis to measure EVA
- SAP Functional Sequence Of Operations To Get EVA
- SAP Milestones
- SAP Functional Project profile
- SAP Capacity Planning in PS module; Calendar like ...
- SAP Project System Status -Deletion Flag Active
- SAP Functional Customizing Picking Output
- Functional SAP WMS - Decentralized Warehouse Manag...
- Functional Avoiding delivery creation when items q...
- Functional Exclude inventory in Storage Locations ...
- Functional Checking Fields with Incompletion proce...
- Adding additional fields to Delivery Due List Func...
- Set the default start variant for VL10 Functional
- Set the number range for Deliveries Functional
- HR Interview Questions Frequently Asked Functional
- Functional Free Download SAP Online Books Help in ...
-
▼
October
(80)
No comments:
Post a Comment