Make your own free website on Tripod.com

SAP PM & ABAP Code Niraj Visnoi

Function Modules in SAP IDOC
Home
What is SAP ?
SAP LSMW Explained with example
SAP PM T-Codes
PM BRD/COR Maintenance
Add Your URL
User Exits & Enhancements
Best Of SAP Links
BDC Code
My Resume
SAP SmartForms Step by Step
SAP ABAP ALV Grid Explained with Example
Useful Tips
Contact Information Guest Book and Consultants List
ABAP Code
ABAP System Fields
SAPScript
SAPScript Graphics
SAPScript Print Program
ABAP ListViewer
Dialog Programming
SAP Tables
SAP ALE and IDOC
Recommended SAP ABAP Coding guidelines
SAP General ABAP
Submit Your Code
SAP Books For consultants
Free Website Submission and ROR Sitemap generator
Free Domain Search
Free HoroScope

Some function modules used in IDOC Programming

CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
        EXPORTING
             VALUE(MASTER_IDOC_CONTROL) LIKE  EDIDC STRUCTURE  EDIDC
               " Control record of master IDoc
             VALUE(OBJ_TYPE) LIKE  SERIAL-OBJ_TYPE DEFAULT ''
             VALUE(CHNUM) LIKE  SERIAL-CHNUM DEFAULT ''
       TABLES
              COMMUNICATION_IDOC_CONTROL STRUCTURE  EDIDC
               "  Control records of created comm. IDocs
              MASTER_IDOC_DATA STRUCTURE  EDIDD
               " Data records of master IDoc
       EXCEPTIONS
              ERROR_IN_IDOC_CONTROL
               " Incorrect entry in IDoc control record
              ERROR_WRITING_IDOC_STATUS
               " Error when writing IDoc status records 
              ERROR_IN_IDOC_DATA
               " Incorrect entry in IDoc data records
              SENDING_LOGICAL_SYSTEM_UNKNOWN
               " Own logical system unknown
 
CALL FUNCTION 'CHANGE_POINTERS_READ'
  EXPPORTING
     VALUE(ACTIVATION_DATE_HIGH) LIKE  SY-DATUM DEFAULT SPACE
     VALUE(ACTIVATION_DATE_LOW) LIKE  SY-DATUM DEFAULT SPACE
     VALUE(ACTIVATION_TIME_HIGH) LIKE  SY-UZEIT DEFAULT '000000'
     VALUE(ACTIVATION_TIME_LOW) LIKE  SY-UZEIT DEFAULT '000000'
     VALUE(CHANGE_DOCUMENT_OBJECT_CLASS) LIKE  CDPOS-OBJECTCLAS
       DEFAULT SPACE
     VALUE(CREATION_DATE_HIGH) LIKE  SY-DATUM DEFAULT SPACE
     VALUE(CREATION_DATE_LOW) LIKE  SY-DATUM DEFAULT SPACE
     VALUE(CREATION_TIME_HIGH) LIKE  SY-UZEIT DEFAULT '000000'
     VALUE(CREATION_TIME_LOW) LIKE  SY-UZEIT DEFAULT '000000'
     VALUE(MESSAGE_TYPE) LIKE  BDCPS-MESTYPE
     VALUE(READ_NOT_PROCESSED_POINTERS) LIKE  BDCPS-PROCESS DEFAULT
       'X'
  TABLES
      CHANGE_POINTERS STRUCTURE  BDCP
      MESSAGE_TYPES STRUCTURE  BDMSGTYP OPTIONAL
  EXCEPTIONS
      ERROR_IN_DATE_INTERVAL
      ERROR_IN_TIME_INTERVAL
 

CALL FUNCTION change_pointers_status_write.
  IMPORTING
     VALUE(MESSAGE_TYPE) LIKE  EDIDC-MESTYP
  TABLES
      CHANGE_POINTERS_IDENTS STRUCTURE  BDICPIDENT
 
Examples of Inbound function modules are
IDOC_INPUT_BLAOCH              IDoc inbound processing: change Ccontract
IDOC_INPUT_BLAORD              IDoc inbound processing: Create Contract
IDOC_INPUT_MATMAS01          IDoc inbound processing: Material Master  
 
Examples of Outbound function modules are
IDOC_OUTPUT_BLAOCH
IDOC_OUTPUT_BLAORD

Enter supporting content here

http://sap.niraj.tripod.com

Search http://sap.niraj.tripod.com Search www

 http://sap.niraj.tripod.com      Niraj Visnoi *INDIA * niraj_visnoi@consultant.com      
 CELL No. 91 9911413767       Copyright 2006 all rights reserved