Product class and Attributes
Can a single product class with attributes be mapped to 2 separate product specification (based on the value of the attribute). Eg, lets say there is a product class called Internet which has an attribute called Site type. The value of the attribute site type could be single site or multi-site. Based on the value of the attribute for the product class, we need to invoke different orchestration plans.
Is this possible? If yes, how can this be achieved? We would also like to know if this is the right approach. If not, how do we model such requirements
Hi Nagu,
Look at it from a different perspective - The value prop. of Product Class (PC) to Product Spec (PS) mapping is that you don't have to to change the PS, based for every offering based on that specific PC or even if there is an attribute value change (Eg. value of the attribute Download speed changes from 3Mbps to 12Mbps), the PS remains the same. Now, if you like to introduce a new PS for corresponding to every attribute value of the PC, then this value of PS -PS mapping is lost i.e. now you will have to introduce a new PS when the value of an attribute changes, which is not desirable. OSM provides you enough flexibility wrt. to order decomposition, dependencies between order components, dynamic orchestration dependencies etc. to create the orchestration plan based based on the order attributes (which includes the PC attribute values) and you should be looking at these features to achieve your use cases. The recommendation is generic though, if you could flesh out your use case for us, we would be happy to recommend an approach.
Thanks,
Deep
Similar Messages
-
"Attribute" field in product class
Hi All,
Can anyone please tell what is the use of Attributes field which is present in product class?
Thanks,
SandyTo complement previous answer, I'm adding a referece to the Design Sutdio (DS) for OSM Documentation which describes product attributes in section: "About Product Classes"
Here is an extract from the DS documentation:
"... Product classes include dynamic attributes (characteristics) for a specific type of product. For example, DSL attributes might include Up Speed, Down Speed, Quality of Service, or Service ID.
... Incoming customer orders contain order items that include product class attributes as key/value pairs. For example, an order item may contain the DSL attribute Up Speed with a value of 1MB. Product class attributes enable Design Studio to anticipate the structure of an order item and pass the attribute key/value pairs to downstream systems"
Carlos -
Creation of Service Product with Set Type and Attribute
Dear All,
Please guide me with proper step by step process,
How to create the product with the set type and attribute for service industry in sap crm 7.0
Regards,Hi Nitin,
Before creating the Service type of product, you have to define the Base category for Service type product. Generally the category for service will be created under the R3 hierarchy R3PRODSTYPE. You can create this category using the TCode:
COMM_HIERARCHY. Here you have to select the product type as Service and have to assign the set types to the category.
You can create a service product using the transaction : COMMPR01 -> Click on Service ICON -> Select the Category for Service Type. Then fill in the details for Service Product description, Service ID(Based on number range settings for products), Language.
Also fill other details like Base Unit of measure, Pricing condition for different sales areas for the service product.
Since you are using CRM7.0, you can do all these activities using a POWER USER role.
For more information about Set types and hierarchies please refer the following help link:
http://help.sap.com/saphelp_crm70/helpdata/EN/46/57672501a208e7e10000000a114a6b/frameset.htm
Hope this helps!
Regards,
Chethan -
AciSource object-class and dpsaci attribute
Dear all,
I am trying to create a proxy server that is connected to a JDBC data view.
All went well according to the documentation until I reached the point of creating ACI to control access to the data view.
According to the documentation, I have to extend the schema to use aciSource object-class and the dpsaci attribute.
However, there are no documentation on how to get the correct values of them.
I would be grateful for any type of help.
Thanks.Got it in dps/etc/config_schema.ldif file
The values are
attributeTypes: ( "" NAME ( 'dpsaci' ) DESC '' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'DPS' )
attributeTypes: ( "" NAME ( 'aciSource' ) DESC '' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'DPS' )
objectClasses: ( "" NAME 'aciSource' DESC 'Access Control Instructions container' MUST ( cn ) MAY ( dpsaci ) X-ORIGIN 'DPS')
I hope this could help someone in the future. -
Differences between Property Classes and Visual Attributes
Hi folks
Can anybody know the exact difference between a property class and a visual attribute?
I'm substantially good at Forms but doesn't know the exact difference.
Any reply will be deeply appreciated.
Cheers,
PCZVisual Attributes are only for the visual representation of your items, buttons, blocks, canvas, ...
Property Classes are for inheriting all objects including visual attributes.
If you create a style guide for your company, then first define the visual attributes for the look and feel. After that create property classes for all of the other objects in your application. On top of that create object groups, where you centralize your property classes and visual attributes.
If you have created such a form, then call this form reference-template. Now you inherit the object-groups to a second form and call this form "template".
If you create new forms, copy the template and rename it. Then you have in all your forms inherited visual attributes, property classes, etc. and all this stuff is in one "reference-template"
try it
Gerd -
Multiple Class-Path: attributes in Jar files
Hello,
I'm packaging a set of jar files for distribution with Class-Path: attributes in them. In the documentation I read and in one of the java trails it said that I could have a manifest file like:
Class-Path: log4j.jar log4j-core.jar
Class-Path: jsse.jar jcert.jar jnet.jar
But this doesn't work. It only works when I do this:
Class-Path: log4j.jar log4j-core.jar jsse.jar jcert.jar jnet.jar
Here is how I'm running the jar:
java -jar server.jar
Is the documentation wrong? Or this is a bug?
thanks
charlieCertain attributes were only meant to be specified once. Like Main-Class and Class-Path for example. If these were listed two or more times, then the last occurance is the one that gets recognized (basically, each new instance overwrites the previous instance). Some attributes are listed as "per-entry" and are freely duplicated for each entry. For example signed jars could have a number of Name: and xxx-Digest: attributes.
This link is to the manifest spec:
http://java.sun.com/products/jdk/1.2/docs/guide/jar/manifest.html
To answer the original posters question, the doc's are in error. Actually, the error was not in the docs, it was in the tutorial, but none the less its still in error. He could have done this:
Class-Path: log4j.jar log4j-core.jar
jsse.jar jcert.jar jnet.jar
^-- two spaces before the start of jsse.jar
because the docs allow for line continuation (although it's not exactly clear if you read the docs). The docs are also apparently in error regarding the max line length of 72 bytes. I have tested this with over 100 char's on a win32 machine and it works fine for me. The limitation must therefore apply to some other operating system, or it could just be in error.
-Ron -
Abstract classes and constructors - cannot call abs. methods in CONSTRUCTOR
Let me explain the scenario:
I'm building a program in which I need to read a file (among other things) and I intend to use object orientation to it's fullest in doing so. I thought of creating an abstract FILE class which has the commonalities, and two subclasses SERVER_FILE and PC_FILE, which implement the abstract method GET_CONTENTS in different ways (OPEN DATASET / GUI_UPLOAD), same for the CHOOSE method which allows to select the file from it's corresponding source.
Initially I've used an interface but since another tasks like setting the file path are common for both, switched to an ABSTRACT class.
Now, the problem is, from the main code I intend to use a FILE reference to handle either type of file. At the instantiation moment I'd like the path attribute to be set; if it was not set by parameter, i'd like to call the CHOOSE method which is abstract for the superclass. Since this is common for either subclass, I need a way to code it once in the superclass. But I get an error because the CHOOSE method is abstract.
This is the problem code (extracts):
* CLASS lcl_file DEFINITION
CLASS lcl_file DEFINITION ABSTRACT.
PUBLIC SECTION.
METHODS:
constructor
IMPORTING
i_path TYPE string OPTIONAL
EXCEPTIONS
no_path_chosen,
get_contents ABSTRACT
RETURNING
value(rt_contents) TYPE string_table
EXCEPTIONS
read_error.
PROTECTED SECTION.
DATA:
_v_path TYPE string.
METHODS:
choose ABSTRACT
EXCEPTIONS
no_path_chosen,
set_path
IMPORTING
i_path TYPE string.
ENDCLASS. "lcl_file DEFINITION
* CLASS lcl_file IMPLEMENTATION
CLASS lcl_file IMPLEMENTATION.
METHOD constructor.
IF i_path IS SUPPLIED.
CALL METHOD set_path
EXPORTING
i_path = i_path.
ELSE.
*---->>>> PROBLEM CALL - CAN'T BE DONE!!
CALL METHOD choose
EXCEPTIONS
no_path_chosen = 1.
IF sy-subrc = 1.
RAISE no_path_chosen.
ENDIF.
ENDIF.
ENDMETHOD. "constructor
METHOD set_path.
_v_path = i_path.
ENDMETHOD. "set_path
ENDCLASS. "lcl_file IMPLEMENTATION
* CLASS lcl_server_file DEFINITION
CLASS lcl_server_file DEFINITION
INHERITING FROM lcl_file.
PUBLIC SECTION.
METHODS:
get_contents REDEFINITION.
PROTECTED SECTION.
METHODS:
choose REDEFINITION.
ENDCLASS. "lcl_server_file DEFINITIO
* CLASS lcl_server_file IMPLEMENTATION
CLASS lcl_server_file IMPLEMENTATION.
METHOD choose.
DATA:
l_i_path TYPE dxfields-longpath,
l_o_path TYPE dxfields-longpath.
CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'
EXPORTING
i_location_flag = 'A' " Application server
i_path = l_i_path
fileoperation = 'R' " Lectura
IMPORTING
o_path = l_o_path
EXCEPTIONS
rfc_error = 1
OTHERS = 2.
IF sy-subrc = 0 AND l_o_path <> l_i_path.
MOVE l_o_path TO _v_path.
ELSE.
RAISE no_path_chosen.
ENDIF.
ENDMETHOD. "choose
METHOD get_contents.
DATA: l_line LIKE LINE OF rt_contents,
l_osmsg TYPE string.
CHECK NOT _v_path IS INITIAL.
OPEN DATASET _v_path FOR INPUT
IN TEXT MODE
MESSAGE l_osmsg.
IF sy-subrc <> 0.
MESSAGE e000(oo) WITH l_osmsg
RAISING read_error.
ELSE.
DO.
READ DATASET _v_path INTO l_line.
IF sy-subrc = 0.
APPEND l_line TO rt_contents.
ELSE.
EXIT.
ENDIF.
ENDDO.
CLOSE DATASET _v_path.
ENDIF.
ENDMETHOD. "get_contents
ENDCLASS. "lcl_server_file IMPLEMENTATION
* CLASS lcl_pc_file DEFINITION
CLASS lcl_pc_file DEFINITION
INHERITING FROM lcl_file.
PUBLIC SECTION.
METHODS:
get_contents REDEFINITION.
PROTECTED SECTION.
METHODS:
choose REDEFINITION.
ENDCLASS. "lcl_pc_file DEFINITIO
* CLASS lcl_pc_file IMPLEMENTATION
CLASS lcl_pc_file IMPLEMENTATION.
METHOD choose.
DATA:
l_i_path TYPE dxfields-longpath VALUE 'C:\',
l_o_path TYPE dxfields-longpath.
CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'
EXPORTING
i_location_flag = 'P' " PC
i_path = l_i_path
fileoperation = 'R' " Lectura
IMPORTING
o_path = l_o_path
EXCEPTIONS
rfc_error = 1
OTHERS = 2.
IF sy-subrc = 0 AND l_o_path <> l_i_path.
MOVE l_o_path TO _v_path.
ELSE.
RAISE no_path_chosen.
ENDIF.
ENDMETHOD. "choose
METHOD get_contents.
CHECK NOT _v_path IS INITIAL.
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = _v_path
CHANGING
data_tab = rt_contents
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17.
IF sy-subrc <> 0.
RAISE read_error.
ENDIF.
ENDMETHOD. "get_contents
ENDCLASS. "lcl_pc_file IMPLEMENTATION
* Data
DATA: gr_file TYPE REF TO lcl_file.
* Main Program
START-OF-SELECTION.
* Get text lines from file
IF p_srv = abap_true.
CREATE OBJECT gr_file
TYPE
lcl_server_file
EXCEPTIONS
no_path_chosen = 1.
ELSE.
CREATE OBJECT gr_file
TYPE
lcl_pc_file
EXCEPTIONS
no_path_chosen = 1.
ENDIF.
On a 4.6c system this code gave me a dump, while on my NW7.0 SP it doesn't even activate with the following error:
You cannot call abstract methods in the "CONSTRUCTOR" method.
- Following some suggestions from Java forums i've tried to define the constructor in the base class as PROTECTED or PRIVATE instead, then calling super->constructor from the subclasses, but I get this error in german:
Sichtbarkeit des Konstruktors darf nicht spezieller als die Sichtbarkeit der Instanzerzeugung (CREATE-Zuzatz) sein.
which Altavista translates like:
Visibility of the constructor may not be more special than the
visibility of the instance production (CREATE Zuzatz).
- I've also thought of defining the CHOOSE method as a class (not instance) one, then calling it before creating the file object which maybe solves the problem, but I see that approach more "procedural oriented" which i'm trying to avoid.
- Of course I could define a constructor for each subclass, but both would have exactly the same code.
I'm really lost on how should I code this. My main focus is on avoiding code dupplication.
I hope someone with more OO experience can see what I'm trying to do and sheds some light.
Many thanks for reading all this!Dear Alejandro,
When i saw your code, you are trying to access an astract method CHOOSE(which is actually implemented in sub class) from the constructor of the base class which is not possible. By this time, we don't know which sub class it is refering to, so it gives an error. I see two solutions for this..
1. To define constructor in sub class and call the choose method from the consturctor of the sub class(which in this case is reputation of the same again for each sub class)
2. Remove the calling of choose method from the constructor of the main class and call it separately(after creating the object). By now we know which sub class we are refering to. I would have designed the program in the following way.
* CLASS lcl_file DEFINITION
CLASS lcl_file DEFINITION ABSTRACT.
PUBLIC SECTION.
METHODS:
constructor
IMPORTING
i_path TYPE string OPTIONAL
EXCEPTIONS
no_path_chosen,
get_contents ABSTRACT
RETURNING
value(rt_contents) TYPE string_table
EXCEPTIONS
read_errorm,
set_path ABSTRACT
EXCEPTIONS
no_path_chosen.
PROTECTED SECTION.
DATA:
_v_path TYPE string.
* METHODS:
* choose ABSTRACT
* EXCEPTIONS
* no_path_chosen,
* set_path ABSTRACT
* IMPORTING
* i_path TYPE string.
ENDCLASS. "lcl_file DEFINITION
* CLASS lcl_file IMPLEMENTATION
CLASS lcl_file IMPLEMENTATION.
METHOD constructor.
IF i_path IS SUPPLIED.
_v_path = i_path.
* CALL METHOD set_path
* EXPORTING
* i_path = i_path.
* ELSE.
**---->>>> PROBLEM CALL - CAN'T BE DONE!!
* CALL METHOD choose
* EXCEPTIONS
* no_path_chosen = 1.
* IF sy-subrc = 1.
* RAISE no_path_chosen.
* ENDIF.
ENDIF.
ENDMETHOD. "constructor
* METHOD set_path.
* _v_path = i_path.
* ENDMETHOD. "set_path
ENDCLASS. "lcl_file IMPLEMENTATION
* CLASS lcl_server_file DEFINITION
CLASS lcl_server_file DEFINITION
INHERITING FROM lcl_file.
PUBLIC SECTION.
METHODS:
get_contents REDEFINITION,
set_path REDEFINITION.
* PROTECTED SECTION.
* METHODS:
* choose REDEFINITION.
ENDCLASS. "lcl_server_file DEFINITIO
* CLASS lcl_server_file IMPLEMENTATION
CLASS lcl_server_file IMPLEMENTATION.
METHOD set_path.
DATA:
l_i_path TYPE dxfields-longpath,
l_o_path TYPE dxfields-longpath.
CHECK _v_path IS INITIAL.
CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'
EXPORTING
i_location_flag = 'A' " Application server
i_path = l_i_path
fileoperation = 'R' " Lectura
IMPORTING
o_path = l_o_path
EXCEPTIONS
rfc_error = 1
OTHERS = 2.
IF sy-subrc = 0 AND l_o_path = l_i_path.
MOVE l_o_path TO _v_path.
ELSE.
RAISE no_path_chosen.
ENDIF.
ENDMETHOD. "set_path
METHOD get_contents.
DATA: l_line LIKE LINE OF rt_contents,
l_osmsg TYPE string.
CHECK NOT _v_path IS INITIAL.
* OPEN DATASET _v_path FOR INPUT
* IN TEXT MODE
* MESSAGE l_osmsg.
IF sy-subrc = 0.
* MESSAGE e000(oo) WITH l_osmsg
* RAISING read_error.
ELSE.
DO.
READ DATASET _v_path INTO l_line.
IF sy-subrc = 0.
APPEND l_line TO rt_contents.
ELSE.
EXIT.
ENDIF.
ENDDO.
CLOSE DATASET _v_path.
ENDIF.
ENDMETHOD. "get_contents
ENDCLASS. "lcl_server_file IMPLEMENTATION
* CLASS lcl_pc_file DEFINITION
CLASS lcl_pc_file DEFINITION
INHERITING FROM lcl_file.
PUBLIC SECTION.
METHODS:
get_contents REDEFINITION,
set_path REDEFINITION.
* PROTECTED SECTION.
* METHODS:
* choose REDEFINITION.
ENDCLASS. "lcl_pc_file DEFINITIO
* CLASS lcl_pc_file IMPLEMENTATION
CLASS lcl_pc_file IMPLEMENTATION.
METHOD set_path.
DATA:
l_i_path TYPE dxfields-longpath VALUE 'C:\',
l_o_path TYPE dxfields-longpath.
CHECK _v_path IS INITIAL.
CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'
EXPORTING
i_location_flag = 'P' " PC
i_path = l_i_path
fileoperation = 'R' " Lectura
IMPORTING
o_path = l_o_path
EXCEPTIONS
rfc_error = 1
OTHERS = 2.
IF sy-subrc = 0 AND l_o_path = l_i_path.
MOVE l_o_path TO _v_path.
ELSE.
RAISE no_path_chosen.
ENDIF.
ENDMETHOD. "set_path
METHOD get_contents.
CHECK NOT _v_path IS INITIAL.
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = _v_path
CHANGING
data_tab = rt_contents
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17.
IF sy-subrc = 0.
* RAISE read_error.
ENDIF.
ENDMETHOD. "get_contents
ENDCLASS. "lcl_pc_file IMPLEMENTATION
* Data
DATA: gr_file TYPE REF TO lcl_file.
* Main Program
START-OF-SELECTION.
* Get text lines from file
IF abap_true = abap_true.
CREATE OBJECT gr_file
TYPE
lcl_server_file
EXCEPTIONS
no_path_chosen = 1.
ELSE.
CREATE OBJECT gr_file
TYPE
lcl_pc_file
EXCEPTIONS
no_path_chosen = 1.
ENDIF.
gr_file->set_path( ).
Regards
Kesava
Edited by: Kesava Chandra Rao on Mar 19, 2008 11:44 AM -
Can you create a product report with attributes?
I have tried create a customer and orders report in order to show a list of people who have purchased classes..
My product is setup as : SATURDAY CLASSES, with product attributes eg: JAZZ, BALLET, DRAMA etc
When I run the report, it only shows the initial product, SATURDAY CLASSES, and no attributes.
Report goes like this:
Custom Reports > Add a Customer Report
> Customers and Orders > Then I choose my fields required.. and Generate Report.
I realise to fix this problem I could change the products to individual products and group them together, but that means the product discounts I have set up wouldn't work....
Which makes it hard to see who has booked into which class..
Is there any way to run a report that will show attributes?Our reports currently do not include product attributes. I believe that this item is on the wishlist so I would encourage you to go there and vote for it.
Cheers,
Mario -
Automatic Batch Determination - Class and Classification - SD only
Hi
What Is use of Class and Classification in Automatic Batch Determination ?
Regards.,
Lakshmanan.S
E-Mail id : [email protected]Hi Lakshmanan.S
please refer to the steps below to implement this functionality:
1. create characteristics to reflect the attributes of your product.
2. create new class(with class type batch) to group those characteris.
3. assign the class to your material master.
4. in IMG, make sure batch determination procedure is properly assigned to sales area and order type.
5. activate the auto. determination for item categoty.
(IMG->LO->batch management..->..in SD->..)
6. as it uses conditon tech. also, make sure your strategy record is maintain.
I just delivered the workshop of this topic in my office today Hope u find this useful.
Best regards,
David Wang -
Error message: Failed to load Main-Class manifest attribute from local_poli
OS: SLED 10 SP3 (Linux)
Production Installation: to have the freebXML.org "Hermes2" work on nhn.no
Hermes, apache-tomcat, jce, are all installed in same directory, and the first steps of Hermes installation is OK, but I cannot reach Hermes in http://localhost:8080, and I wonder if the JCE is part of this.
I need to have the JCE Ecryption Extension installed, but upon trying <java -jar local_policy.jar> the error message comes like this:
*" Failed to load Main-Class manifest attribute from local_policy.jar "*
I am uncertain why this message comes.816248 wrote:
>I need to have the JCE Ecryption Extension installed, but upon trying <java -jar local_policy.jar> the error message comes like this:
*" Failed to load Main-Class manifest attribute from local_policy.jar "*
I am uncertain why this message comes.
I'm uncertain why you think you need to execute "java -jar local_policy.jar" since the jar file local_policy.jar has no executable parts and is simply a container for two 'policy' files. Can you post a reference to the documentation that says you need to do this?
The only time you are likely to be directly interested in this jar file is when installing the 'unlimited strength' jar files when it is replaced. -
Ees_japi.jar and attribute dimensions
We have a cube with a product dimension and several atribute dimensions. One of the attribute dimensions identify the product category. I need to execute a Java query that pulls back the level 0 of product dimension filtered down to the selected attribute (which is a category).Example Return if Category 1 is selected:Item 001 Category 1Item 014 Category 1Item 555 Category 1I believe it will be a variation of executeQuery method in the memberselection class. Any help on what to use to accomplish this is appreciated.Jim
Disregard, I was not seeing the second style of executequery. Using the second version I was able to use the @WITHATTR() function and pull the needed information. Thanks anyway.Jim
-
Change in Valauation class and G/L account
Hi expert
I need to change the Valuation class amd G/L account of most of the material, i know i have to close all the open Purchase order and Production Order and transfer all the G/l Account balance.
i would like to know what will be cause and effect will be on system and is there any mass maintained.
Regard
NabilHI,
If you want to change the valuation class of a material, then you have to ensure the following.
1. There shouldn't be any open doc's against the material such as Purchase orders, Production order, sale order etc.
2. The stock of the material should be 0.
An alternate solution would be to create a new material with the correct val class & GL & do a material to material transfer.
Then you can set deletion flag for the material with wrong val class.
Hope it helps
Thanks & Regards, -
How to attempt production orders and get feedback by using IDocs
Hi,
I'm new new to SAP and R3 respectively mySAP. I need to know how to use IDocs (over file system) to attempt production orders to an extern application and how to get the feedback of the whole orders and single operations.
I found the IDoc-base-type "PPCC2RECORDER01" to send production orders. Is that the right base type for production orders?
(In consideration of compatibility and support me was recommend to avoid the old types OPERA2 and CONF21.)
What IDoc-types do I need to get feedback about a production order and its operations?
I hope someone is understanding my questions is able to help me. Please apologize my broken English.
Thanks!
HannesPROGRAM....... ZRCCLORDPROC
TITLE......... Production Odrer Idocs
AUTHOR........ Aveek Ghose
DATE WRITTEN.. 15/09/2006
R/3 RELEASE... 4.6C
=====================================================================*
COPIED FROM... N/A
DESCRIPTION...
*& Creation of production order IDOCs to a given selection
*& This program selects to an input given via the selection screen the *
*& corresponding production 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.... ZPD1
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 zrcclordproc
NO STANDARD PAGE HEADING
MESSAGE-ID ZCUST
LINE-COUNT 65(0)
LINE-SIZE 255.
INCLUDE RCORDO01. " PBO-Modules *
INCLUDE RCORDI01. " PAI-Modules *
INCLUDE RCORDF01. " FORM-Routines *
--> Global data
TYPE-POOLS: cloi.
include zprodata. "Types / constants for Orderselection
include zrcordtop. "Tables / Data for this report
include zrcordtop1.
include yrccl_constants.
TABLES : jcds,
tvarv,
zzzz_xref_data.
TYPES: BEGIN OF ty_date,
aufnr TYPE aufnr,
aedat TYPE aufaedat,
aezeit TYPE co_chg_time,
erdat TYPE auferfdat,
erfzeit TYPE co_ins_time,
loekz TYPE aufloekz,
indicator(1) TYPE c,
END OF ty_date.
DATA: is_enhancement type isu_ord_segments_determine.
DATA: itab_date TYPE STANDARD TABLE OF ty_date
INITIAL SIZE 0 WITH HEADER LINE.
DATA: f_objnr TYPE j_objnr.
DATA: g_report_sub_head(72) TYPE c, "Sub-Header hold area
g_report_head(72) TYPE c, "Header hold area
g_run_date(72) TYPE c, "Holds message for Run date
g_run_time(72) TYPE c. "Holds message for Run time
DATA:
f_old_date TYPE datum,
f_old_time TYPE uzeit,
f_continue(1) TYPE c.
END OF INSERTION DS001
--> Überschrift für sonstige Einstellungen
SELECTION-SCREEN SKIP 2.
SELECTION-SCREEN BEGIN OF BLOCK miscellaneous WITH FRAME.
SELECTION-SCREEN SKIP 1.
SELECTION-SCREEN COMMENT 1(30) text-001. "#EC
SELECTION-SCREEN SKIP 1.
*>> Logical system comes from Report RCCLTRANS
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 3(30) text-002.
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(30) text-003.
SELECTION-SCREEN POSITION 35.
PARAMETERS mestyp LIKE tbdme-mestyp.
SELECTION-SCREEN END OF LINE.
*>> Messagetype comes from Report RCCLTRANS
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 3(30) text-004.
SELECTION-SCREEN POSITION 35.
PARAMETERS: p_date TYPE sydatum. "last run date
SELECTION-SCREEN END OF LINE.
*>> Messagetype comes from Report RCCLTRANS
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 3(30) text-005.
SELECTION-SCREEN POSITION 35.
PARAMETERS: p_time TYPE syuzeit. "last run time
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK MISCELLANEOUS.
*MOD-006
*>> Messagetype comes from Report RCCLTRANS
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 3(30) text-006.
SELECTION-SCREEN POSITION 35.
PARAMETERS: p_update AS CHECKBOX DEFAULT space.
SELECTION-SCREEN END OF LINE.
*MOD-006
*MOD-006
*>> Messagetype comes from Report RCCLTRANS
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 3(30) text-007.
SELECTION-SCREEN POSITION 32.
SELECT-OPTIONS: s_rundt FOR sy-datum NO-EXTENSION.
SELECTION-SCREEN END OF LINE.
*MOD-006
*MOD-006
*>> Messagetype comes from Report RCCLTRANS
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 3(30) text-008.
SELECTION-SCREEN POSITION 32.
SELECT-OPTIONS: s_runtm FOR sy-uzeit NO-EXTENSION.
SELECTION-SCREEN END OF LINE.
*MOD-006
**MOD-006
*SELECTION-SCREEN BEGIN OF LINE.
*SELECTION-SCREEN COMMENT 3(30) text-009.
*SELECTION-SCREEN POSITION 32.
*SELECT-OPTIONS: s_emat FOR zzzz_xref_data-z_in_value.
*SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK miscellaneous.
**MOD-006
Write selected AUFPL numbers via ranges table to memory ?
PARAMETERS:
ordtomem TYPE cloi_x DEFAULT '' NO-DISPLAY. "X: yes
do not select from MARC, but use ranges tables directly. MK 4.0C
matnr_gl and werks_gl must have the same length.
PARAMETERS: no_sel TYPE c DEFAULT ' ' NO-DISPLAY.
--> Normal selection parameters for ORD comes from the logical db
*& Event START-OF-SELECTION
START-OF-SELECTION.
--> Select the ORD according to the selected
MRP controller, Material, work center and plant
*MOD-006
Validate the last run date & Time
PERFORM validate_last_run_date_time.
*MOD-006
BEGIN OF INSERTION DS001
get the entry of the last program run
select single * for update from ycloidownlprot
where logsys = OPT_SYS and
downloadtype eq C_DOWNL_PROCESS_ORDERS.
if YCLOIDOWNLPROT-IN_PROGRESS eq CLOI_TRUE.
program is already running, do not allow to start again
write : / text-004, YCLOIDOWNLPROT-USERNAME.
exit.
endif.
YCLOIDOWNLPROT-MANDT = SY-MANDT.
YCLOIDOWNLPROT-LOGSYS = OPT_SYS.
YCLOIDOWNLPROT-START_DATE = SY-DATUM.
YCLOIDOWNLPROT-START_TIME = SY-UZEIT.
YCLOIDOWNLPROT-USERNAME = SY-UNAME.
YCLOIDOWNLPROT-DOWNLOADTYPE = C_DOWNL_PROCESS_ORDERS.
YCLOIDOWNLPROT-IN_PROGRESS = CLOI_TRUE.
insert or update entry (dependant if entry already exists)
MODIFY YCLOIDOWNLPROT.
COMMIT WORK.
CLEAR CREATED_MASTERIDOCS_PRO.
EXPORT CREATED_MASTERIDOCS_PRO TO MEMORY ID 'YLOI001'.
END OF INSERTION DS001
BEGIN OF INSERTION DS001
if not sscrfields-ucomm = 'ONLI'. mk zu 4.0
exit.
endif.
if s_dispo is initial and
s_matnr is initial and
s_arbpl is initial and
s_werks is initial.
exit.
endif.
Send only orders with type 40 - process orders
p_autyp = '40'.
END OF INSERTION DS001
*>> Put the ranges tabs back into matwrk list if no selection (NO_SEL)
IF no_sel = cloi_true.
CLEAR t_matwrk_key. REFRESH t_matwrk_key.
LOOP AT s_matnr.
t_matwrk_key-matnr = s_matnr-low.
READ TABLE s_werks INDEX sy-tabix.
t_matwrk_key-werks = s_werks-low.
APPEND t_matwrk_key.
ENDLOOP.
SORT t_matwrk_key BY matnr werks.
DELETE ADJACENT DUPLICATES FROM t_matwrk_key.
delete duplicate duplicates from ranges table. Therfore sort by LOW
(HIGH is not used in this case).
SORT s_matnr BY low.
DELETE ADJACENT DUPLICATES FROM s_matnr.
SORT s_werks BY low.
DELETE ADJACENT DUPLICATES FROM s_werks.
ENDIF.
--> Determine which segments are selected in the message type
PERFORM ord_segments_determine
USING mestyp
CHANGING afpo_x
jstk_x
afab_x
affl_x
afvo_x
kbed_x
jstv_x
resb_x
kbeu_x
afuv_x
is_enhancement
jstu_x.
Export the flags to the memory, because the following subroutine
must not have any parameters !!!
EXPORT affl_x
afvo_x
kbed_x
resb_x
kbeu_x
afuv_x
TO MEMORY ID 'LOI03'.
MK 19980326 enhanced selections on header/operation level
get selection profile for log system from customizing if available
SELECT SINGLE * FROM tcloi9 WHERE logsys = opt_sys.
if entry exists for the logical system
IF sy-subrc = 0.
if an selection profile for the order is entered, use it for selection
IF NOT tcloi9-ord_selid IS INITIAL.
p_selid = tcloi9-ord_selid.
ENDIF.
IF NOT tcloi9-ord_opr_selid IS INITIAL AND
NOT afvo_x IS INITIAL AND NOT affl_x IS INITIAL.
ord_opr_selid = tcloi9-ord_opr_selid.
ENDIF.
ENDIF.
initialize control key table for selections
CALL FUNCTION 'CLOI_STEUS_GET'
EXPORTING
logsys_to_init = opt_sys
IMPORTING
no_entry_for_logsys = no_entry_for_logsys
TABLES
t_steus = t_steus
EXCEPTIONS
logsys_not_initialized = 1
OTHERS = 2.
Write structure information into the memory
perform fill_memory_selobj.
-> import table with already sent orders
IMPORT gt_aufnrdone FROM MEMORY ID 'LOIAUFNRTAB'. "N599845
SORT gt_aufnrdone BY low. "N599845
--> Read header information
GET ioheader.
Check if material/plant combination is selected MK 4.0C
CLEAR check_flg.
IF no_sel = cloi_true.
READ TABLE t_matwrk_key
WITH KEY matnr = ioheader-matnr
werks = ioheader-werks BINARY SEARCH.
IF sy-subrc <> 0.
check_flg = cloi_true.
ENDIF.
ENDIF.
-> check if order was already sent
IF NOT gt_aufnrdone[] IS INITIAL. "N599845
READ TABLE gt_aufnrdone WITH KEY "N599845
low = ioheader-aufnr "N599845
TRANSPORTING NO FIELDS "N599845
BINARY SEARCH. "N599845
IF sy-subrc = 0. "N599845
-> order already sent
check_flg = cloi_true. "N599845
ENDIF. "N599845
ENDIF. "N599845
leave GET routine if check_flg is set.
CHECK check_flg IS INITIAL.
CLEAR t_afpo. REFRESH t_afpo.
CLEAR t_affl. REFRESH t_affl.
MOVE-CORRESPONDING ioheader TO t_afko.
GET ioheader LATE.
BEGIN OF INSERTION DS001
Check whether the process order has been changed since the last
run of the program
clear f_continue.
if the CHANGED date is greater than the last run or initial
IF IOHEADER-AEDAT GT F_OLD_DATE OR
( ioheader-aedat is initial and
ioheader-aezeit is initial ).
if the CHANGED date is initial check the creation date
if ioheader-aedat is initial.
if the creation date is greater than or equal to the date of the last
run, if it is equal the creation time must be later or equal to the
start time of the last run
IF IOHEADER-ERDAT GT F_OLD_DATE OR
( IOHEADER-ERDAT EQ F_OLD_DATE AND
IOHEADER-ERFZEIT GE F_OLD_TIME ).
f_continue = 'X'.
endif.
else.
f_continue = 'X'.
endif.
if the CHANGED dat is not initial check it against the last run
ELSEIF IOHEADER-AEDAT EQ F_OLD_DATE AND
IOHEADER-AEZEIT GE F_OLD_TIME.
f_continue ='X'.
endif.
Aenderung 295/99 Selektions-Aenderung vom 26. August 99
Wenn Auftrag bereits techn. abgeschlossen ist, so darf kein IDOC
erzeugt werden, wenn Auftrag zum löschen vorgemerkt wird.
CONCATENATE 'OR' IOHEADER-AUFNR INTO F_OBJNR.
SELECT SINGLE * FROM JEST
WHERE OBJNR = F_OBJNR
AND STAT = 'I0045'.
IF JEST-INACT EQ SPACE AND SY-SUBRC EQ 0.
SELECT * FROM JCDS WHERE OBJNR EQ F_OBJNR AND
STAT EQ 'I0045' AND
INACT EQ SPACE.
letzte Aenderung des Status TABG wird geprueft Beg. WA 354/99
ENDSELECT.
IF ( F_OLD_DATE GT JCDS-UDATE OR " Beg JB_02
( F_OLD_DATE EQ JCDS-UDATE AND
F_OLD_TIME GT JCDS-UTIME ) ) AND " End JB_02
SY-SUBRC EQ 0.
CLEAR F_CONTINUE.
ENDIF.
ENDIF.
Ende 295/99
check f_continue eq 'X'.
END OF INSERTION DS001
t_afko-t_afpo = t_afpo[].
t_afko-t_jstk = t_jstk[].
t_afko-t_affl = t_affl[].
t_afko-t_afab = t_afab[].
APPEND t_afko.
IF jstk_x = cloi_x.
t_objnr-objnr = ioheader-objnr.
APPEND t_objnr.
ENDIF.
*---> Remember the orders that are already selected for the global
selection parameters
IF ordtomem = cloi_x. "write order numbers to memory
t_aufnr_range_done-sign = 'I'.
t_aufnr_range_done-option = 'NE'.
t_aufnr_range_done-low = ioheader-aufpl.
APPEND t_aufnr_range_done.
ENDIF.
*---> Remember the orders internal/external keys for AFAB (relationship)
IF afab_x = cloi_x.
MOVE-CORRESPONDING ioheader TO t_aufpl_aufnr.
APPEND t_aufpl_aufnr.
ENDIF.
check afpo_x = cloi_x.
GET ioitem.
BEGIN OF INSERTION DS001
Check whether the process order has been changed since the last
run of the program
CLEAR F_CONTINUE.
if the CHANGED date is greater than the last run or initial
IF IOHEADER-AEDAT GT F_OLD_DATE OR
( ioheader-aedat is initial and
ioheader-aezeit is initial ).
if the CHANGED date is initial check the creation date
if ioheader-aedat is initial.
if the creation date is greater than or equal to the date of the last
run, if it is equal the creation time must be later or equal to the
start time of the last run
IF IOHEADER-ERDAT GT F_OLD_DATE OR
( IOHEADER-ERDAT EQ F_OLD_DATE AND
IOHEADER-ERFZEIT GE F_OLD_TIME ).
f_continue = 'X'.
endif.
else.
f_continue = 'X'.
endif.
if the CHANGED date is not initial check it against the last run
ELSEIF IOHEADER-AEDAT EQ F_OLD_DATE AND
IOHEADER-AEZEIT GE F_OLD_TIME.
f_continue ='X'.
endif.
Aenderung 295/99 Selektions-Aenderung vom 26. August 99
Wenn Auftrag bereits techn. abgeschlossen ist, so darf kein IDOC
erzeugt werden, wenn Auftrag zum löschen vorgemerkt wird.
CONCATENATE 'OR' IOHEADER-AUFNR INTO F_OBJNR.
SELECT SINGLE * FROM JEST
WHERE OBJNR = F_OBJNR
AND STAT = 'I0045'.
IF JEST-INACT EQ SPACE AND SY-SUBRC EQ 0.
SELECT * FROM JCDS WHERE OBJNR EQ F_OBJNR AND
STAT EQ 'I0045' AND
INACT EQ SPACE.
letzte Aenderung des Status TABG wird geprueft
ENDSELECT.
IF ( F_OLD_DATE GT JCDS-UDATE OR " Beg JB_02
( F_OLD_DATE EQ JCDS-UDATE AND
F_OLD_TIME GT JCDS-UTIME ) ) AND " End JB_02
SY-SUBRC EQ 0.
CLEAR F_CONTINUE.
ENDIF.
ENDIF.
Ende 295/99
check f_continue eq 'X'.
END OF INSERTION DS001
IF afpo_x = cloi_x.
MOVE-CORRESPONDING ioitem TO t_afpo.
APPEND t_afpo.
ENDIF.
Put matnr and ltrmi in a help structure, which later goes to t_afpo
IF ioitem-posnr = '0001'.
MOVE-CORRESPONDING ioitem TO help_afpo.
APPEND help_afpo.
put PSP element (internal key) into order header. Unique for positions
IF t_afko-pspel IS INITIAL.
t_afko-pspel = ioitem-projn.
ENDIF.
ENDIF.
CHECK affl_x = cloi_x.
GET iosequen.
CLEAR t_afvo. REFRESH t_afvo.
MOVE-CORRESPONDING iosequen TO t_affl.
GET iosequen LATE.
t_affl-t_afvo = t_afvo[].
APPEND t_affl.
CHECK afvo_x = cloi_x.
GET iooper.
CLEAR t_kbed. REFRESH t_kbed.
CLEAR t_afuv. REFRESH t_afuv.
CLEAR t_resb. REFRESH t_resb.
MOVE-CORRESPONDING iooper TO t_afvo.
"Temporary storing of operation information if for a phase
"the corresponding operation has is needed
MOVE-CORRESPONDING iooper TO t_aufpl_aplzl_vornr.
APPEND t_aufpl_aplzl_vornr.
check, if selection profile (if exists) for the operation is ok
IF NOT ord_opr_selid IS INITIAL.
CALL FUNCTION 'STATUS_CHECK_BY_SELSCHEM'
EXPORTING
objnr = iooper-objnr
selid = ord_opr_selid
IMPORTING
fullfill = status_ok
EXCEPTIONS
no_stat_tab = 1
no_stat_scheme = 2
OTHERS = 3.
IF sy-subrc <> 0.
status_ok = cloi_x.
ENDIF.
ELSE.
status_ok = cloi_x.
ENDIF.
check if control key (STEUS) should not be selected.
control_key_ok = cloi_x.
IF no_entry_for_logsys IS INITIAL.
READ TABLE t_steus WITH KEY
steus = iooper-steus BINARY SEARCH.
IF sy-subrc <> 0.
CLEAR control_key_ok.
ENDIF.
ENDIF.
CHECK NOT status_ok IS INITIAL.
CHECK NOT control_key_ok IS INITIAL.
GET iooper LATE.
t_afvo-t_kbed = t_kbed[].
t_afvo-t_afuv = t_afuv[].
t_afvo-t_resb = t_resb[].
APPEND t_afvo.
IF jstv_x = cloi_x.
t_objnr-objnr = iooper-objnr.
APPEND t_objnr.
ENDIF.
CHECK kbed_x = cloi_x.
GET ioopcap.
MOVE-CORRESPONDING ioopcap TO t_kbed.
APPEND t_kbed.
CHECK resb_x = cloi_x.
GET ioopcomp.
do not transfer RESB entries with deletion flag
CHECK ioopcomp-xloek IS INITIAL.
MOVE-CORRESPONDING ioopcomp TO t_resb.
APPEND t_resb.
CHECK afuv_x = cloi_x.
GET iosoper.
CLEAR t_kbeu. REFRESH t_kbeu.
MOVE-CORRESPONDING iosoper TO t_afuv.
check if control key (STEUS) should not be selected.
control_key_ok = cloi_x.
IF no_entry_for_logsys IS INITIAL.
READ TABLE t_steus WITH KEY
steus = iooper-steus BINARY SEARCH.
IF sy-subrc <> 0.
CLEAR control_key_ok.
ENDIF.
ENDIF.
CHECK NOT control_key_ok IS INITIAL.
GET iosoper LATE.
t_afuv-t_kbeu = t_kbeu[].
APPEND t_afuv.
IF jstv_x = cloi_x.
t_objnr-objnr = iosoper-objnr.
APPEND t_objnr.
ENDIF.
CHECK kbeu_x = cloi_x.
GET iosocap.
MOVE-CORRESPONDING iosocap TO t_kbeu.
APPEND t_kbeu.
*& Event END-OF-SELECTION
END-OF-SELECTION.
*MOD-006
DATA: itab_matnr TYPE zzzz_xref_data OCCURS 0.
DATA: l_wa_matnr TYPE zzzz_xref_data.
DATA: l_wa_matnr_value TYPE zzzz_xref_data-z_in_value.
DATA: l_wa_afko TYPE cloi_afko_struct.
SELECT *
FROM zzzz_xref_data
APPENDING TABLE itab_matnr
WHERE trans_id = 'ZELCUSMATLOOKUP' AND
( z_in_value IN s_matnr OR
z_out_value IN s_matnr ).
IF sy-subrc = 0.
LOOP AT ITAB_MATNR INTO L_WA_MATNR.
L_WA_MATNR_VALUE = L_WA_MATNR-z_OUT_VALUE.
S_MATNR-LOW = L_WA_MATNR_VALUE.
S_MATNR-SIGN = 'I'.
S_MATNR-OPTION = 'EQ'.
APPEND S_MATNR.
ENDLOOP.
DELETE itab_matnr WHERE NOT in_value IN s_emat.
SORT itab_matnr BY out_value.
ENDIF.
CLEAR: l_wa_matnr.
**MOD-010
Data which is not in the material lookup table but in the T_AFKO.
LOOP AT t_afko INTO l_wa_afko.
READ TABLE S_MATNR WITH KEY LOW = L_WA_AFKO-MATNR BINARY SEARCH.
READ TABLE itab_matnr INTO l_wa_matnr
WITH KEY z_out_value = l_wa_afko-matnr BINARY SEARCH.
IF sy-subrc NE 0.
l_wa_afko-rgekz = 'X'.
MODIFY t_afko FROM l_wa_afko TRANSPORTING rgekz.
ENDIF.
IF NOT P_DATE IS INITIAL.
IF T_AFKO-GSTRP < p_date OR
( T_AFKO-GSTRP = p_date AND
T_AFKO-GSUZP > p_time ).
L_WA_AFKO-RGEKZ = 'X'.
MODIFY T_AFKO FROM L_WA_AFKO TRANSPORTING RGEKZ.
ENDIF.
ENDIF.
ENDLOOP.
Delete Data which is not in the material lookup
table but in the T_AFKO.
DELETE t_afko WHERE rgekz = 'X'.
*MOD-010
*MOD-006
BEGIN OF INSERTION DS001
DATA: l_wa_itab_date TYPE ty_date.
Check whether the process order has been changed since the last
run of the program
CLEAR f_continue.
IF NOT t_afko IS INITIAL.
SELECT aufnr aedat aezeit erdat erfzeit loekz
INTO TABLE itab_date
FROM aufk
FOR ALL ENTRIES IN t_afko
WHERE aufnr = t_afko-aufnr.
IF sy-subrc = 0.
IF NOT p_date IS INITIAL.
CLEAR: itab_date.
Check whether the process order has been changed since the last
run of the program
LOOP AT itab_date INTO l_wa_itab_date.
if the CHANGED date is greater than the last run or initial
IF l_wa_itab_date-aedat GT p_date OR
( l_wa_itab_date-aedat IS INITIAL AND
l_wa_itab_date-aezeit IS INITIAL ).
if the CHANGED date is initial check the creation date
IF l_wa_itab_date-aedat IS INITIAL.
if the creation date is greater than or equal to the date of the last
run, if it is equal the creation time must be later or equal to the
start time of the last run
IF l_wa_itab_date-erdat GT p_date OR
( l_wa_itab_date-erdat EQ p_date AND
l_wa_itab_date-erfzeit GE p_time ).
f_continue = 'X'.
ELSE.
l_wa_itab_date-indicator = 'X'.
MODIFY itab_date FROM l_wa_itab_date TRANSPORTING indicator.
ENDIF.
ELSE.
f_continue = 'X'.
ENDIF.
if the CHANGED dat is not initial check it against the last run
ELSEIF l_wa_itab_date-aedat EQ p_date AND
l_wa_itab_date-aezeit GE p_time.
f_continue ='X'.
ELSE.
l_wa_itab_date-indicator = 'X'.
MODIFY itab_date FROM l_wa_itab_date TRANSPORTING indicator.
ENDIF.
ENDLOOP.
*MOD-006
ELSE.
CLEAR: ITAB_DATE.
LOOP AT ITAB_DATE INTO L_WA_ITAB_DATE.
if the CHANGED date is greater than the last run or initial
IF L_WA_ITAB_DATE-AEDAT GT P_RUNDT OR
( L_WA_ITAB_DATE-aedat is initial and
L_WA_ITAB_DATE-aezeit is initial ).
if the CHANGED date is initial check the creation date
if l_wa_itab_date-aedat is initial.
if the creation date is greater than or equal to the date of the last
run, if it is equal the creation time must be later or equal to the
start time of the last run
IF L_WA_ITAB_DATE-ERDAT GT P_RUNDT OR
( L_WA_ITAB_DATE-ERDAT EQ P_RUNDT AND
L_WA_ITAB_DATE-ERFZEIT GE S_RUNTM-LOW OR
L_WA_ITAB_DATE-ERFZEIT LE S_RUNTM-HIGH ).
f_continue = 'X'.
else.
l_wa_itab_date-indicator = 'X'.
MODIFY ITAB_DATE FROM L_WA_ITAB_DATE
TRANSPORTING INDICATOR.
endif.
else.
f_continue = 'X'.
endif.
if the CHANGED dat is not initial check it against the last run
ELSEIF L_WA_ITAB_DATE-AEDAT EQ P_RUNDT AND
L_WA_ITAB_DATE-AEZEIT GE S_RUNTM-LOW.
f_continue ='X'.
ELSE.
l_wa_itab_date-indicator = 'X'.
MODIFY ITAB_DATE FROM L_WA_ITAB_DATE
TRANSPORTING INDICATOR.
endif.
ENDLOOP.
*MOD-006
ENDIF.
ENDIF.
ENDIF.
DELETE ITAB_DATE WHERE INDICATOR = 'X'.
*MOD-006
CLEAR: itab_date.
IF s_rundt-high IS INITIAL AND NOT s_rundt IS INITIAL.
s_rundt-high = sy-datum.
ENDIF.
LOOP AT itab_date INTO l_wa_itab_date.
IF NOT s_rundt IS INITIAL.
if the CHANGED date is greater than the last run or initial
IF ( l_wa_itab_date-aedat IS INITIAL AND
l_wa_itab_date-aezeit IS INITIAL ).
if the CHANGED date is initial check the creation date
IF l_wa_itab_date-aedat IS INITIAL.
if the creation date is greater than or equal to the date of the last
run, if it is equal the creation time must be later or equal to the
start time of the last run
IF ( l_wa_itab_date-erdat GT s_rundt-low AND
l_wa_itab_date-erfzeit GT s_runtm-low ) AND
( l_wa_itab_date-erdat LT s_rundt-high AND
l_wa_itab_date-erfzeit LT s_runtm-high ).
f_continue = 'X'.
ELSE.
l_wa_itab_date-indicator = 'X'.
MODIFY itab_date FROM l_wa_itab_date
TRANSPORTING indicator.
ENDIF.
ELSE.
f_continue = 'X'.
ENDIF.
if the CHANGED dat is not initial check it against the last run
ELSEIF ( l_wa_itab_date-aedat GE s_rundt-low AND
l_wa_itab_date-aezeit GE s_runtm-low ) AND
( l_wa_itab_date-aedat LE s_rundt-high AND
l_wa_itab_date-aezeit LE s_runtm-high ).
f_continue ='X'.
ELSE.
l_wa_itab_date-indicator = 'X'.
MODIFY itab_date FROM l_wa_itab_date
TRANSPORTING indicator.
ENDIF.
ENDIF.
ENDLOOP.
DELETE itab_date WHERE indicator = 'X'.
*MOD-006
**MOD-006
LOOP AT t_afko INTO l_wa_afko.
READ TABLE itab_date INTO l_wa_itab_date
WITH KEY aufnr = l_wa_afko-aufnr BINARY SEARCH.
IF sy-subrc NE 0.
l_wa_afko-rgekz = 'X'.
MODIFY t_afko FROM l_wa_afko TRANSPORTING rgekz.
ENDIF.
ENDLOOP.
DELETE t_afko WHERE rgekz = 'X'.
**MOD-006
-> initialize logical data base to reduce memory consumption
PERFORM ldb_process_init(sapdbioc)
CHANGING
lv_subrc.
--> add information to the order structure that is not
selected via logical database:
- if AFVO-entry is a phase (phflg) --> fill field for
corresponding operation number (PVZNR)
The internal node number (aplzl) of the corresponding operation
is in field PVZKN of the phase
- relationship information: E1AFABL
especially: select external numbers for the used
internal numbers in the table AFAB
- status information of the order header: E1JSTKL
- status information of the operation: E1JSTVL
--> Put matnr and ltrmi in the table t_afko
SORT t_afko BY aufnr.
LOOP AT help_afpo.
READ TABLE t_afko WITH KEY aufnr = help_afpo-aufnr
ASSIGNING -gltri = help_afpo-ltrmi.
ENDIF.
ENDLOOP.
--> Select entries for order and operation status
IF NOT t_objnr[] IS INITIAL.
SELECT objnr stat FROM jest INTO TABLE t_jest2
FOR ALL ENTRIES IN t_objnr
WHERE objnr = t_objnr-objnr
AND inact <> 'X'.
ENDIF.
--> Select entries for relationships from afab for all orders
into table t_afab_tmp
SORT t_aufpl_aplzl_vornr BY aufpl aplzl.
IF afab_x = cloi_x AND NOT t_aufpl_aufnr[] IS INITIAL.
-> select afab data
SELECT * FROM afab INTO TABLE t_afab_tmp
FOR ALL ENTRIES IN t_aufpl_aufnr
WHERE aufpl_vor = t_aufpl_aufnr-aufpl.
SELECT * FROM afab APPENDING TABLE t_afab_tmp
FOR ALL ENTRIES IN t_aufpl_aufnr
WHERE aufpl_nch = t_aufpl_aufnr-aufpl.
SORT t_afab_tmp
BY aufpl_vor aplzl_vor aufpl_nch aplzl_nch aobar mimax.
DELETE ADJACENT DUPLICATES FROM t_afab_tmp
COMPARING aufpl_vor aplzl_vor aufpl_nch aplzl_nch aobar mimax.
-> read external order numbers out of data base
CLEAR t_aufpl. REFRESH t_aufpl.
LOOP AT t_afab_tmp ASSIGNING -aufpl_nch.
COLLECT t_aufpl.
ENDLOOP.
CLEAR t_aufpl_aufnr. REFRESH t_aufpl_aufnr.
IF NOT t_aufpl[] IS INITIAL.
SELECT aufpl aufnr FROM afko INTO TABLE t_aufpl_aufnr
FOR ALL ENTRIES IN t_aufpl
WHERE aufpl = t_aufpl-aufpl.
SORT t_aufpl_aufnr BY aufpl.
ENDIF.
-> add order numbers to afab data
LOOP AT t_afab_tmp ASSIGNING -aufnr_nch = t_aufpl_aufnr-aufnr.
ENDIF.
ENDLOOP.
-> read operation numbers out of data base
CLEAR t_aufpl_aplzl. REFRESH t_aufpl_aplzl.
LOOP AT t_afab_tmp ASSIGNING -aplzl_nch.
COLLECT t_aufpl_aplzl.
ENDLOOP.
IF NOT t_aufpl_aplzl[] IS INITIAL.
SELECT aufpl aplzl vornr FROM afvc
APPENDING TABLE t_aufpl_aplzl_vornr
FOR ALL ENTRIES IN t_aufpl_aplzl
WHERE aufpl = t_aufpl_aplzl-aufpl
AND aplzl = t_aufpl_aplzl-aplzl.
SORT t_aufpl_aplzl_vornr BY aufpl aplzl.
ENDIF.
-> add operation numbers to afab data
LOOP AT t_afab_tmp ASSIGNING -vornr_nch = t_aufpl_aplzl_vornr-vornr.
ENDIF.
ENDLOOP.
ENDIF. "afab_x
--> fill AFAB (relationship information) and status information
SORT t_aufpl_aufnr BY aufnr.
LOOP AT t_afko ASSIGNING .
-> fill order head status information
IF jstk_x = cloi_x.
CLEAR t_jstk. REFRESH t_jstk.
LOOP AT t_jest2 INTO wa_tjest2 WHERE objnr = -t_jstk = t_jstk[].
ENDIF.
-> fill afab information
IF afab_x = cloi_x.
CLEAR t_aufpl_aufnr.
READ TABLE t_aufpl_aufnr WITH KEY
aufnr = -t_afab = t_afab[].
ENDIF.
-> fill operation and suboperation status information
IF jstv_x = cloi_x OR afvo_x = cloi_x.
LOOP AT .
-> read status information of suboperation
IF jstu_x = cloi_x.
LOOP AT -t_jstu = t_jstu[].
ENDLOOP.
ENDIF.
-> read status information of operation
IF jstv_x = cloi_x.
CLEAR t_jstv. REFRESH t_jstv.
LOOP AT t_jest2 INTO wa_tjest2 WHERE objnr = -t_jstv = t_jstv[].
ENDIF.
-> Read operation for a phase
IF NOT -pvznr = t_aufpl_aplzl_vornr-vornr.
ENDIF.
ENDIF.
ENDLOOP.
ENDLOOP.
ENDIF.
-> collect order numbers
CLEAR wa_aufnrdone.
wa_aufnrdone-low = -aufnr.
APPEND wa_aufnrdone TO lt_aufnrdone.
ENDLOOP.
-> append collected order numbers to global table
APPEND LINES OF lt_aufnrdone TO gt_aufnrdone.
EXPORT gt_aufnrdone TO MEMORY ID 'LOIAUFNRTAB'.
-> free large tables
CLEAR t_jest2. REFRESH t_jest2.
CLEAR t_afab_tmp. REFRESH t_afab_tmp.
CLEAR t_aufpl. REFRESH t_aufpl.
CLEAR t_aufpl_aufnr. REFRESH t_aufpl_aufnr.
CLEAR t_aufpl_aplzl. REFRESH t_aufpl_aplzl.
CLEAR t_aufpl_aplzl_vornr. REFRESH t_aufpl_aplzl_vornr.
-> create idocs
CALL FUNCTION 'CLOI_MASTERIDOC_CREATE_LOIPRO'
EXPORTING
opt_sys = opt_sys
message_type = mestyp
TABLES
order_data = t_afko
EXCEPTIONS
OTHERS = 1.
-> export already selected order numbers via ranges tab to memory
EXPORT t_aufnr_range_done TO MEMORY ID 'LOI002'.
**MOD-006
IMPORT created_masteridocs_pro FROM MEMORY ID 'YLOI001'.
ycloidownlprot-end_date = sy-datum.
ycloidownlprot-end_time = sy-uzeit.
ycloidownlprot-idocs_selected = created_masteridocs_pro.
ycloidownlprot-in_progress = cloi_false.
insert or update entry (dependant if entry already exists)
MODIFY ycloidownlprot.
COMMIT WORK.
MESSAGE i967(z001) WITH created_masteridocs_pro.
**MOD-006
Update last run date and time
IF p_update = 'X'.
PERFORM update_last_run.
ELSE.
MESSAGE s000 WITH text-022.
"Last Run Date and Last Run Time not updated
LEAVE LIST-PROCESSING.
ENDIF.
INCLUDE rcordf01.
*& Form validate_last_run_date_time
text
--> p1 text
<-- p2 text
*FORM validate_last_run_date_time.
IF p_date IS INITIAL OR
p_time IS INITIAL.
IF sy-batch IS INITIAL.
MESSAGE s000 WITH text-017.
"Last Run date & Last Run Time can not be blank
LEAVE LIST-PROCESSING.
ELSE.
MESSAGE e000 WITH text-017.
"Last Run date & Last Run Time can not be blank
ENDIF.
ENDIF.
*ENDFORM. " validate_last_run_date_time
*& Form update_last_run
text
--> p1 text
<-- p2 text
FORM update_last_run.
CONSTANTS:
l_c_name TYPE rvari_vnam VALUE 'Z_PROC_DATE',
l_c_name1 TYPE rvari_vnam VALUE 'Z_PROC_TIME',
l_c_type TYPE rsscr_kind VALUE 'P',
l_c_numb TYPE tvarv_numb VALUE '0000'.
Update last run date
UPDATE tvarv SET low = sy-datum
WHERE name = l_c_name AND
type = l_c_type AND
numb = l_c_numb.
IF sy-subrc = 0.
COMMIT WORK.
ELSE.
ROLLBACK WORK.
g_run_date = text-015. "#EC
"Updation of TVARV table failed for ZLAST_RUN_DATE. Update manually
ENDIF.
Update last run time
UPDATE tvarv SET low = sy-uzeit
WHERE name = l_c_name1 AND
type = l_c_type AND
numb = l_c_numb.
IF sy-subrc = 0.
COMMIT WORK.
ELSE.
ROLLBACK WORK.
g_run_time = text-016. "#EC
"Updation of TVARV table failed for ZLAST_RUN_TIME. Update manually
ENDIF.
ENDFORM. " update_last_run -
Batch Management and Class and Characteristics Assignment
Dear Team,
Recently We Configured Batch Management in SD, and Batch is determining in Sales order, delivery and Billing. Its working fine.
Issue-1: While posting stock (Quality server) with moment type 561, production date entered manually but system not calculating Expiry date automatically, i maintained Total shelf Time and Min. Rem. Shelf time.
Issue-2: In sales order I want determine batch as FIFO Method, in present system it will consider LIFO method,
I come to know to over come this Issues i need to maintain some Characteristics and Class, Please help me out in creating of characteristics and class and other process,
Thanking you in advance,
Sudheer.UDear Team,
Recently We Configured Batch Management in SD, and Batch is determining in Sales order, delivery and Billing. Its working fine.
Issue-1: While posting stock (Quality server) with moment type 561, production date entered manually but system not calculating Expiry date automatically, i maintained Total shelf Time and Min. Rem. Shelf time.
Issue-2: In sales order I want determine batch as FIFO Method, in present system it will consider LIFO method,
I come to know to over come this Issues i need to maintain some Characteristics and Class, Please help me out in creating of characteristics and class and other process,
Thanking you in advance,
Sudheer.U -
Problems using different tables for base class and derived class
I have a class named SuperProject and another class Project derived from
it. If I let SchemaTool generate the tables without specifying a "table"
extension, I get a single TABLE with all the columns from both classes and
everything works fine. But if I specify a "table" for the derived class,
SchemaTool generates the derived class with just one column (corresponds
to the attribute in derived class). Also it causes problems in using the
Project class in collection attributes.
JDO file:
<jdo>
<package name="jdo">
<class name="Project" identity-type="application"
persistence-capable-superclass="SuperProject">
<extension vendor-name="kodo" key="table" value="PROJECT"/>
</class>
<class name="SuperProject" identity-type="application"
objectid-class="ProjectId">
<field name="id" primary-key="true"/>
</class>
</package>
</jdo>
java classes:
public class Project extends SuperProject
String projectSpecific
public class SuperProject
BigDecimal id;
String name;
tables generated by SchemaTool:
TABLE SUPERPROJECTSX (IDX, JDOCLASSX, JDOLOCKX, NAMEX);
TABLE PROJECT(PROJECTSPECIFICX)
Thanks,
Justine ThomasJustine,
This will be resolved in 2.3.4, to be released later this evening.
-Patrick
In article <aofo2q$mih$[email protected]>, Justine Thomas wrote:
I have a class named SuperProject and another class Project derived from
it. If I let SchemaTool generate the tables without specifying a "table"
extension, I get a single TABLE with all the columns from both classes and
everything works fine. But if I specify a "table" for the derived class,
SchemaTool generates the derived class with just one column (corresponds
to the attribute in derived class). Also it causes problems in using the
Project class in collection attributes.
JDO file:
<jdo>
<package name="jdo">
<class name="Project" identity-type="application"
persistence-capable-superclass="SuperProject">
<extension vendor-name="kodo" key="table" value="PROJECT"/>
</class>
<class name="SuperProject" identity-type="application"
objectid-class="ProjectId">
<field name="id" primary-key="true"/>
</class>
</package>
</jdo>
java classes:
public class Project extends SuperProject
String projectSpecific
public class SuperProject
BigDecimal id;
String name;
tables generated by SchemaTool:
TABLE SUPERPROJECTSX (IDX, JDOCLASSX, JDOLOCKX, NAMEX);
TABLE PROJECT(PROJECTSPECIFICX)
Thanks,
Justine Thomas
Patrick Linskey [email protected]
SolarMetric Inc. http://www.solarmetric.com
Maybe you are looking for
-
My XP Pro machine will no longer see my Time capsule.
Just before Christmas, I switched from Embarq DSL to Cox Cable. When I was with Embarq, I had a static IP address but now that I am no longer with Embarq, I no longer have a static IP address. I am mentioning this out of completeness and (as far as I
-
I have installed a PCI audio card and its driver. While booting I am getting following error pcipsy: WARNING: pcipsy0: ino 23 is invalid pcipsy: WARNING: pcipsy0: ino 10 is invalid Can any one tell me what is causing this pci error? Thanks
-
How to change language in photoshop CC 2014 with rksskogo into English?
how to change language in photoshop CC 2014 with rksskogo into English?
-
A lot of work lost by electricity cut-off - URGENT
Hello I was working simultaously on two complex documents. After typing for one hour the electricity went off and of course nothing was saved ! Is there a way to recover my work ? Temporary files or anything that could help ? Thank you for your help,
-
I have a org chart image with a white background- it was originally created in MS Publisher. I brought it into PS CS4 as a jpeg I wanted to cut out the chart and remove the background so I can use over a watermark in a report I'm working on in InDesi