Main Work Centers
Hi,
Would like to know what exactly main work centers are ? How are they different from regular (operational) work centers ?
Is any configuration different for creating main work centers as compared to work centers ?
What is the hierarchy 'option' in the work center creation used for ? Is there a hierarchical relationship between Main work centers and work centers as far as comfiguration is concerned .
Appreciate any help.
Thanks,
Kingfischer
Dear King Fischer,
There are types & cat if we need to sepatre work centres in the customerisation if it needed normally it does not need in PM.
But in large detail planning etc. It may be used by business.
Following are the extracts for difference as per SAP.
The Main Work Center
The main work center must be entered in the order header, whereupon its master data is copied into the order as a default.
During internal processing, the main work center is also used as a default for the performing work center.
In addition to the main work center, you can create a specific employee, who has been represented in the Human Resources (HR) component with their own master record, as Person responsible.
The Performing Work Center
In addition to the main work center, you can create a specific employee, who has been represented in the Human Resources (HR) component with their own master record, as Person responsible. You can also assign other employees to an operation in the Requirement assignment.
The performing work center is managed in the operation data for the order. It is proposed as a performing work center for the operations in the order. Since capacities are assigned to the performing work center and costs assigned using the activity type, the performing work center is required primarily for capacity planning, scheduling and cost determination.
It is also possible to create operations without entering a performing work center. A control key, which is not linked to a cost center or an activity type, must then be assigned to these operations. It may be that the operations are simply used for documentation purposes, for example, operations that only contain safety instructions or specifications for the production/resources tools to be used. Operations without a specified performing work center are also used in external processing.
The Work Center as Production Machine
The work center as production machine is managed in the location data for the technical object of an order. It is only entered if the technical object at which maintenance work should be executed is a machine in Production.
Since machine capacities are assigned to the work center as production machines, the work center as production machine is required primarily for capacity planning of the machine, for example, non-operational periods for the machine must be planned as effectively as possible.
http://help.sap.com/erp2005_ehp_03/helpdata/EN/d7/45f364b10811d2a5e30060087a7a74/frameset.htm
Ramesh
Similar Messages
-
Main work center for notification
which table stores main work centers for service notifications stored and how do i link work center table with notification table
Hi,
<b>CRHD - Work Center Header
QMEL - Quality Notification [/b
U can link this 2 table with the field QMEL-ARBPL = CRHD-ARBPL
Reward Points if it is Useful.
Thanks,
Manjunath MS -
Custom work centers are not visible in the production tenant UI after solution is deployed
Hi Experts,
We have deployed the solution into the production tenant. The solution is deployed successfully. But the custom business option(BAC) element which we have created is not part of proejct scoping.
We have created a new change project in production and added the custom business option to the project.
Under this custom business option we have fine tuning activity which is having all the custom configurable code lists.
All these configurable code list are not visible as views. these are already assigned to WCF of one of our custom BO under asssinged objects.
These configurable code lists are displaying like below.
Because of this i am not able to close this fine tuning activity and i am not able merge the change project into Main project.
Once after merging the change project into main project, I came to know the all the custom work centers will be visible. I am correct here?
Can anybody know how to resolve this issue. Please let us know..!
Thanks,
ManiHi Mani,
this issue sometimes occurs. Please create an incident as soon as possible. Sometimes the BCSets / BCViews need to be regenerated in the backend. Support can correct this. Mention that you did this using the SAP Cloud Applications Studio.
In general please ask such question here: SAP Cloud Applications Studio
Cheers,
Jens -
Defining CS Work Centers - HR module is not in scope.
Hi Guys,
My client is not using HR module so Technician's personal number assignment to work center is not possible.
So what I have suggested as a work around solution is to create work center with the Technicians Name in the work center description field itself so they know by work center's description which technician is being assigned to a service order.
Say for example Work Center = ZPTech1 = Allan Miller. What do you guy's think of this solution?
Another issue is the client have one service department and this department provides different types of services. For example Inhouse repair, Onsite Service etc.
So they have teams of technicians. One team for Inhouse Repair and another team of technicians for Onsite services. However, there are cases where the technician who belongs to Inhouse repair can also sometimes perform onsite service.
So, since HR module is not in scope and technician's personnel numbers cannot be used to assign to work centers... hence my suggestion was to create work centers as technicians using their names in description field.
However, the problem comes when defining hierarchy.
Say If I create one main work center ZServ = Service Department
Then under ZPServ, if I create two team work centers as Team1 (for Inhouse Repair Team) and Team2 (Onsite Service Team). Then I assign 3 technician work centers viz., TechA, TechB and TechC to team work center Team1 and work centers TechD, TechE and TechF to Team work center Team2 using heirarchy relationship. I think so far it will be fine.
However, say TechA works both in Inhouse repairs and also in Onsite Service. Then I need to assign this technician under both team work centers Team1 and Team2 right? But as far as I know, you cannot have two superior work centers for a particular work center.
So, in this case, what is the best solution?
Instead of creating team workcenters as Team1 and Team2, shall I just create one main work center for Service Department as ZServ then create individual workcenters for each technician? without having a heirarchy structure?
Or say for example if Team1 has cost center 1000 and team2 has cost center 2000, then shall I create two workcenters for the same technician TechA with description as TechA-1000 and TechA-2000. (Then if I have two different workcenters for same technician, with his name and costcenter in the description field then i can assign each workcenter under team1 and team2.
Sorry for the lengthy message... However, I needed to explain the scenario and limitations properly in order to give you a full picture so as to get correct and best suggestions and advice.
Thank you very much for your time and I would really appreciate your inputs.
Best regards,
ARHi Suresh,
Answer to first part of your question is: Yes, we are considering employees as vendors and configuring it under Employees (ZEMP) Vendor Account Group.
As you have suggested about Internal Order for employees, somebody else had suggested me with the same.
But I was not convinced why I should go ahead and define internal order for each employees under the Internal Order Type: Employees.
Now could you help me in understanding as to why Internal Orders for each employee, I mean could you tell me the logic behind this, so that I would be in a position to answer if someone asks me.
If there is anymore information / documentation, could you plz forward the same to my mail id, which is: [email protected]
Thank you for your time in replying.
Regards
Sandhya kiran. -
Altenate work centers in production order
Hi, we have 2 different work cneters and any one work center can be selected in the prod order when we process. please advise how to create a routing that will allow to enter 2 work centers for one operation (alternate to each other) so that when we craete order any one can be selected by the opeartor. please advise.
Hi,
In CA02 branch to the sequence view and create an alternative sequence, attach the sequence to the main sequence strating and ending at the operation you mentioned. Enter one work center to the operation in main sequence, second work center in the alternative sequence. Users may confirm based on the situation by entering the sequence number and operation in confirmation.
Regards. -
Difference in Main work centre and Operation workcentre
Hello PM Gurus,
In CS order, we have two work centres. One at header level called as Main work centre and another at operation level.
Why do we have two work centres. The one at operation level itself should have been enough.
There is a main work centre at functional location too ( Organisation tab). So what is the connection if we use this functional location as the reference while creating a CS order.
Please reply soon.
Cheers
SunnyHi Sunny,
The work center at haeder i.e., Main Work Center is the reponsible work center(say a department). It means it takes the reponsibility of the whole job mentioned in that work order(or job given by production dept.). Now, assume , it further distributes the whole work to its own sub-dept or different work centers as per nature of job. Say, electrical related work to elec work centers etc., by ,means of assigning to different operations.
The Main work center's cost center will be copied as responsible cost center in Additional data TAB of the order.Now thus you see commercially the responsibility of doing the job lies with the responsible cost center (or say Main work center).
Hope it is clear.
Regards,
Rajesh -
Sir,
In equipment
Location Tab work center is there
and also in organisation tab main work center is there
what is the difference between there 2 work centers.
and which work center we need to assign cost center.
in order
Main work center
work center/ plant
what is the difference between these two
and which work center we need to assign cost center.
Sai MeghanaHi,
Work center in location tab is for integration with PP.
In PP module equipment is an work center for them and to have integration the same work center has to be included there.
Work center in organization tab is responsible for maintenance activities for that equipment.
The same work would be copied to order to take up maintenance activities mentioned in the operation tab in order.
What ever the cost center maintained in organization tab is cost receiver of the order by default.
Regards,
Sudhakar -
Dear experts,
I face a problem that system get main work center from equipment master data as a default main work center in maintenance plan when creating maintenance plan. however, if main work center in equipment is changed later, the change will not synchronize to related maintenance plan. if work order is generated from maintenance plan, main work order in order is defaulted from maintenance plan instead of updated work center in equipment.
another problem is that, for those orders generated by maintenance plan, the work centers in operations is defaulted from task list in maintenance plan. in most case, work center in task list is dummy. Actually the work is done by work center in equipment master data.
My expectation is how to auto replace the main work center and work center of operations in work order with the one in equipment master data if order is generated by maintenance plan? is there any standard configuration or enhancement/BADi that can help with this requirement?
thanks!
WesleyWesley,
Sorry - development is the only way.
Another option is to create a batch program that runs before your IP30 run(s) and updates any maintenance items and task lists with the correct work centres.
PeteA -
Dear All,
Can you please explain,
How to create main work centre & work center.
How can we differentiate the two after creation.
What is the use of work center hierarchy.
ARHi Amit,
About Work Center : Work Center is a person, a group of persons, a machine or a group of machines.
Just understand the above lines. this is the basic defination of work center independent from any PP or PM work center.
Now, if work center is created to perform Maintenance tasks with * work center category 0005 * those work centers are called maintenance work centers.
( Generally persons or group of persons are created as work center in PM)
If work center is created to perform Production tasks with * work center category 0002 * those work centers are called PP work centers.
(Generally Machines or group of machines are created as work centers in PP)
In Plant maintenance, work centers can be defined in Hierarchy i.e. work center heirarchy is possible.
take an example: you have created a work center with a group of people. you need to define who would be person responsible for this group & also you can define the persons heirarchy with the integration of HR.( e.g. Manager-Senior Engineer- Engineer-Associate Engineer- Senior Fitter- Fitter)
The difference in one word is : Both are work centers but having different category & being used to perform different kind of tasks.
For the trasaction : i would only like to say that while creating from PM nodes by t-code IR01, system give you default work center category 0005.
I hope i am able to solve ur query for some extent.
Thanks,
PMGURU -
Hi, I have created a hierarchy with work centers.
WC1 - main work center
WC2, WC3: sub work centers
I can set a capacity in IR02 for the main work center also.
Is that normal? I thought that the capacity in the main work center should be calculated from the sub work centers.
Thx, PeterPlease check the below links.
http://forums.sdn.sap.com/thread.jspa?threadID=2000523
http://help.sap.com/saphelp_40b/helpdata/en/b1/c037a1439a11d189410000e829fbbd/content.htm
Note: Please read SAP documentation & search in forum before posting -
Restrict creation of inspection lot for certain work centers
Hi
My client needs to restrict the creation of inspection lot at certain work centers although QM is active for all material processed in these work centers.
I am using the function module 'EXIT_SAPLQAAT_002' of QAAT0001 for this purpose. Z04 inspection type ( with Post to insp stock) is maintained for all these material.
A different Z table is there , where material-work center combination is maintained for which no inspection lot is required.
Logic provided so that system searches Material-Work center from production order then compares it with the Material-Work center combination with the maintained Z Table.If both found same then no inspection lot will be generated.
But an error message (Change the inspection stock of material XXXXXX in QM only) appears for all those material while doing confirmation in CO11N . Hence system does not allow to complete confirmation for those material where QM is active.
Please suggest if i am using the correct Exit or any further improvement is required.
Thanks and regards
D MohantyHi
Actually the issue is resolved now.The problem was with coding where we were using Table-AFRU for reading prod order details.But AFRU does not consider fresh orders for which it was replaced with AFKO.
Also the Z table must be maintained as Plant-Material-Work center combination prior to go for any order confirmation.
Thank you all who have gone through the post , hope this will help those who have to map the same scenario at their end.
Regards
D Mohanty -
PM Order - Change "Work Center" on operations to "Main Work Center"
Hi Experts,
We have prepared a tool for client, which create Maintenance Plan and order in the background.
The order created is having "Main Work Center" defined at header and "Work Center" at the operations level. In the current scenario the "Main Work Center" and "Work Center" are different say 'ABC' & u2018XYZu2019.
Client has the requirement that work center maintained at operations should be same as the main work center.
We need to implement the solution to take care of work center to be same as main work center while creation of the order in the background.
Has anyone worked on the similar requirement before?
I checked for existing USER EXITS for IW31/32/33 and found only one IWO10012. This doesnu2019t seem to be much useful.
Please suggest any possible solution.
Thanks,
Ankur SharmaHi Tilak,
Thanks for the response. The current situation is that we are creating the order in background using the Z-program. The scenario is creating order with operation entries having work center not equal to the main work center.
I am not functional, so just talking in terms of technical terms.
Is there a way the work center at operation level can be changed to main work center in background?
Thanks,
Ankur Sharma -
PM Order - Change operations Work Center to Main Work Center
Hi Experts,
We have prepared a tool for client, which create Maintenance Plan and order in the background.
The order created is having "Main Work Center" defined at header and "Work Center" at the operations level. In the current scenario the "Main Work Center" and "Work Center" are different say 'ABC' & u2018XYZu2019.
Client has the requirement that work center maintained at operations should be same as the main work center.
We need to implement the solution to take care of work center to be same as main work center while creation of the order in the background.
Has anyone worked on the similar requirement before?
I checked for existing USER EXITS for IW31/32/33 and found only one IWO10012. This doesnu2019t seem to be much useful.
Please suggest any possible solution.
Thanks,
Ankur SharmaHi,
The work Center entered by default comes in operation work center, u can do validations while saving the Order :-using user exit : IWO10009 PM Order: Customer Check for 'Save' Event.
regards
pushpa -
Systems are not visible in SM Work Centers
Hi,
I am facing strange problems in the Solution Manager Work Centers.
I have connected some managed systems to the Solution Manager, their data can be displayed normally in SMSY, SLD, solution_manager, ccmsping availabilty in RZ20....
But when I go to the workcenters, there are no systems listed (tabs like System Landscape Management, System Monitoring). What is strange
- I can see CCMSPING statuses in the top of the screen (red/green/gray icons with numbers of systems) but I cannot see the list of systems.
- RCA tab is correct, but this is special configuration in my opinion, so not related to my issue.
I suppose this is somehow related to the queries but I haven't been able to find a solution.
I checked filters, but with no success.
I have full authorizations (sap_all, SMWORK roles).
Version of system: SM 7.01 / SPS 28, managed systems ERP6 or NW7.3
Thanks a lot for advice!
VasekHi Jansi,
I have checked solman_setup, everything seems to be fine. I assigned to my user sap_all and all SMWORK roles, so there shouldn't be any authorization issue.
What is strange, I can see the list of systems in some filters, when I open Favourites management popup windows or for example on the Downtime management tab. But System Management shows only availability icons with correct numbers, all other data are empty (All Systems (0) ABAP Systems (0)Java Systems (0)Favorites (0))...
Why?
Vasek -
How to have Dynamic Columns based on Work centers in CRHD table?
i need to create dynamic internal table......based on the number of entries(work centers ) in CRHD table....this is number of work centers...like how many manufac unit....How to have the work center names at heading and how to fill values at rows...as the number of workcenters may differ dynamic.....how to fill the values...for a dynamic internal table
Hi Meena,
For Dynamic display ,go through it
REPORT yusmm_text1 NO STANDARD PAGE HEADING
LINE-SIZE 199.
T A B L E S
TABLES: MARA,
MAKT,
THEAD.
GLOBAL TYPE-POOLS
TYPE-POOLS : SLIS.
GLOBAL TYPES
TYPES : BEGIN OF TP_FINAL,
MATNR TYPE MARA-MATNR,
BEGRU TYPE MARA-BEGRU,
MTART TYPE MARA-MTART,
MAKTX TYPE MAKT-MAKTX,
SPRAS TYPE MAKT-SPRAS,
LTXT(2000) TYPE C ,
SRNO TYPE N ,
END OF TP_FINAL.
TYPES : BEGIN OF TP_T002,
SPRAS TYPE T002-SPRAS,
LAISO TYPE T002-LAISO,
SRNO TYPE N ,
END OF TP_T002.
TYPES : BEGIN OF TP_MARA_MAKT,
MATNR TYPE MARA-MATNR,
BEGRU TYPE MARA-BEGRU,
MTART TYPE MARA-MTART,
SPRAS TYPE MAKT-SPRAS,
MAKTX TYPE MAKT-MAKTX,
END OF TP_MARA_MAKT.
Types: BEGIN OF tp_matnr,
matnr TYPE mara-matnr,
END OF tp_matnr.
GLOBAL ELEMENTARY VARIABLES
DATA : gv_date TYPE sy-datum.
DATA : gv_repid TYPE sy-repid.
DATA : g_var1(10) TYPE C.
DATA : gv_index TYPE sy-tabix.
DATA: gv_strg TYPE string,
gv_strg1(2000) TYPE C.
DATA : gv_lang TYPE sy-langu.
DATA : g_v(3) TYPE N .
DATA : gv_lines(3) TYPE N .
DATA : gv_var(3) TYPE N .
DATA : gv_var1(3) TYPE N.
DATA: gv_str TYPE STRING.
DATA: gv_str1 TYPE STRING.
DATA : gv_li TYPE I,
gv_lit TYPE I,
gv_lin TYPE I.
DATA: g_var11(3) TYPE N,
gv_li1(3) TYPE N,
g_var2(3) TYPE N.
DATA : gv_i1 TYPE I.
DATA : gv_i TYPE I.
DATA: gl_lenght TYPE I.
GLOBAL STRUCTURES
DATA: T_NEWTABLE TYPE REF TO DATA,
T_NEWLINE TYPE REF TO DATA,
T_FLDCAT1 TYPE SLIS_T_FIELDCAT_ALV,
T_FLDCAT TYPE LVC_T_FCAT,
WA_IT_FLDCAT TYPE LVC_S_FCAT,
WA_IT_FLDCAT1 TYPE SLIS_FIELDCAT_ALV,
WA_COLNO(2) TYPE N,
WA_FLNAME(5) TYPE C,
L_LT TYPE SLIS_LAYOUT_ALV.
GLOBAL INTERNAL TABLES (WITH INCLUDE STRUCTURE)
DATA : IG_MARA_MAKT TYPE STANDARD TABLE OF TP_MARA_MAKT,
WG_MARA_MAKT TYPE TP_MARA_MAKT.
DATA : IG_T002 TYPE STANDARD TABLE OF TP_T002,
WG_T002 TYPE TP_T002.
DATA : IG_FINAL TYPE STANDARD TABLE OF TP_FINAL,
WG_FINAL TYPE TP_FINAL.
data : IG_MATNR TYPE STANDARD TABLE OF TP_MATNR WITH HEADER LINE,
WG_MATNR TYPE TP_MATNR.
DATA:BEGIN OF IG_THEAD OCCURS 0.
INCLUDE STRUCTURE THEAD .
DATA: END OF IG_THEAD.
DATA:BEGIN OF IG_TLINE OCCURS 0.
INCLUDE STRUCTURE TLINE .
DATA:END OF IG_TLINE.
FIELD-SYMBOLS
FIELD-SYMBOLS: <T_DYNTABLE> TYPE STANDARD TABLE,"Dynamic internal
"tablename
<FS_DYNTABLE>, "Field symbol to create work area
<FS_FLDVAL> TYPE ANY. " Field symbol to assign values
COMPULSORY
FIELD-SYMBOLS: <FS_DATA> TYPE REF TO DATA,
<FS_DATA1> TYPE REF TO DATA,
<FS_2> TYPE STANDARD TABLE,
<FS_22> TYPE STANDARD TABLE,
<FS_1>,
<FS_11>,
<F>,
<FA>,
<LWA_LINE_WA>,
<LWA_LINE_WA1>.
------- Create Dyn Table From FC
DATA: LT_DATA TYPE REF TO DATA,
LT_DATA1 TYPE REF TO DATA,
LWA_LINE TYPE REF TO DATA,
LWA_LINE1 TYPE REF TO DATA,
LI_FIELD_CAT TYPE LVC_T_FCAT,
LWA_FIELD_CAT TYPE LVC_S_FCAT.
PARAMETERS & SELECT-OPTIONS
SELECTION-SCREEN : BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS : S_SPRAS FOR MAKT-SPRAS NO INTERVALS DEFAULT 'EN'
OBLIGATORY ,
S_MATNR FOR MARA-MATNR,
S_MTART FOR MARA-MTART.
PARAMETERS: GP_SIZE TYPE I DEFAULT '200'.
SELECTION-SCREEN : END OF BLOCK B1.
INITIALIZATION
INITIALIZATION.
gv_repid = sy-repid.
gv_date = sy-datum.
AT SELECTION-SCREEN
AT SELECTION-SCREEN.
IF GP_SIZE < 0.
MESSAGE E002(00).
ENDIF.
IF GP_SIZE > 50000.
MESSAGE W130(26) WITH TEXT-004.
SET CURSOR FIELD 'gp_size'.
ENDIF.
START-OF-SELECTION
START-OF-SELECTION.
PERFORM FIELDCAT.
PERFORM LAYOUT.
PERFORM DATA_FETCH.
PERFORM READ_DATA_TO_FINAL.
SORT ig_final BY matnr spras.
gv_lin = gv_li.
gv_li = gv_li - 2.
LOOP AT ig_final INTO wg_final.
ASSIGN COMPONENT 1 OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
<FA> = 'Material Number'.
ASSIGN COMPONENT 2 OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
<FA> = 'Authorization Group'.
g_VAR11 = wg_final-srno + 2.
gv_li1 = gv_li1 + 2.
MOVE : g_var11 TO gv_i1.
ASSIGN COMPONENT g_var11 OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
<FA> = 'MatDesc'.
g_var2 = g_var11 + gv_lines.
ASSIGN COMPONENT g_var2 OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
<FA> = 'BasicData'.
APPEND <LWA_LINE_WA1> TO <FS_22>.
EXIT.
ENDLOOP.
LOOP AT ig_final INTO wg_final.
AT NEW matnr.
gv_index = sy-tabix.
ASSIGN COMPONENT 1 OF STRUCTURE <LWA_LINE_WA> TO <F>.
<F> = wg_final-matnr.
ENDAT.
AT NEW MATNR.
GV_INDEX = SY-TABIX.
ASSIGN COMPONENT 1 OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
<FA> = wg_final-matnr.
ENDAT.
ASSIGN COMPONENT 2 OF STRUCTURE <LWA_LINE_WA> TO <F>.
<F> = wg_final-begru.
ASSIGN COMPONENT 2 OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
<FA> = wg_final-begru.
gv_var = wg_final-srno + 2.
gv_li = gv_li + 2.
MOVE : gv_var TO gv_i.
ASSIGN COMPONENT gv_var OF STRUCTURE <LWA_LINE_WA> TO <F>.
<F> = wg_final-maktx.
ASSIGN COMPONENT gv_var OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
<FA> = wg_final-maktx.
gv_var1 = gv_var + gv_lines .
ASSIGN COMPONENT gv_var1 OF STRUCTURE <LWA_LINE_WA> TO <F>.
<F> = wg_final-ltxt.
ASSIGN COMPONENT gv_var1 OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
<FA> = wg_final-ltxt.
AT END OF matnr.
APPEND <LWA_LINE_WA> TO <FS_2>.
CLEAR <LWA_LINE_WA>.
ENDAT.
AT END OF matnr.
APPEND <LWA_LINE_WA1> TO <FS_22>.
CLEAR <LWA_LINE_WA1>.
ENDAT.
ENDLOOP.
PERFORM display..
*& Form data_fetch
text
--> p1 text
<-- p2 text
FORM DATA_FETCH .
SELECT matnr
from mara up to gp_size rows
appending corresponding fields of table ig_matnr
where matnr in s_matnr
and mtart in s_mtart.
loop at ig_matnr.
SELECT MARA~MATNR
MARA~BEGRU
MARA~MTART
MAKT~SPRAS
MAKT~MAKTX FROM MARA INNER JOIN MAKT
ON MARAMATNR = MAKTMATNR
appending corresponding fields of TABLE ig_mara_makt UP TO GP_SIZE
ROWS
WHERE makt~spras IN s_spras
AND mara~matnr IN s_matnr
AND mara~mtart IN s_mtart
AND mara~matnr EQ ig_matnr-matnr.
endloop.
IF sy-subrc = 0.
SORT ig_mara_makt.
ENDIF.
ENDFORM. " data_fetch
*& Form read_data_to_final
text
--> p1 text
<-- p2 text
FORM READ_DATA_TO_FINAL .
LOOP AT ig_mara_makt INTO wg_mara_makt .
wg_final-MATNR = wg_mara_makt-MATNR.
wg_final-BEGRU = wg_mara_makt-BEGRU.
wg_final-MTART = wg_mara_makt-MTART.
wg_final-SPRAS = wg_mara_makt-SPRAS.
wg_final-MAKTX = wg_mara_makt-MAKTX.
READ TABLE ig_t002 INTO wg_t002 WITH KEY spras = wg_final-spras.
IF sy-subrc = 0.
wg_final-srno = wg_t002-srno.
ENDIF.
CLEAR ig_thead[].
ig_thead-TDOBJECT = 'MATERIAL'.
ig_thead-TDNAME = wg_final-matnr.
ig_thead-TDID = 'GRUN'.
ig_thead-TDSPRAS = wg_final-spras.
CALL FUNCTION 'TEXT_READ'
EXPORTING
I_HEADER = IG_THEAD
I_READONLY = 'X'
IMPORTING
E_HEADER = IG_THEAD
TABLES
T_LINES = IG_TLINE[]
EXCEPTIONS
NOTFOUND = 1.
IF sy-subrc EQ 0.
LOOP AT ig_tline.
gv_strg = ig_tline-tdline.
IF gv_strg1 <> ' '.
CONCATENATE gv_strg1 ';' gv_strg INTO gv_strg1.
ELSE.
gv_strg1 = gv_strg.
ENDIF.
ENDLOOP.
wg_final-ltxt = gv_strg1.
APPEND wg_final TO ig_final.
CLEAR wg_final.
gv_strg1 = ' '.
ELSE.
APPEND wg_final TO ig_final.
ENDIF.
ENDLOOP.
ENDFORM. " read_data_to_final
" read_data_to_final
*& Form layout
text
--> p1 text
<-- p2 text
FORM LAYOUT .
CLEAR L_LT.
L_LT-ZEBRA = 'X'.
L_LT-COLWIDTH_OPTIMIZE = 'X'.
L_LT-WINDOW_TITLEBAR = 'MATERIAL DETAILS'.
ENDFORM. " layout
*& Form fieldcat
text
--> p1 text
<-- p2 text
FORM FIELDCAT .
SELECT SPRAS
LAISO FROM t002 INTO CORRESPONDING FIELDS OF TABLE ig_t002
WHERE spras IN s_spras.
DESCRIBE TABLE ig_t002 LINES gv_lines.
LOOP AT ig_t002 INTO wg_t002.
g_v = g_v + 1.
Wg_t002-srno = g_v.
MODIFY ig_t002 FROM wg_t002 TRANSPORTING SRNO.
ENDLOOP.
LOOP AT ig_t002 INTO wg_t002.
CLEAR WA_IT_FLDCAT.
MOVE SY-INDEX TO WA_COLNO.
CONCATENATE 'MD-' wg_t002-LAISO
WA_COLNO
INTO WA_FLNAME.
WA_IT_FLDCAT-FIELDNAME = WA_FLNAME.
WA_IT_FLDCAT-DATATYPE = 'CHAR'.
WA_IT_FLDCAT-SELTEXT = WA_FLNAME.
WA_IT_FLDCAT-INTLEN = 250.
WA_IT_FLDCAT-TABNAME = '<FS_2>'.
APPEND WA_IT_FLDCAT TO T_FLDCAT.
CLEAR wg_t002.
ENDLOOP.
LOOP AT ig_t002 INTO wg_t002.
CLEAR WA_IT_FLDCAT.
MOVE SY-INDEX TO WA_COLNO.
CONCATENATE 'BD-' wg_t002-LAISO
WA_COLNO
INTO WA_FLNAME.
WA_IT_FLDCAT-FIELDNAME = WA_FLNAME.
WA_IT_FLDCAT-DATATYPE = 'CHAR'.
WA_IT_FLDCAT-SELTEXT = WA_FLNAME.
WA_IT_FLDCAT-INTLEN = 250.
WA_IT_FLDCAT-TABNAME = '<FS_2>'.
APPEND WA_IT_FLDCAT TO T_FLDCAT.
CLEAR wg_t002.
ENDLOOP.
MOVE 'MATNR' TO WA_FLNAME.
WA_IT_FLDCAT-FIELDNAME = WA_FLNAME.
WA_IT_FLDCAT-DATATYPE = 'CHAR'.
WA_IT_FLDCAT-SELTEXT = 'Material No'.
WA_IT_FLDCAT-INTLEN = 18.
WA_IT_FLDCAT-TABNAME = '<FS_2>'.
INSERT WA_IT_FLDCAT INTO T_FLDCAT INDEX 1.
MOVE 'BEGRU' TO WA_FLNAME.
WA_IT_FLDCAT-FIELDNAME = WA_FLNAME.
WA_IT_FLDCAT-DATATYPE = 'CHAR'.
WA_IT_FLDCAT-SELTEXT = 'Authorization Group'.
WA_IT_FLDCAT-INTLEN = 4.
WA_IT_FLDCAT-TABNAME = '<FS_2>'.
INSERT WA_IT_FLDCAT INTO T_FLDCAT INDEX 2.
DESCRIBE TABLE T_FLDCAT LINES gv_li.
ASSIGN LT_DATA TO <FS_DATA>.
Creating the Dynamic Internal Table
CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
EXPORTING
IT_FIELDCATALOG = T_FLDCAT " Fieldcatalogue
IMPORTING
EP_TABLE = <FS_DATA> " Dynamic Internal Table
EXCEPTIONS
GENERATE_SUBPOOL_DIR_FULL = 1
OTHERS = 2.
Assign Dyn Table To Field Sumbol
ASSIGN <FS_DATA>->* TO <FS_1>.
Assigning the Internal Table TYPE ANY to Standard internal Table
ASSIGN <FS_1> TO <FS_2>.
Creating a Workarea
CREATE DATA LWA_LINE LIKE LINE OF <FS_2> .
Assigning the Content to the workares as a Pointer
ASSIGN LWA_LINE->* TO <LWA_LINE_WA>.
LOOP AT T_FLDCAT INTO WA_IT_FLDCAT.
WA_IT_FLDCAT1-FIELDNAME = WA_IT_FLDCAT-FIELDNAME.
WA_IT_FLDCAT1-TABNAME = WA_IT_FLDCAT-TABNAME.
WA_IT_FLDCAT1-SELTEXT_L = WA_IT_FLDCAT-SELTEXT.
WA_IT_FLDCAT1-REF_TABNAME = 'MARC'.
APPEND WA_IT_FLDCAT1 TO T_FLDCAT1.
CLEAR : WA_IT_FLDCAT,WA_IT_FLDCAT1.
ENDLOOP.
ASSIGN LT_DATA1 TO <FS_DATA1>.
CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
EXPORTING
IT_FIELDCATALOG = T_FLDCAT " Fieldcatalogue
IMPORTING
EP_TABLE = <FS_DATA1> " Dynamic Internal table
EXCEPTIONS
GENERATE_SUBPOOL_DIR_FULL = 1
OTHERS = 2.
Assign Dyn Table To Field Sumbol
ASSIGN <FS_DATA1>->* TO <FS_11>.
Assigning the Internal Table TYPE ANY to Standard internal Table
ASSIGN <FS_11> TO <FS_22>.
Creating a Workarea
CREATE DATA LWA_LINE1 LIKE LINE OF <FS_22> .
Assigning the Content to the workares as a Pointer
ASSIGN LWA_LINE1->* TO <LWA_LINE_WA1>.
ENDFORM. " fieldcat
*& Form show
text
--> p1 text
<-- p2 text
FORM Display .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = GV_REPID
I_CALLBACK_PF_STATUS_SET = 'PF_STATUS_SET'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT = L_LT
IT_FIELDCAT = T_FLDCAT1[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
I_HTML_HEIGHT_TOP = 0
I_HTML_HEIGHT_END = 0
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
IR_SALV_FULLSCREEN_ADAPTER =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = <FS_2>
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " display
FORM PF_STATUS_SET USING RS_EXTAB TYPE SLIS_T_EXTAB.
SET PF-STATUS 'DISPLAY' .
ENDFORM. "PF_STATUS_SET
*& Form Name: user_command *
*& Form Desc: For Handling USER_COMMAND *
FORM USER_COMMAND USING IF_UCOMM TYPE SY-UCOMM
IS_SELFIELD TYPE SLIS_SELFIELD.
CASE IF_UCOMM.
WHEN 'DOWNLOAD'.
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
TITLEBAR = ' '
DIAGNOSE_OBJECT = ' '
TEXT_QUESTION = 'Data download to excel'
TEXT_BUTTON_1 = 'Ja'(001)
ICON_BUTTON_1 = ' '
TEXT_BUTTON_2 = 'Nein'(002)
ICON_BUTTON_2 = ' '
DEFAULT_BUTTON = '1'
DISPLAY_CANCEL_BUTTON = 'X'
USERDEFINED_F1_HELP = ' '
START_COLUMN = 25
START_ROW = 6
POPUP_TYPE =
IMPORTING
ANSWER =
TABLES
PARAMETER =
EXCEPTIONS
TEXT_NOT_FOUND = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE =
FILENAME = 'C:\Material-Text.xls'
FILETYPE = 'ASC'
APPEND = ' '
WRITE_FIELD_SEPARATOR = 'X'
HEADER = '00'
TRUNC_TRAILING_BLANKS = 'X'
WRITE_LF = 'X'
COL_SELECT = ' '
COL_SELECT_MASK = ' '
DAT_MODE = 'X'
IMPORTING
FILELENGTH = GL_LENGHT
TABLES
DATA_TAB = <FS_22>
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
IF GL_LENGHT NE 0.
MESSAGE S398(00) WITH 'DATA downloaded to EXCEL'.
ENDIF.
ENDCASE.
ENDFORM. "user_command
Thanks
Ankur SHarma
Maybe you are looking for
-
just have a quick question, I am in a family plan with my parents and brother, and I was wondering can i upgrade to the new iphone 4s if it hasnt been 2 years yet? my mom is the primary holder of the account. i have the iphone 4 now and would like th
-
Lenovo Community Participat​ion Rules
Objectives of Lenovo Discussion Forums: These communities have been created to provide a high quality atmosphere in which users of Lenovo products and services may share experiences and expertise. While members from Lenovo may participate at interval
-
Why do's imovie hd v5 have to update files.
I am wondering has anyone who has tryed to captuer video in iMovie HD v5. Ever had a box pop up saying please what udating file. After clicking on a clip in the prevow pain. If so is there anyway to stop this from happening. This happends to me right
-
I received a PDF-file with renderable text. The font list has some entries like "Calibri (embedded subset), Type: True Type, Encoding: Custom". The "PDF producer" is GPL Ghostscript 8.71. The text looks "normal" but some bookmarks I create are just g
-
Extended warranty for 7D refurbished
Does Canon offer an extended warranty for a newly purchased 7D refurbished