Creation of planned order IDOCs to a given selection This program selects to an input given via the selection screen the corresponding planned orders from the database. Then the function module for creation of planned order idocs is called.
In general this report is called from the report RCCLTRAN, but it can also be used for its own.
Code:
*&---------------------------------------------------------------------*
************************************************************************
* PROGRAM....... YRCCPLAF
* TITLE......... Planned Orders Outbound Interface
* AUTHOR........ Aveek Ghose
* DATE WRITTEN.. 15/09/2006
* R/3 RELEASE... 4.6C
* =====================================================================*
* COPIED FROM... N/A
* DESCRIPTION...
*& Creation of planned order IDOCs to a given selection *
*& This program selects to an input given via the selection screen the *
*& corresponding planned orders from the database. Then the function *
*& module for creation of planned order idocs is called. *
*& In general this report is called from the report RCCLTRAN, but it *
*& can also be used for its own. *
* =====================================================================*
* PROGRAM TYPE.. Outbound Interface
* DEV. CLASS.... ZPLN
* LOGICAL DB.... N/A
* =====================================================================*
* SCREENS....... N/A
* GUI TITLE..... N/A
* GUI STATUS.... N/A
* TRANSACTIONS.. N/A
* USER EXITS.... N/A
* =====================================================================*
* CHANGE HISTORY *
* Date By Correction Number & Brief Description Release
*----------------------------------------------------------------------*
* Tables / Structures
*----------------------------------------------------------------------*
REPORT YRCCPLAF
NO STANDARD PAGE HEADING
MESSAGE-ID z001
LINE-COUNT 65(0)
LINE-SIZE 255.
.
INCLUDE YRCCL_CONSTANTS.
DATA : CREATED_MASTERIDOCS_PLO LIKE SY-TABIX.
*................ Definition of local data ..........................*
* parallel >>>>>>>>>>>>>>>>
DATA: T_PLAFKEYPACK LIKE PLAF OCCURS 0 WITH HEADER LINE,
H_COUNTER TYPE I,
H_PARALLEL LIKE BDFIELDS-PARALLEL.
* parallel <<<<<<<<<<<<<<<<
DATA : F_COUNTER TYPE I. "DS001 Counter for IDocs
*>> Global data declaration
INCLUDE PLODATA.
INCLUDE RCPLOTOP.
INCLUDE ZRCORDTOP2.
*SELECTION-SCREEN SKIP 1.
**>> Logical system comes from Report RCCLTRANS
*SELECTION-SCREEN BEGIN OF LINE.
*SELECTION-SCREEN COMMENT 3(20) TEXT-001.
*SELECTION-SCREEN POSITION 35.
*PARAMETERS OPT_SYS LIKE TBDLST-LOGSYS.
*SELECTION-SCREEN END OF LINE.
*
**>> Messagetype comes from Report RCCLTRANS
*SELECTION-SCREEN BEGIN OF LINE.
*SELECTION-SCREEN COMMENT 3(20) TEXT-002.
*SELECTION-SCREEN POSITION 35.
*PARAMETERS MESTYP LIKE TBDME-MESTYP.
*SELECTION-SCREEN END OF LINE.
*
*SELECTION-SCREEN SKIP 1.
*
**>> Global selection parameters
*SELECTION-SCREEN BEGIN OF BLOCK GLOB WITH FRAME TITLE TEXT-003.
*SELECTION-SCREEN BEGIN OF LINE.
*SELECTION-SCREEN COMMENT 1(15) TEXT-009.
*SELECTION-SCREEN POSITION 33.
*PARAMETERS: DATE_FR LIKE SY-DATUM OBLIGATORY.
*SELECTION-SCREEN COMMENT 52(3) TEXT-010.
*SELECTION-SCREEN POSITION 58.
*PARAMETERS: DATE_TO LIKE SY-DATUM OBLIGATORY.
*SELECTION-SCREEN END OF LINE.
*SELECT-OPTIONS: DISPO_GL FOR MARC-DISPO,
* MATNR_GL FOR MARA-MATNR MATCHCODE OBJECT MAT1,
* ARBPL_GL FOR CRHD-ARBPL MATCHCODE OBJECT CRAM,
* WERKS_GL FOR MARC-WERKS.
** Planning scenario not a ranges table, changed by Biegler 27.06.96
*PARAMETERS: PLSCN LIKE PLSC-PLSCN.
*
** do not select from MARC, but use ranges tables directly.
** matnr_gl and werks_gl must have the same length.
*PARAMETERS: NO_SEL TYPE C DEFAULT ' ' NO-DISPLAY.
*SELECTION-SCREEN END OF BLOCK GLOB.
*
*SELECTION-SCREEN SKIP 1.
*
**>> Selection for planned orders
*SELECTION-SCREEN BEGIN OF BLOCK PLORD WITH FRAME TITLE TEXT-005.
*SELECT-OPTIONS: DISPO_PL FOR MARC-DISPO,
* MATNR_PL FOR MARA-MATNR MATCHCODE OBJECT MAT1,
* ARBPL_PL FOR CRHD-ARBPL MATCHCODE OBJECT CRAM,
* WERKS_PL FOR MARC-WERKS.
*SELECTION-SCREEN END OF BLOCK PLORD.
*
*
** Parallel >>>>>>>>>>>>>>>>
*SELECTION-SCREEN: SKIP 1,
* BEGIN OF BLOCK PARALLEL_PROCESSING
* WITH FRAME TITLE TEXT-011,
* BEGIN OF LINE,
* COMMENT 1(30) TEXT-012 FOR FIELD RFCGR,
* POSITION 33.
*PARAMETERS: RFCGR LIKE BDFIELDS-RFCGR.
*SELECTION-SCREEN: END OF LINE,
* BEGIN OF LINE,
* COMMENT 1(30) TEXT-013 FOR FIELD PSIZE,
* POSITION 33.
*PARAMETERS: PSIZE LIKE BDFIELDS-PSIZE DEFAULT 20.
*SELECTION-SCREEN: END OF LINE,
* END OF BLOCK PARALLEL_PROCESSING.
** Parallel <<<<<<<<<<<<<<<<
SELECTION-SCREEN SKIP 1.
*>> Logical system comes from Report RCCLTRANS
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 3(20) TEXT-001.
SELECTION-SCREEN POSITION 35.
PARAMETERS OPT_SYS LIKE TBDLST-LOGSYS.
SELECTION-SCREEN END OF LINE.
*>> Messagetype comes from Report RCCLTRANS
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 3(20) TEXT-002.
SELECTION-SCREEN POSITION 35.
PARAMETERS MESTYP LIKE TBDME-MESTYP.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN SKIP 1.
*>> Global selection parameters
SELECTION-SCREEN BEGIN OF BLOCK GLOB WITH FRAME TITLE TEXT-003.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(15) TEXT-009.
SELECTION-SCREEN POSITION 33.
PARAMETERS: DATE_FR LIKE SY-DATUM. " OBLIGATORY.
SELECTION-SCREEN COMMENT 52(3) TEXT-010.
SELECTION-SCREEN POSITION 58.
PARAMETERS: DATE_TO LIKE SY-DATUM. " OBLIGATORY.
SELECTION-SCREEN END OF LINE.
SELECT-OPTIONS: DISPO_GL FOR MARC-DISPO,
MATNR_GL FOR MARA-MATNR MATCHCODE OBJECT MAT1,
*MOD-002
MATNR_EU FOR MARA-MATNR MATCHCODE OBJECT MAT1,
*MOD-002
ARBPL_GL FOR CRHD-ARBPL MATCHCODE OBJECT CRAM,
WERKS_GL FOR MARC-WERKS.
* Planning scenario not a ranges table, changed by Biegler 27.06.96
PARAMETERS: PLSCN LIKE PLSC-PLSCN.
* do not select from MARC, but use ranges tables directly.
* matnr_gl and werks_gl must have the same length.
PARAMETERS: NO_SEL TYPE C DEFAULT ' ' NO-DISPLAY.
SELECTION-SCREEN END OF BLOCK GLOB.
SELECTION-SCREEN SKIP 1.
*>> Selection for planned orders
*SELECTION-SCREEN BEGIN OF BLOCK PLORD WITH FRAME TITLE TEXT-005.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG. SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG. Every effort is made to ensure content integrity. Use information on this site at your own risk.