Pass data from one report to other report using "SUBMIT" - report

I have to pass the user name from one report to another report in ABAP.
I am using the following code.
SUBMIT zpgm_to WITH fld_pgm2 eq fld_pgm1 .
'zpgm_to ' is the report to where i have to pass the value.
'fld_pgm2' is the field in report zpgm_to .
'fld_pgm1' is the field in report zpgm_from which contains the value to be passed.
While i am using debugging i found that the value is not passing to the zpgm_to report.
I could not find where i had done the mistake. If anyone cross this issue before, pls do the needful.

I can' t see a problem in your example code.
If you have a typo in fld_pgm2 and you use an undefined parameter, the syntax check does not report an error.
Please try the extended syntax check:
Program->Check->Extended Syntax Check
Check if External program interfaces is checked.
Run the check. If there is a typo, you get an error ___ is not a parameter or a select option in report ___

Check the definition of fld_pgm2. it must define as PARAMETER ,not Data.

Related

Error while pressing the button " type object "my model" has no attribute "my action" - Odoo 10

I'm working on Odoo 10. When I click on the button, get mentioned error.
I want to convert a contact in partner so I need create a new line in another table with the values I put in the .create(vals).
The following links are some extracts of my code , hope you can help me.
my class : model.py
my view : model_view.xml
my error : server trace back
I don't understand your code at all. You inherit a model called test.res.partner and I don't know if you already created it. That may be the issue.
It could be also the fact that you may no be importing your model.py file if this module inherits another one that you have already created.
In general this message indicates that the method convert_prospect does not exist in the model test.res.partner.
But seeing how you write your view (like using xpath in a view that does not inherit from another one) you should rework your fundamentals.
Ah and don't call that prospect() at the end.

Oracle eText rtf template and Extended Function

I am working on Oracle 11g NACHA eText rtf template and i am facing problems while creating this template as per Bank needs. I need help while using substring extended function in column Originating DFI Identification.
My function is like this: substr(BankAccountNumber,1,8)
But when, I test the template using template viewer i got following erorr:
[112616_130010213][][PROCEDURE] Log Level is changed to PROCEDURE
[112616_130011163][][ERROR] expression: is invalid
Time: 4.706 sec.
FO Formatting failed.
End of Process.
Anyone here can help me with this please ?
The syntax looks correct, try making it uppercase. Check to see if that tag contains any data, and that the datatype is Alpha in the etext template.

How to hide an item on a report?

I did some changes one of the method on accounting report in OpenERP. My problem now is how can i make some item invisible or delete? In particular, I want to hide the "Liability" and its balance on the report.
I tried something like this on get_lines method:
for report in lines:
if report["name"].lower().replace(" ","") == 'liability':
del report["name"]
del report["balance"]
but when i tried to generate Balance sheet report. It says:
(<type 'exceptions.KeyError'>,KeyError('name',), <traceback object at 0x7f6c4c2903f8>)
Any help is much appreciated.
This is an error that raises when you try to access object key that doesn't exist. In your case "name".
Error you have is "logical" error, simply go into debug and see what you get in report variable inside loop.
Moreover, to change report content (and by report I think you mean pdf output right?) you need to override .rml file. I think you are changing report parser here, which is also ok if you know what you are doing.
Here you can find RML documentation: http://www.reportlab.com/docs/rml2pdf-userguide.pdf
So, to sum: to change report output content override or replace parser, to change structure, hide/add fields override existing report (.rml file) or create entirely new report.
Hope it helped :)
This might not be the good (or perhaps the weirdest) solution to the problem but after reading about .rml and i can't still comprehend this is what i did. Instead of trying to delete report["name"] and report["balance"] i just set it's value into a white space. This time it's no longer shown on the report.

Need to make parameter as Read-Only,

In selection-screen, I have one parameter called 'Author' I have called the report using 'Submit' from other report and passed the value to 'Author'. Now I need to make the 'Author' parameter as Read-only. How can I do that?
I used the following code,
LOOP AT SCREEN.
IF SCREEN-NAME = 'author'.
SCREEN-INPUT = '0'.
MODIFY SCREEN.
EXIT.
ENDIF.
ENDLOOP.
But it is not working. Can any one help me in resolving this?
Put your code in the at selection-screen output-event.
Disclaimer: This answer does not answer exactly your question, but perhaps it is an easier solution for your need.
If you need only a parameter for SUBMIT you may use
PARAMETERS AUTHOR NO-DISPLAY.
The parameter will not be visible on selection screen, but it can be used via SUBMIT.
This is not a 'read-only' it is a 'don't show' parameter.

Crystal Report Page header suppress issue

I need to suppress the page header when there are no records in the detail section.I have used
onLastRecord
at page header->section expert->suppress.it works fine but issue is when there is only one record in the detail section.then page header is suppress how can i avoid this?
I think your question requires more detail.
Anyway, based on what I have understood, I would suggest any of these ways to sort out this issue.
Add a count() function formula to the suppress section. Find details here.
Add a condition like OnLastRecord or {GROUP FIELD NAME} <> Next({GROUP FIELD NAME}). Find details here.
Check for IsNull({table.field}) of a non-null field.
Check whether the DisctinctCount of the PK field is null.

Resources