on 07-21-2015 12:28 PM
Hi,
I cant see initialization code in screenshot. Have you written it somewhere ?
Following is the way to write it -
Zcrm_...._Input input = new Zcrm_...._Input();
wdContext.nodeZcrm_...._Input().bind(input);
<then your code>
Also you have set same current elements' values in same node (first line of code)? why?
Whereas Division is set properly.. shouldnt date values also come from your context node ?
Regards,
Amey
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Amy,
My NWDS version is 7.0, in 7.0 is it required to add below code,
Zcrm_...._Input input = new Zcrm_...._Input();
wdContext.nodeZcrm_...._Input().bind(input);
<then your code>
and Iam trying to set default values "from date", "to date" and division value "all" and in component controller I have define exicution of Bapi, see in attachment, kindly suggest where it gets missing.
Regards,
M.Reddy.
Yes MReddY B,
It is required. first line will initialize your BAPI/RFC's model node.
In onActionButton() add these two lines on top and test.
Also I will suggest to set date values using date type attributes separately created in Context node, NOT using model node attributes..
Regards,
Amey
Correct me if I am wrong.. Your inputs for BAPI are these date values and division right ?
If you keep them blank on screen it will pass Null only.. Feed date values on screen and then click on Show data button..
In output node you will get desired values.*Provided that BAPI works at back-end too.
--
Regards,
Amey
Dear Amey,
Now I have set the values as you suggested, Iam able to print same values, but still Iam not getting out put.
see attached screen shots.
and when Iam adding below code, its not getting save.
WDWebResourceType webResType = WDWebResourceType.PDF;
IWDWebResource webResource = WDWebResource.getWebResource(wdContext.nodeZcrm_Customer_Sales_Output().currentZcrm_Customer_Sales_OutputElement().getEt_Pdfdata(), webResType);
String url = "";
try {
url = webResource.getURL();
wdContext.currentContextElement().setPdf_url(url);
} catch (WDURLException e) {
e.printStackTrace();
}//Pdf generation end
Please suggest.
thanks and regards,
M.Reddy
Can you expand rfc model node and send screenshot ?
Try changing Zcrm_Customer_Sales_Output node's singleton property false.
And then you will have to go through element of Zcrm_Customer_Sales_Output node.
e.g. wdContext.currentZcrm_Customer_Sales_OutputElement().currentZcrm_Customer_Sales_OutputElement().getEt_Pdfdata();
if this also doesn't work
Try getResourcePath()
Regards,
Amey
Dear Amey,
In below code is there any thing need to add, please check and suggest.
WDWebResourceType webResType = WDWebResourceType.PDF;
IWDWebResource webResource = WDWebResource.getWebResource(wdContext.currentOutputElement().getEt_Pdfdata(), webResType);
String url = "";
try {
url = webResource.getURL();
wdContext.currentContextElement().setPdf_url(url);
} catch (WDURLException e) {
e.printStackTrace();
}//
Regards,
M.Reddy.
Dear Amey,
Now I am able to display data with one of drop down option,I have used I frame ui element & created two value attributes mapped the same,If we select one of the option it will display the data, but when I select all and other options , process showing running..I have cross checked in backend system to execute with other options, here data is showing,see more details below screeshots.
kindly suggest any thing need to be add in code..
Regards,
M.Reddy
Thanks Amey..
There is not much to display the result.
Thing is displaying result data for some of the option which is having the data in backened system, issue is for all divisions (having the data)and other options(which is not having the data).
I have already binded, see below screen.
Regards,
M.Reddy.
Ho does it give output in ECC for ALL option ?
can you send screenshot of it ?
Also attributes which you have mapped to view from controller can contain only one value at a time
Yous should bind a node having these attributes and make node's collection cardinality 0..n
Attach that node to UI Table in webdynpro view. and check if it comes properly ?
OR
If you can bind Output Node itself to UI Table in view, will give you proper data
Later on that can be exported to PDF.
Regards,
Amey
Hi M.Reddy,
Does ECC gives you PDF in output when division is 'ALL' ? I need that screenshot.
Also can you print value of attribute used for PdfData in WD?
If Whole report is generated in PDF for Division 'ALL' in ECC, then it should display same in WD too.
Seems PDF is not generated.
Regards,
Amey
Dear Amy,
Now we are able to display the data,earlier issue with bapi only.
Now issue is while executing bapi, if net sale is 0 , then its not generating url. in this case from front end (wdj) how we can display message like " No value found " , can you please suggest, I have tried below code, but its not succeed ..
Regards,
M.Reddy
Hello,
It seems after execution of the BAPI, directly you are going to display the data into the PDF format.
After execution of the BAPI, write the
int netSale = wdContent.----.getnetSale()
print the netsalevalue
if (netSale ==0 ) {
“Display data is not found”
}else
{
// write the code for display the data into PDF
}
Hope this is helpful
Regards
Vijay
Hi M.Reddy,
first of all, your setFrom_Date and setTo_Date won't do anything because you assigne it to itself.
Now to your issue. Have you tryed log some information after BAPI execution to see if any values are returned from there? That would be the first thing to check.
Regards,
Tobias
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.