Error while adding user fields to user table using vb6.0
Hi,
I am adding a user tables using vb6.0 using DIAPI.
I am able to add the user table successfully.
I am getting the following error when i am adding the fields to the table.
"The metadata object for this object cannot be updated, since it's ref count is bigger than 0."
My code is as follows:
oUserFieldsMD.TableName = TABLE_NAME_ITEM_LOCN
oUserFieldsMD.Name = vTableFields(0, lCount)
oUserFieldsMD.Description = vTableFields(1, lCount)
oUserFieldsMD.Type = vTableFields(2, lCount)
oUserFieldsMD.EditSize = CLng(vTableFields(3,lCount))
lRetCode = oUserFieldsMD.Add
This error does not come up when i try to add the field to my table using the vb sample provided by SAP.
Your help will me much appreciated.
Thanks.
Hi Satish,
The problem is that you added the table and the objetc that you used to add the table is not freed properly. You need to free the object and then the reference count to that table will be 0 - which will enable you to add the fields
e.g
Dim pUTables As SAPbobsCOM.UserTablesMD
'Do your stuff
Set pUTables = Nothing
Dim pUFields As SAPbobsCOM.UserFieldsMD
'Do your stuff
Set pUFields = Nothing
Similar Messages
-
Error while Adding the PlaceHolder to Home Page using Jdev,UCM
Hi,
I am Using UCM and Jdev 11g.
I was creating a website using Oracle® Fusion Middleware Developer's Guide for Site Studio for External Applications
11g Release 1 (11.1.1).
I worked fine till creating the place Holder Definition , I was trying to add place holder to Home Page.
In this step I did not get the property 'Switch Placeholder Definition Role' in the List when exploring the node WebSite.
Plaese help me resolve this.Hi chris,
Thank you for your response.
I am using oracle db. It seems that it is trying to insert record into L10_Locale table while portlet is added into home page. Does the record go to L10_LOCALE while adding portlet.
As per my knowledge, records goes to desktop,page and placement related tables while portlet is added.
When i see the L10_LOCALE existing records, it has two 2 records.
Encoding Language Country
UTF-8 en US
UTF-8 en
you said that Locale for the title or description is too long... Is it for Portlet's title of locale ...?
Then, what is the relation of title and this error ...
Please clarify this ...?
Regards,
Senthil -
Hi Friends,
I am using Oracle 8.1.6 Server, & facing problems while retrieving data from a PL/SQL Table:
CREATE or REPLACE PROCEDURE test_proc IS
TYPE tP2 is TABLE of varchar2(10); --declared a collection
dt2 tP2 := tP2('a','b','c');
i NUMBER(8);
begin
SELECT COUNT(*) INTO i FROM TABLE(CAST(dt2 as tP2));
DBMS_OUTPUT.PUT_LINE('**'||i);
end;
While executing the above procedure, I encountered foll. error:
ERROR at line 1:
ORA-00600: internal error code, arguments: [15419], [severe error during PL/SQL execution], [], [],
ORA-06544: PL/SQL: internal error, arguments: [pfrrun.c:pfrbnd1()], [], [], [], [], [], [], []
ORA-06553: PLS-801: internal error [0]
Can anyone please help me, where the problem is??
Is it Possible to retrieve data from PL/SQL TABLE using SELECT statement? & How ?
Thanks in advance.
Best Regards,
Jay Raval.Thanks Roger for the Update.
It means that have to first CREATE TYPE .. TABLE in database then only I can fire a Select statement on that TYPE.
Actually I wanted to fire a Select statement on the TABLE TYPE, defined & declared in PLSQL stored procedure using DECLARE TYPE .. TABLE & not using CREATE TYPE .. TABLE.
I was eager to know this, because my organization is reluctant in using CREATE TYPE .. TABLE defined in the database, so I was looking out for another alternative to access PL/SQL TABLE using Select statement without defining it database. It would have been good if I could access a PLSQL TABLE using Select statement Declared locally in the stored procedure.
Can I summarize that to access a PL/SQL TABLE using SELECT statement, I have to first CREATE TYPE .. TABLE?
If someone have any other idea on this, please do let me know.
Thanks a lot for all help.
Best Regards,
Jay Raval.
You have to define a database type...
create type tP2 is table of varchar2(10)
CREATE OR REPLACE PROCEDURE TEST_PROC
IS
dt2 tP2 := tP2('a','b','c');
i NUMBER(8);
begin
SELECT COUNT(*) INTO i FROM TABLE(CAST (dt2 AS tP2));
DBMS_OUTPUT.PUT_LINE('**'||i);
end;
This will work.
Roger -
Error while adding responsibilty to a user
Hi,
I have upgrade 11i9 instance to 12.1.1 and after upgrade, noticed that for sysadmin user "system administrator" responsibility is not available somehow. suspect that it could a template problem from where the instance was cloned and then upgraded to 12.1.1
Now I did do a sanity test on the upgraded instance, but as system administrator responsibility is not available, not able to submit any CP.
I tried to add the responsibility to one of the existing users as below:
execute fnd_user_resp_groups_api.insert_assignment(user_id =>1004744,responsibility_id => 57578,responsibility_application_id =>1,security_group_id => null,start_date=> sysdate, end_date=> null, description => 'Assign as a test');
but getting the error
ERROR at line 1:
ORA-20001: Oracle error 100: ORA-01403: no data found has been detected in FND_USER_RESP_GROUPS_API.INSERT_ASSIGNMENT.
ORA-06512: at "APPS.APP_EXCEPTION", line 72
ORA-06512: at "APPS.FND_USER_RESP_GROUPS_API", line 29
ORA-06512: at "APPS.FND_USER_RESP_GROUPS_API", line 610
ORA-06512: at line 1
Could you please help me in adding the system administrator responsibility to the user.am trying to provide "system administrator" responsibility to the below user already created.
query used:
SELECT fur.responsibility_application_id,fu.user_id, fu.user_name, fur.responsibility_id,
fr.responsibility_name
FROM fnd_user fu, fnd_user_resp_groups fur, fnd_responsibility_vl fr
WHERE fu.user_id = fur.user_id
AND fr.application_id = fur.responsibility_application_id
AND fr.responsibility_id = fur.responsibility_id
AND TRUNC (SYSDATE) BETWEEN TRUNC (fr.start_date)
AND TRUNC (NVL ((fr.end_date - 1), SYSDATE))
AND TRUNC (SYSDATE) BETWEEN TRUNC (fur.start_date)
AND TRUNC (NVL ((fur.end_date - 1), SYSDATE))
and user_name like 'SAMANDA' --- for all user or for perticular user
-- AND fur.responsibility_application_id = 275 -- to check users for perticular responsibility
order by user_name
RESPONSIBILITY_APPLICATION_ID
USER_ID
USER_NAME
RESPONSIBILITY_ID
RESPONSIBILITY_NAME
691
1004405
SAMANDA
57571
Default Partner User
and the command I am using to add is the below and getting the error.
SQL> execute fnd_user_resp_groups_api.insert_assignment(user_id =>1004405,responsibility_id => 57571,responsibility_application_id =>1,security_group_id => null,start_date=> sysdate, end_date=> null, description => 'Assign as a test');
BEGIN fnd_user_resp_groups_api.insert_assignment(user_id =>1004405,responsibility_id => 57571,responsibility_application_id =>1,security_group_id => null,start_date=> sysdate, end_date=> null, description => 'Assign as a test'); END;
ERROR at line 1:
ORA-20001: Oracle error 100: ORA-01403: no data found has been detected in
FND_USER_RESP_GROUPS_API.INSERT_ASSIGNMENT.
ORA-06512: at "APPS.APP_EXCEPTION", line 72
ORA-06512: at "APPS.FND_USER_RESP_GROUPS_API", line 29
ORA-06512: at "APPS.FND_USER_RESP_GROUPS_API", line 610
ORA-06512: at line 1 -
EEWB Enhancement Error while adding new field
Hello Experts ,
The requirement is to add the attachment feild in the support desk message screen (CRMD_ORDER) in the Fast track tab , although in the transaction tab already the document option is available for attachments the end user's want it in intial screen.
I have tried this using EASY ENHANCEMENT WORKBENCH - EEWB as per the suggestions given by experts in SDN,now i face a problem in EEWB .
I have created a object and extention in EEWB under a project,the it took me to the wizard automatically ,i followed up the notes in wizard to ADD_NEW_FIELDS and after it is completed, it shows a ERROR message as "Definition CRM_BTX_ADD_NEW_FIELDS is of the type 'TSK' and should run on an external system. This is not permissible. Only definitions of type 'SEQ' may be created for external systems." What does this Error Mean?Should i have to follow any system settings for this?
Note : I have made the system settings in EEWC -System Data Maintenence before enhancement.
Has any one worked with EEWB to ADD new fields,if so then please give me a solution to solve this problem.
Thanks & Regards,
Mohana PriyaHi Priya,
We are also facing similar error in EEWB. If you have solved this problem, please update thread.
Thanks
Dhanraj -
Error while adding custom fields in ERP quotation
I am trying to add custom fields to ERP quotation. So picked up ERP_H and added view BTCUSTOMER_H/CustomerH to its views. I have added the relevant custom fields to BTCUSTOMER_H/CustomerH. Now when I try displaying this, I get the following error..
Context generation failed in view BTCUSTOMER_H/CustomerH of UI Component ERP_H
An exception has occurred Exception Class CX_BSP_WD_INCORRECT_IMPLEMENT - There is no node text 'BTAdminH' in controller ''.
Method: CL_BSP_WD_CONTROLLER=>DO_CONTEXT_NODE_BINDING
Source Text Row: 39
Initialization of view BTCUSTOMER_H/CustomerH of UI Component ERP_H failed
An exception has occurred Exception Class CX_BSP_WD_INCORRECT_IMPLEMENT - There is no node text 'BTAdminH' in controller ''.
Method: CL_BSP_WD_CONTROLLER=>DO_CONTEXT_NODE_BINDING
Source Text Row: 39
Cannot display view ERP_H/HeaderOverviewpage of UI Component ERP_H
An exception has occurred Exception Class CX_BSP_WD_INCORRECT_IMPLEMENT - There is no node text 'BTAdminH' in controller ''.
Method: CL_BSP_WD_CONTROLLER=>DO_CONTEXT_NODE_BINDING
Source Text Row: 39
Window ERP_H/MainWindow of UI Component ERP_H cannot be displayed
An exception has occurred Exception Class CX_BSP_WD_RUNTIME_ERROR - View BTCUSTOMER_H/CustomerH in component ERP_H could not be bound
Method: CL_BSP_WD_VIEW_CONTROLLER=>BIND_VIEW
Source Text Row: 165
I have no prior experiance in UI development. Could someone explain me this error and how to fix this?
Regards,
Amar.closing this unresolved
-
ERROR while adding summary field in group footer
Hi all,
i am using CR Server XI R2
i am trying to a subtotal in a group header using the code below
fieldobjCls = new CrystalDecisions.ReportAppServer.ReportDefModel.FieldObjectClass();
fieldobjCls.Kind = CrystalDecisions.ReportAppServer.ReportDefModel.CrReportObjectKindEnum.crReportObjectKindField;
fieldobjCls.FieldValueType = CrFieldValueTypeEnum.crFieldValueTypeInt32sField;
fieldobjCls.Name = "Count";
fieldobjCls.DataSource = "Count({CSP_PROCESS_REPORT.userid})";
fieldobjCls.Left = 1000;
fieldobjCls.Top = 700;
fieldobjCls.Width = 1000;
fieldobjCls.Height = 300;
boSection = rcDoc.ReportDefinition.get_GroupHeaderArea(0).Sections[0];
rcDoc.ReportDefController.ReportObjectController.Add(fieldobjCls, boSection, -1);
as a result i am getting the error as
Cannot find the section in the group area pair of the summary field.
how to solve
Padmanaban VTry adding the summary field in the Report Designer first, then do the same steps in code. If it doesn't work in the deisgner it won't work in code.
-
Error while adding Parameter Field to CrossTab report in CR 2008
Hello Experts,
I'm getting an error - "Not supported" while I'm trying to add a paremeter to the Crosstab report. It is a simple report with no further complications.
Is there any special way to add a parameter field to Crosstab? Any help appreciated.
TIA
arjunHi,
What version of Crystal Report are you using?
Kindly refer SAP Note 1376117 & 1454192 and verify if you are on the approriate patch.
Regards,
Nakul -
Error while adding custom fields using EEWB.
Hi
While trying to add custom fields using the transaction EEWB i got an error message
'No Logsys040 transport request exists for system workbench.Please let me know why it happens.
Thanks
sureshpaulclosing this unresolved
-
Error while adding new field in the Segment type thru WE31.
Hi All,
I want to add one field in the Z segment type using WE31.But i am getting the error message as
'Current segment definition <segment name> can no longer be changed and The current segment definition
is already released.You can either add a new segment definition or cancel the release of the current segment definition'.
The current segment defenition which i am trying to change got the SAP release of 45B. But the system has upgraded to Ecc6 recently.
I tried going to the edit menu and cancel the release, but still it is not allowing.
Whats the impact of the Add button(Add version) and creating a new version?.will it create a new version for ECC6?.
Points will be rewarded
regards,
neslin.Hi
You can create a new version. This will not create any problems. You might not be able to cancel the release because of upgrade.
Thanks
Vijay -
Error whil adding Header to the ALV grid using OO
Hi Guys,
I want to display the Header for the ALV grid using Splitter .
when i am doing like that .I am getting a screen on the top of that screen I am getting a EMPTY screen .I don't know why likat.
What i need is just to display a Grid with header?Can anybody Please help me reagarding this problem.
the Code is Below.
*& Report Z_TEST_PGM
REPORT Z_TEST_PGM NO STANDARD PAGE HEADING
LINE-SIZE 120 MESSAGE-ID zotc.
Tables : CKMLMV003 , CKMLMV001.
TYPE-POOLS: slis.
Types : Begin of t_CKMLMV003_out,
WERKS type CKMLMV003-WERKS,
MATNR type CKMLMV003-MATNR,
MISCH_VERH type CKMLMV003-MISCH_VERH,
KALNR_BAL type CKMLMV003-KALNR_BAL,
GJAHR type CKMLMV003-GJAHR,
PERIO type CKMLMV003-PERIO,
MGTYP type CKMLMV003-MGTYP,
End of t_CKMLMV003_out,
Begin of t_CKMLMV001_out,
MATNR type CKMLMV001-MATNR,
KALNR type CKMLMV001-KALNR,
LIFNR_ND type CKMLMV001-LIFNR_ND,
EKORG_ND type CKMLMV001-EKORG_ND,
End of t_CKMLMV001_out,
Begin of t_CKMLMV003_Temp,
MATNR type CKMLMV003-MATNR,
GJAHR type CKMLMV003-GJAHR,
PERIO type CKMLMV003-PERIO,
End of t_CKMLMV003_Temp,
Begin of t_Final_out,
MATNR type CKMLMV003-MATNR,
GJAHR type CKMLMV003-GJAHR,
PERIO type CKMLMV003-PERIO,
WERKS type CKMLMV003-WERKS,
LIFNR_ND1 type CKMLMV001-LIFNR_ND,
MISCH_VERH1 type CKMLMV003-MISCH_VERH,
LIFNR_ND2 type CKMLMV001-LIFNR_ND,
MISCH_VERH2 type CKMLMV003-MISCH_VERH,
LIFNR_ND3 type CKMLMV001-LIFNR_ND,
MISCH_VERH3 type CKMLMV003-MISCH_VERH,
LIFNR_ND4 type CKMLMV001-LIFNR_ND,
MISCH_VERH4 type CKMLMV003-MISCH_VERH,
LIFNR_ND5 type CKMLMV001-LIFNR_ND,
MISCH_VERH5 type CKMLMV003-MISCH_VERH,
LIFNR_ND6 type CKMLMV001-LIFNR_ND,
MISCH_VERH6 type CKMLMV003-MISCH_VERH,
LIFNR_ND7 type CKMLMV001-LIFNR_ND,
MISCH_VERH7 type CKMLMV003-MISCH_VERH,
LIFNR_ND8 type CKMLMV001-LIFNR_ND,
MISCH_VERH8 type CKMLMV003-MISCH_VERH,
LIFNR_ND9 type CKMLMV001-LIFNR_ND,
MISCH_VERH9 type CKMLMV003-MISCH_VERH,
LIFNR_ND10 type CKMLMV001-LIFNR_ND,
MISCH_VERH10 type CKMLMV003-MISCH_VERH,
LIFNR_ND11 type CKMLMV001-LIFNR_ND,
MISCH_VERH11 type CKMLMV003-MISCH_VERH,
LIFNR_ND12 type CKMLMV001-LIFNR_ND,
MISCH_VERH12 type CKMLMV003-MISCH_VERH,
LIFNR_ND13 type CKMLMV001-LIFNR_ND,
MISCH_VERH13 type CKMLMV003-MISCH_VERH,
End of t_Final_out,
Begin of t_Final_out1,
MATNR type CKMLMV003-MATNR,
GJAHR type CKMLMV003-GJAHR,
PERIO type CKMLMV003-PERIO,
LIFNR_ND1 type CKMLMV001-LIFNR_ND,
MISCH_VERH1 type CKMLMV003-MISCH_VERH,
LIFNR_ND2 type CKMLMV001-LIFNR_ND,
MISCH_VERH2 type CKMLMV003-MISCH_VERH,
LIFNR_ND3 type CKMLMV001-LIFNR_ND,
MISCH_VERH3 type CKMLMV003-MISCH_VERH,
LIFNR_ND4 type CKMLMV001-LIFNR_ND,
MISCH_VERH4 type CKMLMV003-MISCH_VERH,
LIFNR_ND5 type CKMLMV001-LIFNR_ND,
MISCH_VERH5 type CKMLMV003-MISCH_VERH,
LIFNR_ND6 type CKMLMV001-LIFNR_ND,
MISCH_VERH6 type CKMLMV003-MISCH_VERH,
LIFNR_ND7 type CKMLMV001-LIFNR_ND,
MISCH_VERH7 type CKMLMV003-MISCH_VERH,
LIFNR_ND8 type CKMLMV001-LIFNR_ND,
MISCH_VERH8 type CKMLMV003-MISCH_VERH,
LIFNR_ND9 type CKMLMV001-LIFNR_ND,
MISCH_VERH9 type CKMLMV003-MISCH_VERH,
LIFNR_ND10 type CKMLMV001-LIFNR_ND,
MISCH_VERH10 type CKMLMV003-MISCH_VERH,
LIFNR_ND11 type CKMLMV001-LIFNR_ND,
MISCH_VERH11 type CKMLMV003-MISCH_VERH,
LIFNR_ND12 type CKMLMV001-LIFNR_ND,
MISCH_VERH12 type CKMLMV003-MISCH_VERH,
LIFNR_ND13 type CKMLMV001-LIFNR_ND,
MISCH_VERH13 type CKMLMV003-MISCH_VERH,
End of t_Final_out1.
Global Structures *
Data : i_CKMLMV003_str type t_CKMLMV003_out,
i_CKMLMV001_str type t_CKMLMV001_out,
i_Final_str type t_Final_out,
i_Final_str1 type t_Final_out,
i_CKMLMV003_Temp type t_CKMLMV003_Temp.
Global Internal Tables *
Data : i_CKMLMV003_out type standard table of t_CKMLMV003_out,
i_CKMLMV001_out type standard table of t_CKMLMV001_out,
i_Final_out type standard table of t_Final_out,
i_Final_out1 type standard table of t_Final_out.
ALV Report Internal tables *
DATA : t_fieldcatalog TYPE slis_t_fieldcat_alv,
s_fieldcatalog TYPE slis_fieldcat_alv,
t_basic_fieldcatalog TYPE slis_t_fieldcat_alv,
s_basic_fieldcatalog TYPE slis_fieldcat_alv,
t_sort TYPE slis_t_sortinfo_alv,
v_repid TYPE sy-repid.
*ALV Header declarations
Data: t_header type slis_t_listheader,
i_header_str type slis_listheader,
i_line_event_str TYPE slis_alv_event,
i_events TYPE slis_t_event,
wa_layout type slis_layout_alv.
Data : grid1 type ref to cl_gui_alv_grid,
g_custom_container1 type ref to cl_gui_custom_container,
grid2 type ref to cl_gui_alv_grid,
g_custom_container2 type ref to cl_gui_custom_container,
i_FCAT TYPE LVC_T_FCAT,
i_FCAT_str type lvc_s_fcat,
Structure for layout
i_layout_s TYPE lvc_s_layo,
gt_final1 type table of t_Final_out.
DATA: CCCONTAINER1 TYPE SCRFNAME VALUE 'CCCONTAINER1',
CCCONTAINER2 TYPE SCRFNAME VALUE 'CCCONTAINER2',
G_PARENT_TOP TYPE REF TO CL_GUI_CONTAINER ,
G_SPLITTER TYPE REF TO CL_GUI_SPLITTER_CONTAINER,
G_DYNDOC_ID TYPE REF TO CL_DD_DOCUMENT,
G_PARENT_GRID TYPE REF TO CL_GUI_CONTAINER.
Global Variables *
Data :cnt(4) type n value '0',
g_plant type CKMLMV003-WERKS ,
g_QuanTStr type CKMLMV003-MGTYP ,
g_PurchOrg type CKMLMV001-EKORG_ND,
flag type n value '0',
g_cnt6 type n value '0',
g_cnt7 type n value '0',
g_cnt8 type n value '0',
g_cnt9 type n value '0',
g_cnt10 type n value '0',
g_cnt11 type n value '0',
g_cnt12 type n value '0',
g_cnt13 type n value '0'.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-011.
SELECTION-SCREEN: BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) TEXT-006 for field s_matnr.
Select-Options : S_MATNR for CKMLMV003-MATNR .
SELECTION-SCREEN: END OF LINE.
SELECTION-SCREEN: BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) TEXT-007 for field S_WERKS.
SELECT-OPTIONS:S_WERKS for CKMLMV003-WERKS Default '2003'.
SELECTION-SCREEN: END OF LINE.
SELECTION-SCREEN: BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) TEXT-008 for field S_GJAHR.
SELECT-OPTIONS:S_GJAHR for CKMLMv003-GJAHR default Sy-DATUM(4) .
SELECTION-SCREEN: END OF LINE.
SELECTION-SCREEN: BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) TEXT-009 for field S_PERIO.
SELECT-OPTIONS:S_PERIO for CKMLMV003-PERIO .
SELECTION-SCREEN: END OF LINE.
SELECTION-SCREEN: BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(25) TEXT-010 for field P_MGTYP.
Parameters : P_MGTYP type CKMLMV003-MGTYP .
SELECTION-SCREEN: END OF LINE.
SELECTION-SCREEN END OF BLOCK b1 .
At Selection-Screen on s_matnr .
Perform Validate_MatNumber.
At Selection-Screen on s_werks .
Perform Validate_CostingPlant.
At Selection-Screen on s_GJAHR .
Perform Validate_FiscalYear.
At Selection-Screen on s_PERIO .
Perform Validate_Period.
At Selection-Screen on p_MGTYP .
Perform Validate_QuantityStrType.
*& Form Validate_MatNumber
text
Form Validate_MatNumber.
DATA l_MATNR TYPE CKMLMV003-MATNR.
IF NOT S_MATNR[] IS INITIAL .
CLEAR L_MATNR.
SELECT single MATNR FROM CKMLMV003
INTO l_MATNR
WHERE MATNR = s_MATNR-LOW or MATNR = s_MATNR-HIGH.
ENDSELECT.
IF sy-subrc NE 0.
MESSAGE e999 WITH
'Enter a Valid Material Number'(001).
ENDIF.
ENDIF.
ENDFORM. "Validate_MatNumber
*& Form Validate_CostingPlant
text
Form Validate_CostingPlant.
DATA l_werks TYPE CKMLMV003-WERKS.
IF NOT S_WERKS[] IS INITIAL .
CLEAR L_WERKS.
SELECT single WERKS FROM T001W
INTO l_WERKS
WHERE WERKS = s_WERKS-low or WERKS = s_WERKS-high.
ENDSELECT.
IF sy-subrc NE 0.
MESSAGE e999 WITH
'Enter a Valid Costing Plant'(002).
ENDIF.
ENDIF.
ENDFORM. "Validate_CostingPlant
*& Form Validate_FiscalYear
text
Form Validate_FiscalYear.
DATA l_GJAHR TYPE CKMLMV003-GJAHR.
IF NOT S_GJAHR-low IS INITIAL or S_GJAHR-high IS INITIAL.
CLEAR L_GJAHR.
SELECT SINGLE GJAHR FROM CKMLMV003
INTO l_GJAHR
WHERE GJAHR LE sy-DATUM(4) .
IF NOT S_GJAHR-low LE sy-DATUM(4) or S_GJAHR-high LE sy-DATUM(4).
MESSAGE e999 WITH
'Enter a Valid Fiscal year'(003).
ENDIF.
ENDIF.
ENDFORM. "Validate_FiscalYear
*& Form Validate_Period
text
Form Validate_Period.
DATA l_PERIO TYPE CKMLMV003-PERIO.
IF NOT S_PERIO[] IS INITIAL .
CLEAR L_PERIO.
SELECT single PERIO FROM CKMLMV003
INTO l_PERIO
WHERE PERIO GE 1 and PERIO LE 12 .
ENDSELECT.
IF sy-subrc NE 0.
MESSAGE e999 WITH
'Enter a Valid Period'(004).
ENDIF.
ENDIF.
ENDFORM. "Validate_Period
*& Form Validate_QuantityStrType
text
Form Validate_QuantityStrType.
DATA l_MGTYP TYPE CKMLMV003-MGTYP.
IF NOT p_MGTYP IS INITIAL.
CLEAR L_MGTYP.
SELECT SINGLE MGTYP FROM CKMLMV003
INTO l_MGTYP
WHERE MGTYP = p_MGTYP .
IF sy-subrc NE 0.
MESSAGE e999 WITH
'Enter a Valid Quantity Structure Type'(005).
ENDIF.
ENDIF.
ENDFORM. "Validate_QuantityStrType
INITIALIZATION of Fields
Class LCL_EVENT_HANDLER DEFINITION.
Public section.
Methods:
TOP_OF_PAGE for Event TOP_OF_PAGE OF CL_GUI_ALV_GRID
IMPORTING E_DYNDOC_ID.
ENDCLASS. "LCL_EVENT_HANDLER DEFINITION
CLASS LCL_EVENT_HANDLER IMPLEMENTATION.
METHOD TOP_OF_PAGE.
Top-of-page event <br />
PERFORM EVENT_TOP_OF_PAGE USING G_DYNDOC_ID.
ENDMETHOD. "top_of_page
ENDCLASS. "LCL_EVENT_HANDLER IMPLEMENTATION
Data : G_HANDLER TYPE REF TO LCL_EVENT_HANDLER.
Initialization.
v_repid = sy-repid.
Start-of-Selection.
Perform get_CKMLMV003.
Perform get_CKMLMV001.
Perform Get_Finaldata.
Perform Layout_FieldCatalog.
call screen '101'.
Perform ALVGrid_Final_Display.
*& Form Layout_FieldCatalog
text
Form Layout_FieldCatalog.
s_fieldcatalog-col_pos = 1.
s_fieldcatalog-fieldname = 'MATNR'.
s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
s_fieldcatalog-seltext_l = Text-024.
append s_fieldcatalog to t_fieldcatalog.
clear s_fieldcatalog.
s_fieldcatalog-col_pos = 2.
s_fieldcatalog-fieldname = 'GJAHR'.
s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
s_fieldcatalog-seltext_l = Text-012.
append s_fieldcatalog to t_fieldcatalog.
clear s_fieldcatalog.
s_fieldcatalog-col_pos = 3.
s_fieldcatalog-fieldname = 'PERIO'.
s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
s_fieldcatalog-seltext_l = Text-013.
append s_fieldcatalog to t_fieldcatalog.
clear s_fieldcatalog.
s_fieldcatalog-col_pos = 4.
s_fieldcatalog-fieldname = 'WERKS'.
s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
s_fieldcatalog-seltext_l = Text-025.
append s_fieldcatalog to t_fieldcatalog.
clear s_fieldcatalog.
s_fieldcatalog-col_pos = 5.
s_fieldcatalog-fieldname = 'LIFNR_ND1'.
s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
s_fieldcatalog-seltext_l = Text-014.
append s_fieldcatalog to t_fieldcatalog.
clear s_fieldcatalog.
s_fieldcatalog-col_pos = 6.
s_fieldcatalog-fieldname = 'MISCH_VERH1'.
s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
s_fieldcatalog-seltext_l = Text-015.
append s_fieldcatalog to t_fieldcatalog.
clear s_fieldcatalog.
s_fieldcatalog-col_pos = 7.
s_fieldcatalog-fieldname = 'LIFNR_ND2'.
s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
s_fieldcatalog-seltext_l = Text-016.
append s_fieldcatalog to t_fieldcatalog.
clear s_fieldcatalog.
s_fieldcatalog-col_pos = 8.
s_fieldcatalog-fieldname = 'MISCH_VERH2'.
s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
s_fieldcatalog-seltext_l = Text-017.
append s_fieldcatalog to t_fieldcatalog.
clear s_fieldcatalog.
s_fieldcatalog-col_pos = 9.
s_fieldcatalog-fieldname = 'LIFNR_ND3'.
s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
s_fieldcatalog-seltext_l = Text-018.
append s_fieldcatalog to t_fieldcatalog.
clear s_fieldcatalog.
s_fieldcatalog-col_pos = 10.
s_fieldcatalog-fieldname = 'MISCH_VERH3'.
s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
s_fieldcatalog-seltext_l = Text-019.
append s_fieldcatalog to t_fieldcatalog.
clear s_fieldcatalog.
s_fieldcatalog-col_pos = 11.
s_fieldcatalog-fieldname = 'LIFNR_ND4'.
s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
s_fieldcatalog-seltext_l = Text-020.
append s_fieldcatalog to t_fieldcatalog.
clear s_fieldcatalog.
s_fieldcatalog-col_pos = 12.
s_fieldcatalog-fieldname = 'MISCH_VERH4'.
s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
s_fieldcatalog-seltext_l = Text-021.
append s_fieldcatalog to t_fieldcatalog.
clear s_fieldcatalog.
s_fieldcatalog-col_pos = 13.
s_fieldcatalog-fieldname = 'LIFNR_ND5'.
s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
s_fieldcatalog-seltext_l = Text-022.
append s_fieldcatalog to t_fieldcatalog.
clear s_fieldcatalog.
s_fieldcatalog-col_pos = 14.
s_fieldcatalog-fieldname = 'MISCH_VERH5'.
s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
s_fieldcatalog-seltext_l = Text-023.
append s_fieldcatalog to t_fieldcatalog.
clear s_fieldcatalog.
if g_cnt6 <> '0'.
s_fieldcatalog-col_pos = 14.
s_fieldcatalog-fieldname = 'LIFNR_ND6'.
s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
s_fieldcatalog-NO_OUT = 'X'.
s_fieldcatalog-seltext_l = Text-022.
append s_fieldcatalog to t_fieldcatalog.
clear s_fieldcatalog.
s_fieldcatalog-col_pos = 15.
s_fieldcatalog-fieldname = 'MISCH_VERH6'.
s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
s_fieldcatalog-NO_OUT = 'X'.
s_fieldcatalog-seltext_l = Text-023.
append s_fieldcatalog to t_fieldcatalog.
clear s_fieldcatalog.
ENDIF.
if g_cnt7 <> '0'.
s_fieldcatalog-col_pos = 16.
s_fieldcatalog-fieldname = 'LIFNR_ND7'.
s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
s_fieldcatalog-NO_OUT = 'X'.
s_fieldcatalog-seltext_l = Text-022.
append s_fieldcatalog to t_fieldcatalog.
clear s_fieldcatalog.
s_fieldcatalog-col_pos = 17.
s_fieldcatalog-fieldname = 'MISCH_VERH7'.
s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
s_fieldcatalog-NO_OUT = 'X'.
s_fieldcatalog-seltext_l = Text-023.
append s_fieldcatalog to t_fieldcatalog.
clear s_fieldcatalog.
ENDIF.
if g_cnt8 <> '0'.
s_fieldcatalog-col_pos = 18.
s_fieldcatalog-fieldname = 'LIFNR_ND8'.
s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
s_fieldcatalog-NO_OUT = 'X'.
s_fieldcatalog-seltext_l = Text-022.
append s_fieldcatalog to t_fieldcatalog.
clear s_fieldcatalog.
s_fieldcatalog-col_pos = 19.
s_fieldcatalog-fieldname = 'MISCH_VERH8'.
s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
s_fieldcatalog-NO_OUT = 'X'.
s_fieldcatalog-seltext_l = Text-023.
append s_fieldcatalog to t_fieldcatalog.
clear s_fieldcatalog.
ENDIF.
if g_cnt9 <> '0'.
s_fieldcatalog-col_pos = 20.
s_fieldcatalog-fieldname = 'LIFNR_ND9'.
s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
s_fieldcatalog-NO_OUT = 'X'.
s_fieldcatalog-seltext_l = Text-022.
append s_fieldcatalog to t_fieldcatalog.
clear s_fieldcatalog.
s_fieldcatalog-col_pos = 21.
s_fieldcatalog-fieldname = 'MISCH_VERH9'.
s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
s_fieldcatalog-NO_OUT = 'X'.
s_fieldcatalog-seltext_l = Text-023.
append s_fieldcatalog to t_fieldcatalog.
clear s_fieldcatalog.
ENDIF.
if g_cnt10 <> '0'.
s_fieldcatalog-col_pos = 22.
s_fieldcatalog-fieldname = 'LIFNR_ND10'.
s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
s_fieldcatalog-NO_OUT = 'X'.
s_fieldcatalog-seltext_l = Text-022.
append s_fieldcatalog to t_fieldcatalog.
clear s_fieldcatalog.
s_fieldcatalog-col_pos = 23.
s_fieldcatalog-fieldname = 'MISCH_VERH10'.
s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
s_fieldcatalog-NO_OUT = 'X'.
s_fieldcatalog-seltext_l = Text-023.
append s_fieldcatalog to t_fieldcatalog.
clear s_fieldcatalog.
ENDIF.
if g_cnt11 <> '0'.
s_fieldcatalog-col_pos = 24.
s_fieldcatalog-fieldname = 'LIFNR_ND11'.
s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
s_fieldcatalog-NO_OUT = 'X'.
s_fieldcatalog-seltext_l = Text-022.
append s_fieldcatalog to t_fieldcatalog.
clear s_fieldcatalog.
s_fieldcatalog-col_pos = 25.
s_fieldcatalog-fieldname = 'MISCH_VERH11'.
s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
s_fieldcatalog-NO_OUT = 'X'.
s_fieldcatalog-seltext_l = Text-023.
append s_fieldcatalog to t_fieldcatalog.
clear s_fieldcatalog.
ENDIF.
if g_cnt12 <> '0'.
s_fieldcatalog-col_pos = 26.
s_fieldcatalog-fieldname = 'LIFNR_ND12'.
s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
s_fieldcatalog-NO_OUT = 'X'.
s_fieldcatalog-seltext_l = Text-022.
append s_fieldcatalog to t_fieldcatalog.
clear s_fieldcatalog.
s_fieldcatalog-col_pos = 27.
s_fieldcatalog-fieldname = 'MISCH_VERH12'.
s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
s_fieldcatalog-NO_OUT = 'X'.
s_fieldcatalog-seltext_l = Text-023.
append s_fieldcatalog to t_fieldcatalog.
clear s_fieldcatalog.
ENDIF.
if g_cnt13 <> '0'.
s_fieldcatalog-col_pos = 29.
s_fieldcatalog-fieldname = 'LIFNR_ND13'.
s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
s_fieldcatalog-NO_OUT = 'X'.
s_fieldcatalog-seltext_l = Text-022.
append s_fieldcatalog to t_fieldcatalog.
clear s_fieldcatalog.
s_fieldcatalog-col_pos = 30.
s_fieldcatalog-fieldname = 'MISCH_VERH13'.
s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
s_fieldcatalog-NO_OUT = 'X'.
s_fieldcatalog-seltext_l = Text-023.
append s_fieldcatalog to t_fieldcatalog.
clear s_fieldcatalog.
ENDIF.
ENDFORM. "Layout_FieldCatalog
*& Form get_CKMLMV003
text
Form get_CKMLMV003.
Select WERKS
MATNR
MISCH_VERH
KALNR_BAL
GJAHR
PERIO
MGTYP
from CKMLMV003
into table i_CKMLMV003_out
Where ( MATNR in s_MATNR and
WERKS in s_WERKS and
GJAHR in s_GJAHR and
PERIO in s_PERIO and
MGTYP = p_MGTYP ).
Sort i_CKMLMV003_out by MATNR KALNR_BAL.
ENDFORM. "get_CKMLMV003
*& Form get_CKMLMV001
text
Form get_CKMLMV001.
If Not i_CKMLMV003_out is Initial.
Select MATNR
KALNR
LIFNR_ND
EKORG_ND
from CKMLMV001
into Table i_CKMLMV001_out
for all entries in i_CKMLMV003_out
Where ( KALNR = i_CKMLMV003_out-KALNR_BAL
and WERKS = i_CKMLMV003_out-WERKS
and MATNR = i_CKMLMV003_out-MATNR ).
sort i_CKMLMV001_out by MATNR KALNR.
ENDIF.
ENDFORM. "get_CKMLMV001
*& Form Get_Finaldata
text
Form Get_Finaldata.
Loop at i_CKMLMV001_out into i_CKMLMV001_str.
Loop at i_CKMLMV003_out into i_CKMLMV003_str.
If ( i_CKMLMV001_str-KALNR = i_CKMLMV003_str-KALNR_BAL and i_CKMLMV003_str-MATNR = i_CKMLMV001_str-MATNR ) .
If ( flag = 0 ).
g_plant = i_CKMLMV003_str-WERKS.
g_PurchOrg = i_CKMLMV001_str-EKORG_ND.
g_quantstr = i_CKMLMV003_str-MGTYP.
flag = 1.
ENDIF.
Move i_CKMLMV003_str-MATNR to i_Final_str-MATNR.
Move i_CKMLMV003_str-WERKS to i_Final_str-WERKS.
Move i_CKMLMV003_str-GJAHR to i_Final_str-GJAHR.
Move i_CKMLMV003_str-PERIO to i_Final_str-PERIO.
Move i_CKMLMV003_str-MISCH_VERH to i_Final_str-MISCH_VERH1.
Move i_CKMLMV001_str-LIFNR_ND to i_Final_str-LIFNR_ND1.
Move-Corresponding i_CKMLMV003_str to i_CKMLMV003_temp.
Append i_Final_str to i_Final_out.
Clear : i_CKMLMV003_str .
ENDIF.
ENDLOOP.
Clear : i_CKMLMV001_str , i_Final_str , i_CKMLMV003_temp.
ENDLOOP.
Sort i_Final_out by WERKS MATNR GJAHR PERIO .
Loop at i_Final_out into i_Final_str.
if i_Final_str-MATNR = i_Final_str1-MATNR and i_Final_str-GJAHR = i_Final_str1-GJAHR and i_Final_str-PERIO = i_Final_str1-PERIO and i_Final_str-WERKS = i_Final_str1-WERKS.
cnt = cnt + 1.
Case cnt.
When 2.
Move i_Final_str-MISCH_VERH1 to i_Final_str1-MISCH_VERH2.
Move i_Final_str-LIFNR_ND1 to i_Final_str1-LIFNR_ND2.
When 3.
Move i_Final_str-MISCH_VERH1 to i_Final_str1-MISCH_VERH3.
Move i_Final_str-LIFNR_ND1 to i_Final_str1-LIFNR_ND3.
When 4.
Move i_Final_str-MISCH_VERH1 to i_Final_str1-MISCH_VERH4.
Move i_Final_str-LIFNR_ND1 to i_Final_str1-LIFNR_ND4.
When 5.
Move i_Final_str-MISCH_VERH1 to i_Final_str1-MISCH_VERH5.
Move i_Final_str-LIFNR_ND1 to i_Final_str1-LIFNR_ND5.
When 6.
Move i_Final_str-MISCH_VERH1 to i_Final_str1-MISCH_VERH6.
Move i_Final_str-LIFNR_ND1 to i_Final_str1-LIFNR_ND6.
g_cnt6 = 1.
When 7.
Move i_Final_str-MISCH_VERH1 to i_Final_str1-MISCH_VERH7.
Move i_Final_str-LIFNR_ND1 to i_Final_str1-LIFNR_ND7.
g_cnt7 = 1.
When 8.
Move i_Final_str-MISCH_VERH1 to i_Final_str1-MISCH_VERH8.
Move i_Final_str-LIFNR_ND1 to i_Final_str1-LIFNR_ND8.
g_cnt8 = 1.
When 9.
Move i_Final_str-MISCH_VERH1 to i_Final_str1-MISCH_VERH9.
Move i_Final_str-LIFNR_ND1 to i_Final_str1-LIFNR_ND9.
g_cnt9 = 1.
When 10.
Move i_Final_str-MISCH_VERH1 to i_Final_str1-MISCH_VERH10.
Move i_Final_str-LIFNR_ND1 to i_Final_str1-LIFNR_ND10.
g_cnt10 = 1.
When 11.
Move i_Final_str-MISCH_VERH1 to i_Final_str1-MISCH_VERH11.
Move i_Final_str-LIFNR_ND1 to i_Final_str1-LIFNR_ND11.
g_cnt11 = 1.
When 12.
Move i_Final_str-MISCH_VERH1 to i_Final_str1-MISCH_VERH12.
Move i_Final_str-LIFNR_ND1 to i_Final_str1-LIFNR_ND12.
g_cnt12 = 1.
When 13.
Move i_Final_str-MISCH_VERH1 to i_Final_str1-MISCH_VERH13.
Move i_Final_str-LIFNR_ND1 to i_Final_str1-LIFNR_ND13.
g_cnt13 = 1.
ENDCASE.
ELSE.
if cnt GE 1 .
append i_Final_str1 to i_Final_out1.
Clear : i_Final_str1.
ENDIF.
Move-Corresponding i_Final_str to i_Final_str1.
cnt = 0.
cnt = cnt + 1.
ENDIF.
Clear : i_Final_str.
Endloop.
append i_Final_str1 to i_Final_out1.
if i_Final_str-MATNR = i_Final_str1-MATNR and i_Final_str-GJAHR = i_Final_str1-GJAHR and i_Final_str-PERIO = i_Final_str1-PERIO .
cnt = cnt + 1.
Case cnt.
When 2.
Move i_Final_str-MISCH_VERH1 to i_Final_str1-MISCH_VERH2.
Move i_Final_str-LIFNR_ND1 to i_Final_str1-LIFNR_ND2.
When 3.
Move i_Final_str-MISCH_VERH1 to i_Final_str1-MISCH_VERH3.
Move i_Final_str-LIFNR_ND1 to i_Final_str1-LIFNR_ND3.
When 4.
Move i_Final_str-MISCH_VERH1 to i_Final_str1-MISCH_VERH4.
Move i_Final_str-LIFNR_ND1 to i_Final_str1-LIFNR_ND4.
When 5.
Move i_Final_str-MISCH_VERH1 to i_Final_str1-MISCH_VERH5.
Move i_Final_str-LIFNR_ND1 to i_Final_str1-LIFNR_ND5.
ENDCASE.
**Move-Corresponding i_Final_str to i_Final_str1.
ELSE.
if cnt GE 1 .
append i_Final_str1 to i_Final_out1.
Clear : i_Final_str1.
ENDIF.
Move-Corresponding i_Final_str to i_Final_str1.
cnt = 0.
cnt = cnt + 1.
ENDIF.
Clear : i_Final_str.
Endloop.
append i_Final_str1 to i_Final_out1.
ENDFORM. "Get_Finaldata
*& Form top_of_page
text
Form top_of_page.
clear t_header.
refresh t_header.
i_header_str-typ = 'H'.
I_header_Str-info = Text-035.
append I_header_str to t_header.
clear I_header_str.
Date
I_header_str-typ = 'S'.
I_header_str-key = Text-036.
CONCATENATE sy-datum+6(2) '.'
sy-datum+4(2) '.'
sy-datum(4) INTO I_header_str-info. "todays date
append I_header_str to t_header.
clear: I_header_str.
i_header_str-typ = 'S'.
I_header_Str-Key = 'Quantity Structure Type :'.
I_header_Str-info = g_QuantStr.
append I_header_str to t_header.
clear I_header_str.
i_header_str-typ = 'S'.
I_header_Str-Key = 'Purchase Org :'.
I_header_Str-info = g_PurchOrg.
append I_header_str to t_header.
clear I_header_str.
i_header_str-typ = 'S'.
I_header_Str-Key = 'Plant :'.
I_header_Str-info = g_Plant.
append I_header_str to t_header.
clear I_header_str.
CLEAR i_line_event_str.
i_line_event_str-name = 'TOP_OF_PAGE'.
APPEND i_line_event_str TO i_events.
call function 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = t_header.
i_logo = 'Z_LOGO'.
ENDFORM. "top_of_page
*& ALVGrid_Final_Display
Form ALVGrid_Final_Display.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = v_repid
i_DEFAULt = c_valx
i_callback_top_of_page = 'TOP_OF_PAGE'
i_Save = c_valx
it_fieldcat = t_fieldcatalog
it_sort = t_sort
it_events = I_events
TABLES
t_outtab = i_final_out1.
ENDFORM. "ALVGrid_Final_Display
*& Form ALVGRID_OO_Display
text
Form ALVGRID_OO_Display.
i_FCAT_str-col_pos = 1.
i_FCAT_str-fieldname = 'MATNR'.
i_FCAT_str-tabname = 'I_FINAL_OUT1'.
i_fcat_str-seltext = 'MATERIAL'.
i_fcat_str-scrtext_m = Text-024.
append i_FCAT_str to i_FCAT.
clear i_FCAT_str.
i_FCAT_str-col_pos = 2.
i_FCAT_str-fieldname = 'GJAHR'.
i_FCAT_str-tabname = 'I_FINAL_OUT1'.
i_fcat_str-scrtext_m = Text-012.
append i_FCAT_str to i_FCAT.
clear i_FCAT_str.
i_FCAT_str-col_pos = 3.
i_FCAT_str-fieldname = 'PERIO'.
i_FCAT_str-tabname = 'I_FINAL_OUT1'.
i_fcat_str-scrtext_m = Text-013.
append i_FCAT_str to i_FCAT.
clear i_FCAT_str.
i_FCAT_str-col_pos = 4.
i_FCAT_str-fieldname = 'WERKS'.
i_FCAT_str-tabname = 'I_FINAL_OUT1'.
i_FCAT_str-scrtext_m = Text-025.
append i_FCAT_str to i_FCAT.
clear i_FCAT_str.
i_FCAT_str-col_pos = 5.
i_FCAT_str-fieldname = 'LIFNR_ND1'.
i_FCAT_str-tabname = 'I_FINAL_OUT1'.
i_fcat_str-scrtext_m = Text-014.
append i_FCAT_str to i_FCAT.
clear i_FCAT_str.
i_FCAT_str-col_pos = 6.
i_FCAT_str-fieldname = 'MISCH_VERH1'.
i_FCAT_str-tabname = 'I_FINAL_OUT1'.
i_FCAT_str-scrtext_m = Text-015.
append i_FCAT_str to i_FCAT.
clear i_FCAT_str.
i_FCAT_str-col_pos = 7.
i_FCAT_str-fieldname = 'LIFNR_ND2'.
i_FCAT_str-tabname = 'I_FINAL_OUT1'.
i_FCAT_str-scrtext_m = Text-016.
append i_FCAT_str to i_FCAT.
clear i_FCAT_str.
i_FCAT_str-col_pos = 8.
i_FCAT_str-fieldname = 'MISCH_VERH2'.
i_FCAT_str-tabname = 'I_FINAL_OUT1'.
i_FCAT_str-scrtext_m = Text-017.
append i_FCAT_str to i_FCAT.
clear i_FCAT_str.
i_FCAT_str-col_pos = 9.
i_FCAT_str-fieldname = 'LIFNR_ND3'.
i_FCAT_str-tabname = 'I_FINAL_OUT1'.
i_FCAT_str-scrtext_m = Text-018.
append i_FCAT_str to i_FCAT.
clear i_FCAT_str.
i_FCAT_str-col_pos = 10.
i_FCAT_str-fieldname = 'MISCH_VERH3'.
i_FCAT_str-tabname = 'I_FINAL_OUT1'.
i_FCAT_str-scrtext_m = Text-019.
append i_FCAT_str to i_FCAT.
clear i_FCAT_str.
i_FCAT_str-col_pos = 11.
i_FCAT_str-fieldname = 'LIFNR_ND4'.
i_FCAT_str-tabname = 'I_FINAL_OUT1'.
i_FCAT_str-scrtext_m = Text-020.
append i_FCAT_str to i_FCAT.
clear i_FCAT_str.
i_FCAT_str-col_pos = 12.
i_FCAT_str-fieldname = 'MISCH_VERH4'.
i_FCAT_str-tabname = 'I_FINAL_OUT1'.
i_FCAT_str-scrtext_m = Text-021.
append i_FCAT_str to i_FCAT.
clear i_FCAT_str.
i_FCAT_str-col_pos = 13.
i_FCAT_str-fieldname = 'LIFNR_ND5'.
i_FCAT_str-tabname = 'I_FINAL_OUT1'.
i_FCAT_str-scrtext_m = Text-022.
append i_FCAT_str to i_FCAT.
clear i_FCAT_str.
i_FCAT_str-col_pos = 14.
i_FCAT_str-fieldname = 'MISCH_VERH5'.
i_FCAT_str-tabname = 'I_FINAL_OUT1'.
i_FCAT_str-scrtext_m = Text-023.
append i_FCAT_str to i_FCAT.
clear i_FCAT_str.
if g_cnt6 <> '0'.
i_FCAT_str-col_pos = 15.
i_FCAT_str-fieldname = 'LIFNR_ND6'.
i_FCAT_str-tabname = 'I_FINAL_OUT1'.
s_fieldcatalog-NO_OUT = 'X'.
i_FCAT_str-scrtext_m = Text-022.
append i_FCAT_str to i_FCAT.
clear i_FCAT_str.
i_FCAT_str-col_pos = 16.
i_FCAT_str-fieldname = 'MISCH_VERH6'.
i_FCAT_str-tabname = 'I_FINAL_OUT1'.
s_fieldcatalog-NO_OUT = 'X'.
i_FCAT_str-scrtext_m = Text-023.
append i_FCAT_str to i_FCAT.
clear i_FCAT_str.
ENDIF.
*if not grid1 is Initial.
If sy-SUBRC = 0.
Call Method grid1->set_table_for_first_display
CHANGING
it_outtab = i_final_out1[]
it_fieldcatalog = I_FCAT
EXCEPTIONS
Invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
Others = 4.
If sy-subrc <> 0.
ENDIF.
CALL METHOD G_DYNDOC_ID->INITIALIZE_DOCUMENT
EXPORTING
BACKGROUND_COLOR = CL_DD_AREA=>COL_TEXTAREA.
Processing events <br />
CALL METHOD GRID1->LIST_PROCESSING_EVENTS
EXPORTING
I_EVENT_NAME = 'TOP_OF_PAGE'
I_DYNDOC_ID = G_DYNDOC_ID.
Call Method grid2->set_table_for_first_display
CHANGING
it_outtab = i_final_out1[]
it_fieldcatalog = I_FCAT
EXCEPTIONS
Invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
Others = 4.
If sy-subrc <> 0.
ENDIF.
ENDIF.
ENDIF.
Endform. "ALVGRID_OO_Display
Form EVENT_TOP_OF_PAGE using DG_DYNDOC_ID
TYPE REF TO CL_DD_DOCUMENT.
DATA : DL_TEXT(255) TYPE C.
CALL METHOD DG_DYNDOC_ID->ADD_TEXT
EXPORTING
TEXT = 'Flight Details'
SAP_STYLE = CL_DD_AREA=>HEADING
SAP_FONTSIZE = CL_DD_AREA=>LARGE
SAP_COLOR = CL_DD_AREA=>LIST_HEADING_INT.
Endform.
*& Module STATUS_0101 OUTPUT
text
MODULE STATUS_0101 OUTPUT.
SET PF-STATUS 'xxxxxxxx'.
SET TITLEBAR 'xxx'.
SET PF-STATUS 'STATUS'.
SET TITLEBAR 'TITLE'.
Create Object G_DYNDOC_ID
EXPORTING STYLE = 'ALV_GRID'.
if g_custom_container1 is initial .
create object g_custom_container1
Exporting
Container_name = CCCONTAINER1
Exceptions
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
Others = 5.
Create Object G_SPLITTER
Exporting PARENT = g_custom_container1.
CALL METHOD G_SPLITTER->GET_CONTAINER
EXPORTING
ROW = 1
COLUMN = 1
RECEIVING
CONTAINER = G_PARENT_TOP.
*Assigning the Part 2 to GRID
CALL METHOD G_SPLITTER->GET_CONTAINER
EXPORTING
ROW = 2
COLUMN = 1
RECEIVING
CONTAINER = g_parent_grid.Hi,
Check if any event is triggered from the event handler class, upon selection.
Usually, the events are handled on double click or on hotspot etc.
Regards,
Satish Kanteti -
Error While Creating New Field thru EEWB
Hello CRM Experts,
I have found following Error while adding New Fields through EEWB. Can any one help to analyse and give the solution?
It gives Error Log as- System type OLTP with role DEV is not specified correctly. System type OLTP with role DEV is not specified correctly
Thanks for your reply in advance.Hi Priya,
We are also facing similar error in EEWB. If you have solved this problem, please update thread.
Thanks
Dhanraj -
Error When trying to add new user field to OCHH table
Hi
can you please check the following code ? I am geting an error "Ref count for this object is higher than 0"
Dim RetVal, ErrCode As Integer
Dim ErrMsg As String
Dim oUserFieldsMD As SAPbobsCOM.UserFieldsMD
oUserFieldsMD = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserFields)
' Adding "BPCode" field
'// Setting the Field's properties
oUserFieldsMD.TableName = "OCHH"
oUserFieldsMD.Name = "OBJ"
oUserFieldsMD.Description = "OB Code"
oUserFieldsMD.Type = SAPbobsCOM.BoFieldTypes.db_Alpha
oUserFieldsMD.EditSize = 2
'// Adding the Field to the Table
RetVal = oUserFieldsMD.Add
'// Check for errors
If RetVal <> 0 Then
oCompany.GetLastError(RetVal, ErrMsg)
MsgBox(ErrMsg)
Else
'chkUDOAfter.SetItemChecked(1, True)
MsgBox("Field: '" & oUserFieldsMD.Name & "' was added successfuly to " & oUserFieldsMD.TableName & " Table")
End If
Thanks
GeorgeHi Denilo
Your suggestion did not solve the problem . I want to add that the code works fine with user-tables but not when I try with OCHH
Thanks
George
After alot of search
GC.select
Did the job
Thanks again
Regards
George
Edited by: George Pachakis on Sep 7, 2009 6:51 PM
Edited by: George Pachakis on Sep 7, 2009 6:54 PM -
Getting an error while adding the user in Sharepoint foundation 2010 environment.
Hi,
I am having full control access to SharePoint site. Then i tried add user for that site.
But i am getting following error while adding the user to the site.
An unexpected error has occurred.
Troubleshoot issues with microsoft SharePoint Foundation.
Correlation ID:3035B777-1B7C-4463-B35E-06657B72C2E4
Can you please help me anyone on this.
Thanks,
AshokThis could be any one of a number of things. You need to lookup the Correlation ID in the ULS logs on the SharePoint server. That should provide the additional information necessary to diagnose and solve the problem. Here's a blog post
on how to find the error.
http://habaneroconsulting.com/Blog/Posts/Get_the_Real_SharePoint_Error_using_the_ULS_Logs.aspx#.UvEuffldWik
Paul Stork SharePoint Server MVP
Principal Architect: Blue Chip Consulting Group
Blog: http://dontpapanic.com/blog
Twitter: Follow @pstork
Please remember to mark your question as "answered" if this solves your problem. -
Problem with adding user fields to user table
hi everyone,
i have written code to create user tables and some user fields to that table....
its working fine...
in the code i have some conditions like if the table is already created.. then it should execute the code written for creating table..?
udTables1 = oDICompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserTables)
If udTables1.GetByKey("FA_MASTERDATA") Then
udTables1 = Nothing
Else
udTables1.TableName = "FA_MASTERDATA"
udTables1.TableDescription = "Fixed Assets Master Data"
udTables1.TableType = SAPbobsCOM.BoUTBTableType.bott_MasterData
ret2 = udTables1.Add()
System.Runtime.InteropServices.Marshal.ReleaseComObject(udTables1)
udTables1 = Nothing
GC.Collect()
End If
but how to check the same condition for adding fields????
udfields1 = oDICompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserFields)
'' 1st field
udfields1.TableName = "FA_MASTERDATA"
udfields1.Name = "Alias"
udfields1.Description = "Alias"
udfields1.Type = SAPbobsCOM.BoFieldTypes.db_Alpha
udfields1.EditSize = 20
'''how to write condition to check whether the field is already creatd or not????
ret3 = udfields1.Add()
System.Runtime.InteropServices.Marshal.ReleaseComObject(udfields1)
udfields1 = Nothing
GC.Collect()hi try this..
oUserFieldsMD = muc_ParentAddon.SBO_Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserFields)
'********Adding 1st Field
If Not IsFieldExist("POR1", "PINo") Then
oUserFieldsMD.TableName = "POR1"
oUserFieldsMD.Name = "PINo"
oUserFieldsMD.Description = "Purchase Indent No"
oUserFieldsMD.Type = SAPbobsCOM.BoFieldTypes.db_Alpha
oUserFieldsMD.EditSize = 20
lRetCode = oUserFieldsMD.Add
If lRetCode <> 0 Then
muc_ParentAddon.SBO_Company.GetLastError(lErrCode, sErrMsg)
MsgBox(sErrMsg)
Return False
Exit Function
Else
Fields = True
End If
End If
System.Runtime.InteropServices.Marshal.ReleaseComObject(oUserFieldsMD)
Private Function IsFieldExist(ByVal as_TableName As String, ByVal as_FieldID As String) As Boolean
Dim flag As Boolean
Dim businessObject As SAPbobsCOM.Recordset
Try
businessObject = DirectCast(Me.muc_ParentAddon.SBO_Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset), SAPbobsCOM.Recordset)
businessObject.DoQuery(String.Concat(New String() {"Select * From CUFD Where TableId = '", as_TableName, "' AND AliasID='", as_FieldID, "'"}))
If (businessObject.RecordCount > 0) Then
flag = True
Else
flag = False
End If
Catch exception1 As Exception
Me.muc_ParentAddon.SBO_Application.SetStatusBarMessage(exception1.Message, SAPbouiCOM.BoMessageTime.bmt_Short, True)
End Try
System.Runtime.InteropServices.Marshal.ReleaseComObject(businessObject)
Return flag
End Function
hope it helps
Maybe you are looking for
-
Problems Opening Lightroom File in Photoshop
I am trying to open a file from Lightroom in Photoshop. This worked seamlessly in the previous version (I'm now in 2.4). By choosing Photo/Edit In/Edit In Adobe Photoshop CS4...the file opens in a secondary display. I cannot then open the file in Pho
-
IPhone 5, charger is not charging. Any suggestions? Should i buy a new one?
Hello everybody, Sorry about my English firstly. I got a warning about charger. Not supporting or something like that. I tried to turn the usb port. Last night, it worked, but now it doesnt work anymore. Should i go to the MediaMarkt with my guarante
-
Can one use expanded text or stock paragraphs in Firefox?
There are certain owrds, phrases and email addresses I constantly have to type in. I do you the forms for google, but I need more. Have you come across anything that allows one to store something, and have it expand. For instance, after setting it up
-
Hi gurus Can I have some preconfigured project blueprint with name of reports ( specific to purchasing ) to understand my current assignment more efficiently? Thanks
-
Need Bootable XP Image/Disk from my z61m
I did not receive Win XP installation disks with my z61m. Now I need either the bootable XP system or the XP image to use in a vitual machine partition on a mac computer to run my Window apps...The app is asking for the XP installation disk, so I am