Not able to pass values to variables in extended Tree class
Hi,
I have a as class that extends from Tree, additionally this
custom class defines
new class level variables as follows:
public class MyTree extends Tree {
public var arrayColl:ArrayCollection;
and i call this tree from mxml as follows:
<customTree:MyTree
arrayColl={list}
xmlns:customTree="../../.*"/>
Though my 'list' collections is not null, when i place an
alert in the constructor of extended tree class
it shows as null.
Please advice.
Thanks,
Lucky
below is the canvas:
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="
http://www.adobe.com/2006/mxml">
<mx:Script>
<![CDATA[
import mx.collections.IViewCursor;
import mx.collections.ArrayCollection;
import com.citi.ascript.TreeData;
import mx.controls.Alert;
import com.citi.ascript.CitiTree;
public var availableTreeDataColl:ArrayCollection;
public var selectedTreeDataColl:ArrayCollection;
public var treeData:TreeData;
public var srcTree:CitiTree;
public var availableTreeDataArray:Array = [{a:1},
{b:2},
{c:3}
public function formTreeData():void {
var tempColl:ArrayCollection = new
ArrayCollection(availableTreeDataArray);
availableTreeDataColl = new ArrayCollection();
for (var i:int=0; i<tempColl.length; i++) {
var tempTreeData:Object = tempColl
treeData = new TreeData();
treeData.a = tempTreeData.a;
treeData.b = tempTreeData.b;
treeData.c = tempTreeData.c;
availableTreeDataColl.addItem(treeData);
]]>
</mx:Script>
<mx:VBox>
<mx:Label text="Drag & Drop the analysis sections
that you would like to include in the report" width="450"
height="20"/>
<mx:HBox id="treeContainer"
creationComplete="formTreeData();">
<customTree:MyTree treeList={availableTreeDataColl} //
here collection becomes null.
</customTree:MyTree>
</mx:HBox>
</mx:VBox>
</mx:Canvas>
The collection of TreeData is iterated in the customTree to
form xml which will act as dataprovider for tree.
and this canvas is added as a child for a panel in my main
application.
Hope this gives an idea.
Thanks,
Lucky
Similar Messages
-
We are not able to pass the presentation variables(date & Date1) to the det
Hi,
We have followed the below link to use the date between prompt and passed the presentation variables in the filter condition of the report criteria.
http://obiee101.blogspot.com/2009/03/obiee-between-dates-prompt.html
But we are not able to pass the presentation variables(date & Date1) to the detail report.
Any suggestions are highly appreciated.
Thanks in Advance
Siva.Yes,I think it wont pass the parameters from one parent report to child report.one thing you can do is put the detailed report on a page in the same dashboard as that of prompt.Put the same between condition on that report also.Give navigation link to this page instead of report.You can hide this page as well so that it will be available only on navigation.
i have not tried it.Give it a try.
Regards,
Sandeep -
Not able to Pass Reference Variables to Deferred task
Hi All,
I am not able to Pass the reference variables to Deferred task, With the following code, I am getting null values (for the passed refs) in Deferred Task.
Code is as:
<Action id='1' name='Set Deferred Task Action' application='com.waveset.session.WorkflowServices'>
<Argument name='op' value='addDeferredTask'/>
<Argument name='type' value='User'/>
<Argument name='name' value='$(empId)'/>
<Argument name='authorized' value='true'/>
<Argument name='task' value='WF_User Deferred Task'/> // Task defination
<Argument name='date'>
<Date>2008-11-19T14:50:18.840Z</Date>
</Argument>
<Argument name='taskDefinition'>
<block trace='true'>
<defvar name='usrObject'> // This is the variable I am passing to 'WF_User Deferred Task'
<new class='com.waveset.object.GenericObject'/>
</defvar>
<invoke name='setAttributes'>
<ref>usrObject</ref>
<map>
<s>accId</s>
<ref>empId</ref>
<s>updStatus</s>
<ref>newStatus</ref>
</map>
</invoke>
</block>
</Argument>
</Action>
<Transition to='End'/>
Please suggest me.
Thanks,
Ravi.yeah, you don't have your usrObject available in the deffered task however all variables that you put inside the usrObject are avialble. Like <ref>accId<ref> and <ref>updStatus</ref>. If you still need them organized hierarchically, you might try to add one more level to the object before passing it to addDefferedTask
<block>
<defvar name='objWrapper'>
<new class='com.waveset.object.GenericObject'/>
</defvar>
<defvar name='usrObject'>
<new class='com.waveset.object.GenericObject'/>
</defvar>
<invoke name='setAttributes'>
<ref>usrObject</ref>
<map>
<s>accId</s>
<s>yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy</s>
<s>updStatus</s>
<s>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</s>
</map>
</invoke>
<invoke name='setAttributes'>
<ref>objWrapper</ref>
<map>
<s>usrObject</s>
<ref>usrObject</ref>
</map>
</invoke>
<ref>objWrapper</ref>
</block>I hope you ve got the idea. Cheerz. -
Not able to find values in LOV of field "Help Desk" of Global contract
Not able to find values in LOV of field "Help Desk" of Global contract defaults.
This value should be coming from resource setup.
Resource is already created.Issue resolved:
The resource should ahve valid Email id in HR People setup -
Not able to pass portal login page with valid credentials using WebDispatch
Hi,
We are implementing SAP BillerDirect Portal. To make BillerDirect Portal available over the internet, we Configured SAP WebDispatcher with SSL termination. We followed the steps mentioned in SAP Help Documentaion for SAP WebDispatcher with SSL termination.
http://help.sap.com/saphelp_nw2004s/helpdata/en/76/6d4fa247d0d647b5bd40745400d873/frameset.htm
We created certificate and send it to CA (TrustCenter CA). We received the CA response and we imported the certificate.
AS mentioned in the help document, we configured the SAP Web Dispatcher profile to support SSL termination
We tried to access our BillerDirect Portal over the internet using below link
https://company.com/bd
We are getting login page, once we enter correct user ID and Password, portal is not loading (not going to next page) portal remains on same login page.
If we enter invalid credentials portal login page is giving u201CUser Authentication Failedu201D error.
If we try to access any portal login pages which brings a pop-up for login, login gets succeeded and we are able to see next pages
Examples
1) https://company.com/bd/admin/xcm/init.do
2) https://company.com/monitoring/SystemInfo
All pages which bring up portal login page without pop-up, not able to pass through portal login screen.
We Tried the ProxyMapping option on Dispatcher using Visual admin. This option also didnu2019t work for us.
Here is the WebDispatcher Profile
SAPSYSTEMNAME = xxx
SAPGLOBALHOST = xxxxx
SAPSYSTEM = 00
INSTANCE_NAME = W00
DIR_CT_RUN = $(DIR_EXE_ROOT)\$(OS_UNICODE)\NTI386
DIR_EXECUTABLE = $(DIR_CT_RUN)
Accesssability of Message Server
rdisp/mshost = hostnameofportalserver with FQDN
ms/http_port = 8101
Configuration for medium scenario
icm/max_conn = 500
icm/max_sockets = 1024
icm/req_queue_len = 500
icm/min_threads = 10
icm/max_threads = 50
mpi/total_size_MB = 80
SAP Web Dispatcher Ports
icm/server_port_0 = PROT=HTTPS,PORT=443
icm/server_port_1 = PROT=HTTP,PORT=80
icm/HTTPS/verify_client = 0
SAP Web Dispatcher Web Administration
icm/HTTP/admin_0 = PREFIX=/sap/wdisp/admin,DOCROOT=D:\usr\sap\xxx\W00\data\icmanroot\admin,AUTHFILE= D:\usr\sap\xxx\SYS\global\security\data\icmauth.txt
Parameters for the SAP Cryptographic Library
ssl/ssl_lib = D:\usr\sap\xxxW00\sapcrypto.dll
ssl/server_pse = D:\usr\sap\xxx\W00\sec\SAPSSLS.pse
ssf/name = D:\usr\sap\xxx\W00\sec\SAPSSLS.pse
ssf/ssfapi_lib = D:\usr\sap\xxx\W00\sapcrypto.dll
sec/libsapsecu = D:\usr\sap\xxx\W00\sapcrypto.dll
wdisp/ssl_cred = D:\usr\sap\xxx\W00\sec\SAPSSLC.pse
Parameters for Using SSL to the backend server
wdisp/ssl_encrypt = 1
wdisp/ssl_auth = 1
wdisp/ssl_cred = D:\usr\sap\xxxW00\sec\SAPSSLC.pse
wdisp/ssl_certhost = hostnameofportalserver with FQDN
wdisp/ssl_ignore_host_mismatch = true
#ICM Parameters
icm/HTTP/j2ee_0 = PREFIX=/, HOST =hostnameofportalserver with FQDN PORT=50000,SPORT=50001, SSLENC=1,TYPE=1, CRED =D:\usr\sap\xxx\W00\sec\SAPSSLC.pse
We also tried below options in WebDispatcher profile but we are getting same problem.
wdisp/add_client_protocol_header = true
wdisp/add_clientprotocol_header = 1
wdisp/ssl_ignore_host_mismatch = true
#ICM Parameters
icm/HTTPS/forward_ccert_as_header = true
icm/HTTPS/trust_client_with_issuer = *
icm/HTTPS/trust_client_with_subject = *
we also tried
wdisp/ssl_encrypt = 0
wdisp/ssl_auth = 0
we also tried
wdisp/ssl_encrypt = 2
wdisp/ssl_auth = 2
We are not able to resolve issue. Please help us on resolving this issue.
Thanks
Praveen' in Host Names is not allowed. Our hosname has '_'.
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/67/be9442572e1231e10000000a1550b0/frameset.htm -
Not able to pass table name as parameter in function
Hi,
i am not able to pass tablename as parameter. I am using below function.
function count_test(tabname varchar2) return number is
l_count number;
begin
select count(*) INTO l_count FROM tabname;
RETURN l_count;
END;You can't do it with static SQL.
The only way is to do it with dynamic SQL:
EXECUTE IMMEDIATE 'select count(*) FROM '|| tabname INTO l_count;
Regards.
Al
Edited by: Alberto Faenza on May 10, 2012 1:44 AM
Mispelling -
** Not able to create Value Mapping Table in Integration Directory
Hi friends,
I am not able to create value mapping entries like below in ID.
Agency : Computer1 Agency : Computer2
Scheme: Country Scheme: CountryCode
Value for Computer1 Value for Computer2
Australia AU
India IN
Austria AU
Note that I have assigned the same country code 'AU' for the Countries 'Australia' & 'Austria'. But, when we assign 'AU' to 'Austria', the system asks question as below:
Value mapping already exists
Australia | AU
Austria | AU
Do you want to delete it from the existing group and assign it to the current group instead?
Continue Cancel
Though choose any of the option, I am not able to assign 'AU' to 'Austria'.
Friends, this is my requirement. How do we solve this ?
Kindly help me.
Kind Regards,
Jeg P.Hi Koen,
I tried this. Its working fine now. Thanks for giving guidance to me. Then, I have another doubt. Suppose if we create 2 sets of VM table, (First Receiver will act as 2nd one how do we achieve this). For Ex:
Set 1:
Source Agency: SYS1 Target Agency: SYS2
Source Scheme: CODE Scheme : DEPT
A HR
B Accts
C Finance
Set 2:
Source Agency: SYS2 Target Agency: SYS3
Source Scheme: DEPT Scheme : GRADE
HR Second
Accts First
Finance First
In this case, I followed the same logic which you said, but I am not able to create. I think the main point is GUID here. If you have any idea, kindly tell me.
Kind Regards,
Jegathees -
Not able to set values in drop down for a table field
Hi All,
I am not able to set values in drop down for a table field. Although I am able to set these values to a stand alone field but its not happening for a particular table field. I am using ABAP web dynpro for coding.
Pls help.
Regards,
BhaskarHi Otto,
Here is the code I am using:
* navigate from <CONTEXT> to <DATASOURCE> via lead selection
lo_nd_datasource = wd_context->get_child_node( name = wd_this->wdctx_datasource ).
* navigate from <DATASOURCE> to <CHANGING_PARAM> via lead selection
lo_nd_changing_param = lo_nd_datasource->get_child_node( name = wd_this->wdctx_changing_param ).
* navigate from <CHANGING_PARAM> to <EDUCATION_TAB> via lead selection
lo_nd_education_tab = lo_nd_changing_param->get_child_node( name = wd_this->wdctx_education_tab ).
node_info = lo_nd_education_tab->get_node_info( ).
REFRESH ddlb_value_set.
DATA: wa_edu_est TYPE t517t.
SELECT * FROM t517t INTO wa_edu_est WHERE sprsL = 'EN'.
s_element-text = wa_edu_est-stext.
s_element-value = wa_edu_est-slart.
APPEND s_element TO ddlb_value_set.
ENDSELECT.
SORT ddlb_value_set BY text.
* Set Value_sets to node_info
node_info->set_attribute_value_set(
name = 'EDU_EST'
value_set = ddlb_value_set ).
Regards,
Bhaskar -
How to pass values to variables in WAD 7.0 using java script
Hi.,
My requirement is based on WAD 7.0.
The sales value has to displayed in WAD using graph with various chart types.
I have created variables for plant and material group in a query.
I have created drop down box for plant with all plants in it, check box for material group and a Submit button in WAD in FORM tag of HTML coding.
Once all the values are set in drop down box, checkbox and if the user clicks on submit button, the values has to captured by the variables for which I have created and the graph has to be aligned to the new values in variables.
Kindly help me how to use java script to get the values from FORM and pass it to variables.
Regards,
SelvaHi Selva,
You do not need to use Javascript for this. Instead you can achieve this by using API Commands in WAD 7.0.
Please configure Action on the ButtonGroup webitem to use 'Commands'.
->Choose Command 'Set Variables Values / SET_VARIABLES_STATE' under Commands for Web Templates
->Set Display Variable Screen setting to OFF
->Choose Query Variable for Plant, Select Variable Type as 'Binding Type', Binding Type as 'Data Provider Selection', Data Provider as the one you have assigned to the Dropdown webitem, Characteristic as 0PLANT or as that assigned to the Dropdown webitem
->Repeat above steps for Query Variable Material Group
Now when you make a selection from the Dropdown webitems, the Chart output will change accordingly. Let me know if this helps.
--Priya -
Not able to access the Date variable in Bex report after SP upgrade
Hell Experts,
We have upgraded the support pack to 27 and after that we are not able to access date variable in Bex report.
We are not able to restrict the Posting date on variable, we are getting the message "Operation failed! No detailed error information from backend available".
Thanks
ChetanHi,
carry out basic checks like RSRV for the field,query ,Infoprovider on which this query is based..
Check whether there is any in consistent value in the posting date..
check whether objects are active correctly..
else serach for SAP note or raise OSS to SAP..
Thanks and regards
Kiran -
Can we pass value of variable in Authorware5.2 to Flash 5
Hi,
I want to pass value of one variable which is in the
Authorware5.2 to Flash 5. Depending on that value i want to
duplicate the Movie clip.
Is it possible and How?
Thanks in advance.I urge you to look at the documentation for the Flash sprite
as it will
answer your question. #property can be a range of values.
Place a Flash sprite, get its properties, click the Options
button,
click Help...
Erik
Jeevan_N_Salunke wrote:
> Hi,
> Using SetSpriteProperty(@"SpriteIconTitle", #property,
value) we can changes
> the properties of Sprite, but I want to pass one value
to Flash 5 i.e. Sprite
> and depending on that value I want to do some
processing.
>
> For Example.
> Suppose Flash file contain Dynamic text box who's
variable name is "my_txt"
> and when i load the Sprite Icon or by clicking on button
displays the Sprite,
> at that time i want to pass some txt to that (my_txt)
variable.
>
> Please suggest me the solution.
>
>
Erik Lord
http://www.capemedia.net
Adobe Community Expert - Authorware
http://www.macromedia.com/support/forums/team_macromedia/
http://www.awaretips.net -
samples, tips, products, faqs, and links!
*Search the A'ware newsgroup archives*
http://groups.google.com/groups?q=macromedia.authorware
*The Blankenship Caveat: Note that direct linking to http
content
through any Authorware icon will likely fail if a proxy
server is present!* -
Not able to Pass header info to Microsoft MapPoint WebService using WLS10
We are passing some Header info to the MapPoint Web Service from our client Web Service which is hosted in Weblogic 10, however we are not sure if the info is getting passed.
The actual soap header which we are trying to postis as below:
<env:Header xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<m:CustomerInfoFindHeader xmlns:m="http://s.mappoint.net/mappoint-30/">
<m:CustomLogEntry>2</m:CustomLogEntry>
</m:CustomerInfoFindHeader>
</env:Header>
We are using the below code snippet for setting the header:
Document doc = null;
try
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setNamespaceAware(true);
doc = factory.newDocumentBuilder().newDocument();
catch(ParserConfigurationException pce)
System.out.println("ERROR -> " + pce.getMessage());
Element header = doc.createElementNS("http://schemas.xmlsoap.org/soap/envelope/", "SOAP-ENV:Header");
Element headerContent = doc.createElementNS("http://s.mappoint.net/mappoint-30/","m:CustomerInfoFindHeader");
Element headerChildContent = doc.createElementNS("http://s.mappoint.net/mappoint-30/", "m:CustomLogEntry");
headerChildContent.appendChild(doc.createTextNode("2"));
headerContent.appendChild(headerChildContent);
header.appendChild(headerContent);
Attr nsAttr = doc.createAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:m");
nsAttr.setValue("http://s.mappoint.net/mappoint-30/");
headerContent.setAttributeNodeNS(nsAttr);
findServiceControl.setOutputHeaders(new Element[] {header});
Here findServiceControl is the Service Control object.
Even if the code is not throwing any error/exception I am not able to see the header portion which invoking the Mappoint Web Service (using the weblogic test client for testing the webservice).
Is there any other methodology for setting the header.
Regards
Sanjeev SinghIf you're not sure the header is being created properly, you should switch to using a javax.xml.transform.stream.StreamSource and javax.xml.transform.dom.DOMResult. For instance:
import java.io.ByteArrayInputStream;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.Transformer;
import javax.xml.transform.dom.DOMResult;
import javax.xml.transform.stream.StreamSource;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
StringBuffer xml = new StringBuffer()
.append("<env:Header ")
.append("xmlns:env=\"http://schemas.xmlsoap.org/soap/envelope/\">")
.append("<m:CustomerInfoFindHeader xmlns:m=\"http://s.mappoint.net/mappoint-30/\">")
.append("<m:CustomLogEntry>2</m:CustomLogEntry>")
.append("</m:CustomerInfoFindHeader>")
.append("</env:Header>);
TransformerFactory xformFactory = TransformerFactory.newInstance();
Transformer transformer = xformFactory.newTransformer();
ByteArrayInputStream bais = new ByteArrayInputStream(xml.toString().getBytes());
DOMResult result = new DOMResult();
transformer.transform(new StreamSource(bais), result);
Document document = (Document)result.getNode();
findServiceControl.setOutputHeaders(new Element[] {document.getDocumentElement()});
If you want to see the SOAP request being sent to the Mappoint Web Service, add the following to the JAVA_OPTIONS environment variable (in the startWebLogic.cmd file), and bounce it:
-Dweblogic.wsee.verbose=*
-Dweblogic.log.RedirectStdoutToServerLogEnabled=true
This will write the SOAP request (and SOAP response) to the server log of the WebLogic Server instance, which the service control is running in. -
Issue while Passing Values to Variable Dynamically in ODI
Hi All,
We are trying to pass values to ODI variable dynamically. The value passed is File path. We are successfully able to achieve this when we are passing the relative path i.e. ‘..\demo\xml’ but while we are trying to pass the absolute path i.e. ‘D:\ODI\oracledi\demo\xml\’ we are getting the below given error in the Load step of the interface..
com.sunopsis.sql.SnpsMissingParametersException: Missing parameter
at com.sunopsis.sql.SnpsQuery.completeHostVariable(SnpsQuery.java)
at com.sunopsis.sql.SnpsQuery.updateExecStatement(SnpsQuery.java)
at com.sunopsis.sql.SnpsQuery.executeQuery(SnpsQuery.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execCollOrders(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSqlC.treatTaskTrt(SnpSessTaskSqlC.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
at com.sunopsis.dwg.cmd.DwgCommandScenario.treatCommand(DwgCommandScenario.java)
at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
at com.sunopsis.dwg.cmd.e.i(e.java)
at com.sunopsis.dwg.cmd.g.y(g.java)
at com.sunopsis.dwg.cmd.e.run(e.java)
at java.lang.Thread.run(Unknown Source)
Googling for the same has yielded the following results :-
• if the file name has : in it then ODI will consider it as a binding variable rather path. .. So try relative path. – Relative Path is working but we need to achieve this by giving absolute path.
• make sure you are using LKM File to SQL rather SQL to SQL. – We have tried by 3 different LKMS—File to SQL, SQL to SQL and SQL to Oracle but the error is same in all.
Any pointers regarding the same will be very helpful.
Thanks In Advance.
Regards,
Abhishek SharmaHi Cezar,
Thanks for the response. The issue here is we are picking this path from a table. We have FILE_PATH column in one database table and in ODI variable we have given SQL query as 'Select FILE_PATH from tablename'. Then we are taking the refresh value of this variable and passing it on to our interface.
If the Path in table is given as relative path it works , else for absolute path it doesnt work. How can we achieve the solution recommended by you in this case. The FILE_PATH value in table may change, so we need to pick the file from whatever path it fetches from the select statement. Hence we cannot hard code it here.
Please suggest.
Thanks Again.
Regards,
Abhishek Sharma -
Report Not able to generate values in output
hi gurus,
i am not able to get the output for this report,pls help me in correcting the code and suggest me a sloution.Urgent...............
*& Report ZRPP006
*& Modification History
*& Change # | By | Date | Purpose of Change
*& C0001 |pradeep.R | 20070629 | Total component request for sop&Copa
*& | | |
*& | | |
report zrpp006 line-size 180 line-count 90
no standard page heading.
Class
*class cl_gui_column_tree definition load.
*class cl_gui_cfw definition load.
*data tree1 type ref to cl_gui_alv_tree.
*data mr_toolbar type ref to cl_gui_toolbar.
Include
*include <icon>.
*include bcalv_toolbar_event_receiver.
*include bcalv_tree_event_receiver.
include zipp007.
selection screen
selection-screen begin of block selscrb with frame title text-s01.
parameters: ra_SOP radiobutton group GRP default 'X',
ra_COPA radiobutton group GRP.
selection-screen end of block selscrb.
Data:pa_m_frm(6) type c,
pa_m_to(6) type c,
pa_y_frm(4) type c,
pa_y_to(4) type c,
ra_mth,
ra_yea,
l_mode.
*parameter: pa_m_frm(6) type c,
pa_m_to(6) type c,
pa_y_frm(4) type c,
pa_y_to(4) type c..
data: so_matnr,
so_matkl,
pa_stprs,
pa_werks ,
pa_vrsio .
selection-screen skip 1.
initialization.
clear: ta_vrsio, ta_type.
refresh: ta_vrsio, ta_type.
*at selection-screen on value-request for pa_vrsio.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'VRSIO'
dynprofield = 'PA_VRSIO'
dynpprog = sy-cprog
dynpnr = sy-dynnr
value_org = 'S'
TABLES
value_tab = ta_vrsio.
Start-of-selection.
if ra_SOP eq 'X'.
submit ZRPP023 via selection-screen and return.
elseif ra_COPA eq 'X'.
submit ZRPP026 via selection-screen and return..
endif.
select * into corresponding fields of table ta_vrsio
from p44v
where gstru = 'S076'.
sort ta_vrsio by vrsio.
delete adjacent duplicates from ta_vrsio.
move 'MONTH' to ta_type-out_type.
append ta_type.
move 'YEAR' to ta_type-out_type.
append ta_type.
at selection-screen output.
if ra_mth = 'X'.
loop at screen.
if screen-name = 'PA_M_FRM'.
screen-active = '1'.
modify screen.
endif.
if screen-name = '%C001007_1000'.
screen-active = '1'.
modify screen.
endif.
if screen-name = '%C002009_1000'.
screen-active = '1'.
modify screen.
endif.
if screen-name = 'PA_M_TO'.
screen-active = '1'.
modify screen.
endif.
if screen-name = '%C003012_1000'.
screen-active = '1'.
modify screen.
endif.
if screen-name = '%C004014_1000'.
screen-active = '1'.
modify screen.
endif.
if screen-name = 'PA_Y_FRM'.
screen-active = '0'.
modify screen.
endif.
if screen-name = '%C005017_1000'.
screen-active = '0'.
modify screen.
endif.
if screen-name = '%C006019_1000'.
screen-active = '0'.
modify screen.
endif.
if screen-name = 'PA_Y_TO'.
screen-active = '0'.
modify screen.
endif.
if screen-name = '%C007022_1000'.
screen-active = '0'.
modify screen.
endif.
if screen-name = '%C008024_1000'.
screen-active = '0'.
modify screen.
endif.
endloop.
elseif ra_yea = 'X'.
loop at screen.
if screen-name = 'PA_M_FRM'.
screen-active = '0'.
modify screen.
endif.
if screen-name = '%C001007_1000'.
screen-active = '0'.
modify screen.
endif.
if screen-name = '%C002009_1000'.
screen-active = '0'.
modify screen.
endif.
if screen-name = 'PA_M_TO'.
screen-active = '0'.
modify screen.
endif.
if screen-name = '%C003012_1000'.
screen-active = '0'.
modify screen.
endif.
if screen-name = '%C004014_1000'.
screen-active = '0'.
modify screen.
endif.
if screen-name = 'PA_Y_FRM'.
screen-active = '1'.
modify screen.
endif.
if screen-name = '%C005017_1000'.
screen-active = '1'.
modify screen.
endif.
if screen-name = '%C006019_1000'.
screen-active = '1'.
modify screen.
endif.
if screen-name = 'PA_Y_TO'.
screen-active = '1'.
modify screen.
endif.
if screen-name = '%C007022_1000'.
screen-active = '1'.
modify screen.
endif.
if screen-name = '%C008024_1000'.
screen-active = '1'.
modify screen.
endif.
endloop.
endif.
End-of-selection.
perform get_header_data.
perform get_top_page.
*& Form display_alv
text
form display_alv.
ALV ***
g_repid = sy-repid.
perform layout_init using gs_layout.
perform eventtab_build using gt_events[].
gs_variant-report = g_repid.
g_save = 'A'.
perform comment_build using gt_list_top_of_page[].
Display monthly report
if ra_mth = 'X' and
pa_m_frm <> 0 and
pa_m_to <> 0.
perform fieldcat_init_mth using gt_fieldcat[].
perform printer_setting using print_set.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_background_id = 'ALV_BACKGROUND'
i_buffer_active = 'X'
i_callback_program = g_repid
i_structure_name = 'ITAB_MSALE'
is_layout = gs_layout
it_fieldcat = gt_fieldcat[]
i_save = g_save
is_variant = gs_variant
it_events = gt_events[]
it_sort = gt_it_sort[]
is_print = print_set
I_SCREEN_START_COLUMN = 0 "Use coordinates for
I_SCREEN_START_LINE = 0 "display as dialog box
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
importing
e_exit_caused_by_caller = g_exit_caused_by_caller
es_exit_caused_by_user = gs_exit_caused_by_user
tables
t_outtab = itab_msale
exceptions
program_error = 1
others = 2.
if sy-subrc = 0.
if g_exit_caused_by_caller = 'X'.
*" Forced Exit by calling program
*" <do_something>.
else.
*" User left list via F3, F12 or F15
if gs_exit_caused_by_user-back = 'X'. "F3
*" <do_something>.
else.
if gs_exit_caused_by_user-exit = 'X'. "F15
*" <do_something>.
else.
if gs_exit_caused_by_user-cancel = 'X'. "F12
*" <do_something>.
else.
*" should not occur!
*" <do_Abnormal_End>.
endif.
endif.
endif.
endif.
else.
"Fatal error callin ALVAXXX(XY) WITH ...
endif.
Display yearly report
elseif ra_yea = 'X' and
pa_y_frm <> 0 and
pa_y_to <> 0.
perform fieldcat_init_yr using gt_fieldcat[].
perform printer_setting using print_set.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_background_id = 'ALV_BACKGROUND'
i_buffer_active = 'X'
i_callback_program = g_repid
i_structure_name = 'ITAB_YSALE'
is_layout = gs_layout
it_fieldcat = gt_fieldcat[]
i_save = g_save
is_variant = gs_variant
it_events = gt_events[]
it_sort = gt_it_sort[]
is_print = print_set
I_SCREEN_START_COLUMN = 0 "Use coordinates for
I_SCREEN_START_LINE = 0 "display as dialog box
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
importing
e_exit_caused_by_caller = g_exit_caused_by_caller
es_exit_caused_by_user = gs_exit_caused_by_user
tables
t_outtab = itab_ysale
exceptions
program_error = 1
others = 2.
if sy-subrc = 0.
if g_exit_caused_by_caller = 'X'.
*" Forced Exit by calling program
*" <do_something>.
else.
*" User left list via F3, F12 or F15
if gs_exit_caused_by_user-back = 'X'. "F3
*" <do_something>.
else.
if gs_exit_caused_by_user-exit = 'X'. "F15
*" <do_something>.
else.
if gs_exit_caused_by_user-cancel = 'X'. "F12
*" <do_something>.
else.
*" should not occur!
*" <do_Abnormal_End>.
endif.
endif.
endif.
endif.
else.
*"Fatal error callin ALV
MESSAGE AXXX(XY) WITH ...
endif.
else.
endif.
endform. "display_alv
*& Form get_top_page
text
form get_top_page.
move 'Total Component Requirement by Sales Forecast' to
gt_list_top_of_page-info.
gt_list_top_of_page-typ = 'H'.
append gt_list_top_of_page.
concatenate 'Plant :' pa_werks
into gt_list_top_of_page-info separated by space.
gt_list_top_of_page-typ = 'S'.
append gt_list_top_of_page.
select single vetxt into tp_vetxt
from p44v
where gstru = 'S076'
and vrsio = pa_vrsio.
concatenate 'Version :' pa_vrsio tp_vetxt
into gt_list_top_of_page-info separated by space.
gt_list_top_of_page-typ = 'S'.
append gt_list_top_of_page.
call function 'DATUMSAUFBEREITUNG'
EXPORTING
idate = sy-datum
IMPORTING
tdat8 = l_date_string
EXCEPTIONS
datfm_ungueltig = 1
datum_ungueltig = 2
others = 3.
concatenate sy-uzeit(2) ':' sy-uzeit2(2) ':' sy-uzeit4(2)
into l_time.
concatenate 'Date/Time :' l_date_string l_time
into gt_list_top_of_page-info separated by space.
gt_list_top_of_page-typ = 'S'.
append gt_list_top_of_page.
endform. "get_top_page
*& Form get_header_data
text
--> p1 text
<-- p2 text
form get_header_data.
select pmnux into ta_mat-matnr
from s076
where pmnux = so_matnr
and wenux = pa_werks
and vrsio = pa_vrsio.
append ta_mat.
clear ta_mat.
endselect.
if sy-subrc = 0.
sort ta_mat by matnr .
delete adjacent duplicates from ta_mat.
loop at ta_mat.
select matnr stlnr stlan stlal
appending corresponding fields of table ta_mat2
from mast
where matnr = ta_mat-matnr
and werks = pa_werks.
endloop.
loop at ta_mat2 into wa_ta_mat.
select stlst bmeng bmein into (tp_stlst,tp_bmeng,tp_bmein)
from stko where stlnr = wa_ta_mat-stlnr
and stlal = wa_ta_mat-stlal.
wa_ta_mat-stlst = tp_stlst.
wa_ta_mat-bmeng = tp_bmeng.
wa_ta_mat-bmein = tp_bmein.
append wa_ta_mat to ta_header.
endselect.
endloop.
perform checking. "checking if monthly or yearly report is being selected
else.
message i003(zwpp001).
endif.
endform. " get_header_data
*& Form checking
text
form checking.
data : date1 like vtbbewe-dbervon,
date2 like vtbbewe-dberbis.
data : emonths like vtbbewe-atage.
data : lv_m_frm(6) type n,
lv_m_to(6) type n,
lv_y_frm(4) type n,
lv_y_to(4) type n.
check if the Display monthly report is being selected *****
if ra_mth = 'X' and
pa_m_frm <> 0 and
pa_m_to <> 0.
check for correct input format
lv_m_frm = pa_m_frm.
lv_m_to = pa_m_to.
if lv_m_frm ge '200000' and lv_m_to ge '200000'.
calculate the months in between
clear date1.
clear date2.
concatenate pa_m_frm '01' into date1.
concatenate pa_m_to '01' into date2.
concatenate pa_m_to '31' into date2.
perform months_calculate using date1 date2 changing emonths.
check if months <= 36.
if emonths <= 36.
perform get_sales.
perform retrieve_bom.
else.
message i000(zwpp001).
exit. " error message
endif.
else.
message i002(zwpp001).
endif.
check if the Display yearly report is being selected *****
elseif ra_yea = 'X' and
pa_y_frm <> 0 and
pa_y_to <> 0.
itab_bom-requantity = lp_s076-absat. "for current year 2006 ."added by pradeep on 4/07/07
itab_bom-requantity = lp_s076-absat + 1. "ie 2007.
itab_bom-requantity = lp_s076-absat + 2. "ie 2008.
check for correct input format
lv_y_frm = pa_y_frm.
lv_y_to = pa_y_to.
if lv_y_frm ge '2000' and lv_y_to ge '2000'.
calculate the months in between
clear date1.
clear date2.
concatenate pa_y_frm '0101' into date1.
concatenate pa_y_to '1201' into date2.
concatenate pa_y_to '1231' into date2.
perform months_calculate using date1 date2 changing emonths.
check if months <= 36.
if emonths <= 36.
perform get_sales.
perform retrieve_bom.
else.
message i001(zwpp001).
exit. " error message
endif.
else.
message i002(zwpp001).
endif.
else.
exit.
endif.
added by pradeep on 04/07/07
if emonths = 4.
itab_bom-requantity = lp_s076-absat * itab_bom-comp_qty / itab_bom-xmeng.
endif.
if emonths = 5.
tp_totalprice = lp_s076-absat * ta_mat-stprs.
endif.
if emonths = 6.
itab_bom-requantity = lp_s076-absat * itab_bom-comp_qty / itab_bom-xmeng.
endif.
if emonths = 7.
tp_totalprice = lp_s076-absat * ta_mat-stprs.
endif.
if emonths = 8.
itab_bom-requantity = lp_s076-absat * itab_bom-comp_qty / itab_bom-xmeng.
endif.
endform. " checking
*& Form get_sales
text
form get_sales.
data: iseq type i,
tp_sales type p decimals 2,
tp_totalprice type p decimals 2,"added by pradeep on 03/07/07
tp_maktx like makt-maktx,
tp_tabix like sy-tabix,
tp_pmnux like s076-pmnux,
seq type i.
data: yr_frm(6) type c,
yr_to(6) type c.
data: year_frm(4) type c,
year_to(4) type c.
data: month1(2) type c,
month12(4) type c.
data: totalsales like zspp003-mth1.
data: yr_index like sy-subrc.
check if the Display monthly report is being selected *****
if ra_mth = 'X' and
pa_m_frm <> 0 and
pa_m_to <> 0.
retrieve months
perform get_months.
select * into corresponding fields of table lp_s076 from s076
where pmnux = so_matnr
and wenux = pa_werks
and vrsio = pa_vrsio
and spmon ge pa_m_frm
and spmon le pa_m_to.
iseq = 1.
seq = 0.
loop at lp_s076.
if sy-tabix = 1.
write : lp_s076-pmnux to tp_pmnux.
endif.
select single maktx into tp_maktx from makt
where matnr = lp_s076-pmnux.
clear wa.
read table ta_s076 into wa with key
matnr = lp_s076-pmnux.
if sy-subrc ne 0.
wa-seq = iseq.
wa-matnr = lp_s076-pmnux.
wa-maktx = tp_maktx.
endif.
move lp_s076-absat to tp_sales.
case lp_s076-spmon.
when t_mth1.
move tp_sales to wa-mth1.
move t_mth1 to wa-sp1.
ind1 = '1'.
when t_mth2.
move tp_sales to wa-mth2.
move t_mth2 to wa-sp2.
ind2 = '1'.
when t_mth3.
move tp_sales to wa-mth3.
move t_mth3 to wa-sp3.
ind3 = '1'.
when t_mth4.
move tp_sales to wa-mth4.
move t_mth4 to wa-sp4.
ind4 = '1'.
when t_mth5.
move tp_sales to wa-mth5.
move t_mth5 to wa-sp5.
ind5 = '1'.
when t_mth6.
move tp_sales to wa-mth6.
move t_mth6 to wa-sp6.
ind6 = '1'.
when t_mth7.
move tp_sales to wa-mth7.
move t_mth7 to wa-sp7.
ind7 = '1'.
when t_mth8.
move tp_sales to wa-mth8.
move t_mth8 to wa-sp8.
ind8 = '1'.
when t_mth9.
move tp_sales to wa-mth9.
move t_mth9 to wa-sp9.
ind9 = '1'.
when t_mth10.
move tp_sales to wa-mth10.
move t_mth10 to wa-sp10.
ind10 = '1'.
when t_mth11.
move tp_sales to wa-mth11.
move t_mth11 to wa-sp11.
ind11 = '1'.
when t_mth12.
move tp_sales to wa-mth12.
move t_mth12 to wa-sp12.
ind12 = '1'.
when t_mth13.
move tp_sales to wa-mth13.
move t_mth13 to wa-sp13.
ind13 = '1'.
when t_mth14.
move tp_sales to wa-mth14.
move t_mth14 to wa-sp14.
ind14 = '1'.
when t_mth15.
move tp_sales to wa-mth15.
move t_mth15 to wa-sp15.
ind15 = '1'.
when t_mth16.
move tp_sales to wa-mth16.
move t_mth16 to wa-sp16.
ind16 = '1'.
when t_mth17.
move tp_sales to wa-mth17.
move t_mth17 to wa-sp17.
ind17 = '1'.
when t_mth18.
move tp_sales to wa-mth18.
move t_mth18 to wa-sp18.
ind18 = '1'.
when t_mth19.
move tp_sales to wa-mth19.
move t_mth19 to wa-sp19.
ind19 = '1'.
when t_mth20.
move tp_sales to wa-mth20.
move t_mth20 to wa-sp20.
ind20 = '1'.
when t_mth21.
move tp_sales to wa-mth21.
move t_mth21 to wa-sp21.
ind21 = '1'.
when t_mth22.
move tp_sales to wa-mth22.
move t_mth22 to wa-sp22.
ind22 = '1'.
when t_mth23.
move tp_sales to wa-mth23.
move t_mth23 to wa-sp23.
ind23 = '1'.
when t_mth24.
move tp_sales to wa-mth24.
move t_mth24 to wa-sp24.
ind24 = '1'.
when t_mth25.
move tp_sales to wa-mth25.
move t_mth25 to wa-sp25.
ind25 = '1'.
when t_mth26.
move tp_sales to wa-mth26.
move t_mth26 to wa-sp26.
ind26 = '1'.
when t_mth27.
move tp_sales to wa-mth27.
move t_mth27 to wa-sp27.
ind27 = '1'.
when t_mth28.
move tp_sales to wa-mth28.
move t_mth28 to wa-sp28.
ind28 = '1'.
when t_mth29.
move tp_sales to wa-mth29.
move t_mth29 to wa-sp29.
ind29 = '1'.
when t_mth30.
move tp_sales to wa-mth30.
move t_mth30 to wa-sp30.
ind30 = '1'.
when t_mth31.
move tp_sales to wa-mth31.
move t_mth31 to wa-sp31.
ind31 = '1'.
when t_mth32.
move tp_sales to wa-mth32.
move t_mth32 to wa-sp32.
ind32 = '1'.
when t_mth33.
move tp_sales to wa-mth33.
move t_mth33 to wa-sp33.
ind33 = '1'.
when t_mth34.
move tp_sales to wa-mth34.
move t_mth34 to wa-sp34.
ind34 = '1'.
when t_mth35.
move tp_sales to wa-mth35.
move t_mth35 to wa-sp35.
ind35 = '1'.
when t_mth36.
move tp_sales to wa-mth36.
move t_mth36 to wa-sp36.
ind36 = '1'.
endcase.
move seq to itab_seq-seq.
append itab_seq.
tp_tabix = sy-tabix.
if sy-subrc = 0.
modify table ta_s076 from wa.
modify ta_s076 from wa index tp_tabix.
if lp_s076-pmnux = tp_pmnux.
seq = seq + 1.
move seq to itab_seq.
append itab_seq.
endif.
else.
append wa to ta_s076.
if lp_s076-pmnux = tp_pmnux.
seq = seq + 1.
move seq to itab_seq.
append itab_seq.
endif.
endif.
iseq = iseq + 1.
endloop. " endloop for lp_s076.
itb_sales[] = ta_s076[].
itb_sales12[] = ta_s076[].
check if the Display yearly report is being selected *****
elseif ra_yea = 'X' and
pa_y_frm <> 0 and
pa_y_to <> 0.
clear year1.
clear year2.
clear year3.
perform get_years.
loop at ta_mat.
loop at ta_yr.
clear yr_index.
yr_index = sy-tabix.
case yr_index.
when '1'.
year1 = ta_yr-year.
when '2'.
year2 = ta_yr-year.
when '3'.
year3 = ta_yr-year.
endcase.
clear yr_frm.
clear yr_to.
year_frm = ta_yr-year.
year_to = ta_yr-year.
month1 = '01'.
month12 = '12'.
concatenate year_frm month1 into yr_frm.
concatenate year_to month12 into yr_to.
select * into corresponding fields of table lp_s076 from s076
where pmnux = ta_mat-matnr
and wenux = pa_werks
and vrsio = pa_vrsio
and spmon ge yr_frm
and spmon le yr_to.
calculate total sales.
totalsales = 0.
loop at lp_s076.
at first.
sum.
totalsales = lp_s076-absat.
endat.
at end of absat."added by pradeep on 4/07/07
sum.
tp_totalprice = lp_s076-absat * ta_mat-stprs.
itab_bom-requantity = lp_s076-absat * itab_bom-comp_qty / itab_bom-xmeng.
endat.
endloop. "endloop for lp_s076
select single maktx into tp_maktx from makt
where matnr = ta_mat-matnr.
read table ta_s076 into wa with key
matnr = ta_mat-matnr.
if sy-subrc ne 0.
wa-matnr = lp_s076-pmnux.
wa-maktx = tp_maktx.
endif.
case yr_index.
when '1'.
move totalsales to wa-sales_y1.
move tp_totalprice to wa-sales_y1."added by pradeep
move ta_yr-year to wa-year1.
ind1 = '1'.
when '2'.
move totalsales to wa-sales_y2.
move tp_totalprice to wa-sales_y2.
move ta_yr-year to wa-year2.
ind2 = '1'.
when '3'.
move totalsales to wa-sales_y3.
move tp_totalprice to wa-sales_y3.
move ta_yr-year to wa-year3.
ind3 = '1'.
endcase.
tp_tabix = sy-tabix.
if sy-subrc = 0.
modify table ta_s076 from wa.
modify ta_s076 from wa index tp_tabix.
else.
append wa to ta_s076.
endif.
endloop. "endloop for ta_yr
endloop. "endloop for ta_mat
itb_sales[] = ta_s076[].
else.
exit.
endif.
endform. "get_sales
*& Form get_months
text
form get_months.
move pa_m_frm to t_mth1.
perform get_next_few_months
using t_mth1 '1'
changing t_mth2.
perform get_next_few_months
using t_mth2 '1'
changing t_mth3.
perform get_next_few_months
using t_mth3 '1'
changing t_mth4.
perform get_next_few_months
using t_mth4 '1'
changing t_mth5.
perform get_next_few_months
using t_mth5 '1'
changing t_mth6.
perform get_next_few_months
using t_mth6 '1'
changing t_mth7.
perform get_next_few_months
using t_mth7 '1'
changing t_mth8.
perform get_next_few_months
using t_mth8 '1'
changing t_mth9.
perform get_next_few_months
using t_mth9 '1'
changing t_mth10.
perform get_next_few_months
using t_mth10 '1'
changing t_mth11.
perform get_next_few_months
using t_mth11 '1'
changing t_mth12.
perform get_next_few_months
using t_mth12 '1'
changing t_mth13.
perform get_next_few_months
using t_mth13 '1'
changing t_mth14.
perform get_next_few_months
using t_mth14 '1'
changing t_mth15.
perform get_next_few_months
using t_mth15 '1'
changing t_mth16.
perform get_next_few_months
using t_mth16 '1'
changing t_mth17.
perform get_next_few_months
using t_mth17 '1'
changing t_mth18.
perform get_next_few_months
using t_mth18 '1'
changing t_mth19.
perform get_next_few_months
using t_mth19 '1'
changing t_mth20.
perform get_next_few_months
using t_mth20 '1'
changing t_mth21.
perform get_next_few_months
using t_mth21 '1'
changing t_mth22.
perform get_next_few_months
using t_mth22 '1'
changing t_mth23.
perform get_next_few_months
using t_mth23 '1'
changing t_mth24.
perform get_next_few_months
using t_mth24 '1'
changing t_mth25.
perform get_next_few_months
using t_mth25 '1'
changing t_mth26.
perform get_next_few_months
using t_mth26 '1'
changing t_mth27.
perform get_next_few_months
using t_mth27 '1'
changing t_mth28.
perform get_next_few_months
using t_mth28 '1'
changing t_mth29.
perform get_next_few_months
using t_mth29 '1'
changing t_mth30.
perform get_next_few_months
using t_mth30 '1'
changing t_mth31.
perform get_next_few_months
using t_mth31 '1'
changing t_mth32.
perform get_next_few_months
using t_mth32 '1'
changing t_mth33.
perform get_next_few_months
using t_mth33 '1'
changing t_mth34.
perform get_next_few_months
using t_mth34 '1'
changing t_mth35.
perform get_next_few_months
using t_mth35 '1'
changing t_mth36.
endform. "get_months
*& Form get_years
text
form get_years.
data : tp_yr_frm(4) type n.
data : tp_yr_to(4) type n.
data : yr_diff(4) type n.
move pa_y_frm to tp_yr_frm.
move pa_y_to to tp_yr_to.
move tp_yr_frm to ta_yr-year.
append ta_yr.
yr_diff = tp_yr_to - tp_yr_frm.
*number of years = 3
if yr_diff = 2.
do 2 times.
tp_yr_frm = tp_yr_frm + 1.
move tp_yr_frm to ta_yr-year.
append ta_yr.
enddo.
*number of years = 2
elseif yr_diff = 1.
tp_yr_frm = tp_yr_frm + 1.
move tp_yr_frm to ta_yr-year.
append ta_yr.
else.
exit.
endif.
endform. "get_years
*& Form get_next_few_months
text
-->LV_CURR_MONTH text
-->LV_MONTHS text
-->LV_TARGET_MTH text
form get_next_few_months using lv_curr_month lv_months
changing lv_target_mth.
data : tp_month_curr like sy-datum,
tp_month_plus like sy-datum.
concatenate lv_curr_month '01' into tp_month_curr.
call function 'SG_PS_ADD_MONTH_TO_DATE'
EXPORTING
months = lv_months
olddate = tp_month_curr
IMPORTING
newdate = tp_month_plus.
move tp_month_plus(6) to lv_target_mth.
endform. " get_months
*& Form months_calculate
text
-->P_DATE1 text
-->P_DATE2 text
<--P_EMONTHS text
form months_calculate using p_date1
p_date2
changing p_emonths.
call function 'FIMA_DAYS_AND_MONTHS_AND_YEARS'
exporting
i_date_from = p_date1
I_KEY_DAY_FROM =
i_date_to = p_date2
I_KEY_DAY_TO =
I_FLG_SEPARATE = ' '
importing
E_DAYS =
e_months = p_emonths.
E_YEARS =
endform. " months_calculate
*& Form retrieve_bom
text
--> p1 text
<-- p2 text
form retrieve_bom .
retrieve BOM components
sort ta_header by matnr.
loop at ta_header where stlan = '1' and stlst = '01'.
tp_bmeng = '1'.
perform get_bom tables ta_stpo using
ta_header-matnr ta_header-werks ta_header-stlan ta_header-stlal tp_bmeng.
requirement quantity calculation for active bom
perform calculation1.
retrieve BOM components for pgm
sort itab_bom2 by idnrk ascending.
delete adjacent duplicates from itab_bom2 comparing matnr idnrk.
loop at itab_bom2. " commented by weihong
tp_stlan = '1'.
tp_stlal = '02'.
perform get_pgm tables ta_stpo12 using
itab_bom2-matnr ta_header-werks tp_stlan tp_stlal.
endloop. " endloop for itab_bom2.(commented by weihong)
requirement quantity calculation for inactive bom
perform calculation2.
refresh : itab_bom1, itab_bom2, itab_pgm, temp_bom1,itab_path.
clear : itab_bom1, itab_bom2, itab_pgm, temp_bom1,itab_path.
endloop. " endloop for ta_header.
**itab_msale itab_ysale
*break-point.
perform display_alv.
endform. "retrieve bom
*& Form get_bom
text
-->LV_MATNR text
-->LV_WERKS text
-->LV_STLAN text
-->LV_STLAL text
form get_bom tables lt_stpo structure stpox
using lv_matnr like mast-matnr
lv_werks like mast-werks
lv_stlan like mast-stlan
lv_stlal like stko-stlal
lv_emeng like stko-bmeng .
data: ta_topmat type cstmat,
tp_dstst like csdata-xfeld,
ta_matcat type cscmat occurs 0,
tp_index like sy-tabix,
tp_stufe like stpox-stufe,
tp_diff like stpox-stufe,
tp_indx like sy-tabix,
tp_date like sy-datum,
lv_stufe like stpox-stufe,
lv_wegxx like stpox-wegxx,
lv_stprs like stpox-stprs,
lv_waers like stpox-waers,
lv_cuky_new like cdpos-cuky_new,
lv_value_new like cdpos-value_new,
lv_index like sy-tabix,
lv_datum like sy-datum,"added by pradeep on 02-07-07
nxt_index like sy-tabix.
added by weihong.
data: tp_mtart like mara-mtart,
tp_matkl like mara-matkl,
tp_stprs like stpox-stprs,
tp_bomlv1 like mast-matnr,
tp_bomlv2 like mast-matnr,
tp_bomlv3 like mast-matnr,
tp_bomlv4 like mast-matnr,
tp_indln type i.
write : lv_matnr to itab_bom1-matnr.
write : lv_matnr to itab_bom2-matnr.
write : lv_matnr to itab_path-matnr.Hi gurus,actually this program selecion screen is linked to ..as
First screen is .Sop
.copa
Again for sop is having a selection screen and in this it is divide based on month and year seperately in two more screens.
same for copa also....
so pls tell me a correct solution where to correct and get values.
Priority is very highhhhhhhhhhhhhh,so pls help me in sorting out this. -
Not able to access parent instance variable in outside of methods in child
Hi,
I am not getting why i am not able to access parent class instance variable outside the child class intance methods.
class Parent
int a;
class Child extends Parent
a = 1; // Here i am getting a compilation error that Syntax error on token "a", VariableDeclaratorId expected after this token
void someMethod()
a = 1; // Here i am not getting any compilation error while accessing parent class variable
}Can any one please let me know exact reason for this and what is the error talks about?
Thanks,
Uday
Edited by: Udaya Shankara Gandhi on Jun 13, 2012 3:30 AMYou can only put assignments or expressions inside methods, constructors or class initializors, or when declaring a variable.
It has nothing to the with Child extending Parent.
class Parent {
int a = 1;
{ a = 1; }
public Parent() {
a = 1;
public void method() {
a = 1;
}
Maybe you are looking for
-
No TV Shows on iTunes??
For the past two days, my iTunes store has TV shows nowhere to be found!! It doesn't list movies or TV Shows, and when I search for one, it finds nothing. Are TV Shows still available for download off iTunes? I think it's an amazing feature, and now
-
Hi and thanks in advance for anyone who can help with any suggestions. I downloaded the new version of firefox a few weeks back. The next day I noticed I could not sign in to my Ebay account. I can go anywhere else on the internet and all my sign in/
-
24" Imac / Bootcamp / Warranty
Hi all, I purchased a 24" Imac from apple on the 25th September 2006. Since its purchase it has never worked with boot camp (windows installs and then crashes when the apple drivers (graphics driver) are installed). I am fully aware that because OS/X
-
Hello, I have a problem with the Url in the HTTP Service <mx:HTTPService id="userRequest" url="http://ispedd.redios.it/iSchoolPDFManagerPortlet/imagepdf.do?idPdf=1&i dPage=0" useProxy="false" method="GET"/> The service should open a PNG image and the
-
Checking what others are upto on my wireless network.
Hi I have a wireless network set-up, using an airport extreme base station (domed type). How can I check what websites other uses are using? Can I restrict other users time limits or websites? Cheers Phil B