Modification on Application ?

Lisa,

First of all, it's Friday!! so don7t worry.
The answer to your problem lies in your Select Statement:
Select on DOC and not on PYID
right now, you select the Payment ID and therefore sum up the amounts for the whole payment. If yo want the total doc number change your
F0414.Select (PYID only)
to F0414.Select (DOC and PYID)

That should do the trick

Cheers

Philippe


One World B7333 SP16 AS400
 
This is the sample of the print screen in the attachment. If you cannot open the ms word, do tell me.

Best regards;
Lisa
OneWorld XE B733.3
SP 13
Intel NT4-service pack 6A
SQL 7
Service Pack 2
 

Attachments

  • 3-27921-P0413M.doc
    60.5 KB · Views: 186
That's all right, it is consistent with the fact that you do a select on the payment number...
As I just pointed out, you should do a select on the document number (DOC) and the payment ID (in case a Voucher was paid partially in another Payment run).

Cheers

Philippe

One World B7333 SP16 AS400
 
Hello Philippe,

Yahoo!! Its Friday and thanks for your help this P0413M is correctly adding the totals. But....

Just another simple question. The amount payment in the table I see is all in negative value so in the application when Total Payment Amount was printed out for sure its also in negative value. But I notice that for the Payment Amount it has positive value in the application. So is there any function that I can changed the negative to positive or vice versa?

So have a nice weekend!

Have a drink and CHEERS!!

Whew!

Thanks A LOT!



Best regards;
Lisa
OneWorld XE B733.3
SP 13
Intel NT4-service pack 6A
SQL 7
Service Pack 2
 
Hi Lisa and Philippe,

What a cartoon :)))

Lisa,

About negative values:

Check the Display Rule of the Data Item behind your grid column in the Data Dictionary. It is possible that this is only a formatting issue, namly the value is negative but the sign doesn't appear.
If this is the case then you can override the default display rule on your form. Select the column, goto the Properties, press Overrides, select Formatting, enter "CODE" and the appropriate Edit Cde into the second field.

You can find a table about available Edit Codes and their properties in the Appendicies of the Enterprise Riport Writer manual.

Another hint, although off-topic to this thread but hopfully useful:
Check the "On line help in OneWorld [Message#: 25377 ]" thread (post) on the "One World® / XE Tips and Traps" board, how to access On-Line help. Please, check the information in that On-Line help. You will find many brief but useful information there what is not available elswhere (except on the Forum :)))) My suggestion is, go through once on all Event and System Function entry. I hope, you will find this as useful as I did and do.
Maybe this help will give you further suggestions, how to accomplish some tasks.

Regards,

Zoltán

P.S.: The Cartoon must go on (at least on Monady) :)))

B7332 SP11, ESU 4116422, Intel NT4, SQL 7 SP1
(working with B7321, B7331, XE too)
 
Lisa, Zoltan,

Glad to see that things are working in the end.
Lisa, let us know what you found regarding the edit code for the amount...Zoltan will be waiting!

Cheers

Philippe



One World B7333 SP16 AS400
 
Hello Zoltan,

Thanks for your suggestion.

Anyway, from you description on the previous reply, I understand that you are refering to those amount that is negative value but does not print a negative value in the application? Actually its vice versa.

Ok...refering to P0413M, at the Amount Payment column, most of the amount is positive but when I look in the F0414 table I found that the amount is actually in negative and vice versa.
So I was wondering how come the application manage to get the negative value to print in positve? As for my added column, in the logic way is is correct as it will print the negative total if all of the amount for the same doc number is negative. But now I need to get the total to be convert to positive. And vice versa. Is it possible?

Another second thing, I am also doing the same thing on the P43214, and i find that it prints the TOTAL AMOUNT RECEIVED on some lines but not the rest above.
EG:
SUPPLIER REMARK | AMOUNT RECEIVED | TOTAL(ADDED COLUMN)
-----------------------------------------------------------
5542........................200.00....................
5542........................200.00....................
5542........................100.00....................800.00
5542........................300.00....................800.00
1234........................555.00....................555.00

Look at the 2 lines above, it does not print the total in the column but it does add up all the total correctly based on the same VRMK from the F43121.

my data selection is taking AN8 and VRMK as the primary keys. Is it not correct?

In the writed grid line after i put this logic..
GC Total AmountReceived = VA grd_TotalAmountReceived
Insert Grid Row(FC Grid, VA grd_TotalAmountReceived)


Please advice.

Thanks for you information.

Best regards;
Lisa
OneWorld XE B733.3
SP 13
Intel NT4-service pack 6A
SQL 7
Service Pack 2
 
Hi Lisa,

First issue: the sign.
i guess you have to multiply the amount coming from the FetchNext by (-1) each time you read the file. Something like this:
F0414.FetchNext (VA Amount)
VA Amount = VA Amount * (-1)
VA Total = VA Total + VA Amount

For the second issue, your selection seems OK since you have everything on the Grid and the Total is calculated properly.
Check the logic that displays the Total on the Grid (the instruction that assigns VA Total to GC Total Amount)

Cheers

Philippe


One World B7333 SP16 AS400
 
Hello Philippe,

Yes I have done the formula before but funny thing is the data didnt print out anything in the grid. But it should. Only some of the payment number has blank grid where else some comes out the half below but the above line in the grid is blank.

Maybe I am not doing right?

GRID RECORD IS FETCHED..
VA grd_PaymntAmount = "0"
VA grd_TotalPaymntAmount = "0"
If GB DocumentNumber is not equal to BC Document (Voucher, Invoice, etc.) (F0414)
F0414.Open
F0414.Select
F0414.Fetch Next
While SV File_IO_Status is not equal to CO ERROR
VA grd_PaymntAmount = [VA grd_PaymntAmount]*-1 <<<<<<------added
VA grd_TotalPaymntAmount = [VA grd_TotalPaymntAmount]+[VA grd_PaymntAmount]
F0414.Fetch Next
End While
F0414.Close
Else
End If

WRITE GRID LINE_AFTER...
If GB DocumentNumber is not equal to BC Document (Voucher, Invoice, etc.) (F0414)
GC TotalPaymentAmt = VA grd_TotalPaymntAmount
Insert Grid Row(FC Grid, GC TotalPaymentAmt)
Else
VA grd_TotalPaymntAmount = "0"
End If

Please advice . Thanks for your help again.



Best regards;
Lisa
OneWorld XE B733.3
SP 13
Intel NT4-service pack 6A
SQL 7
Service Pack 2
 
Lisa,

On the code you give me, the variable for TotalAmount is reset (to "0") each time you do "Grid Record is fetched"... seems wrong to me.
I am not too familiar with "Write Grid Line - After"... but I would put all the logic in the "Grid Record is Fetched" event.
Could you try that?

Cheers

Philippe



One World B7333 SP16 AS400
 
Hello Philippe,

Thanks for your reply. Well, for the previous matter I have manage to solve it.

Anyway, I tried to apply the same method also to this application P03B102. Where in the Receipt Entry Form, I need to add a TOTAL column for the Payment Amount. Seems like nothing is printed out. Maybe again I was wrong?

Anyway, in the form it uses the F03b13 as the business view and grid is using the F03B14 as the business view.

Below is the code:

VA grd_TransactionPaymntAmount = "0"
0077 VA grd_TotTransactionPaymntAmount = "0"
0078 If GB DocumentNumber is not equal to BC Document (Voucher, Invoice, etc.) (F03B14)
0079 F03B14.Open
0080 F03B14.Select
BC Payment ID (Internal) = TK Payment ID (Internal)
BC Document (Voucher, Invoice, etc.) = TK Document (Voucher, Invoice, etc.)
BC Address Number = TK Address Number
0081 F03B14.Fetch Next
VA grd_TransactionPaymntAmount <- TK Transaction Payment Amount
0082 While SV File_IO_Status is not equal to CO ERROR
0083 VA grd_TotTransactionPaymntAmount = [VA grd_TotTransactionPaymntAmount]+[VA grd_TransactionPaymntAmount]
0084 F03B14.Fetch Next
VA grd_TransactionPaymntAmount <- TK Transaction Payment Amount
0085 End While
0086 GC TotalPayment Amount = VA grd_TotTransactionPaymntAmount
0087 F03B14.Close
0088 Else
0089 End If

Please advice. Thanks a lot.

Best regards;
Lisa
OneWorld XE B733.3
SP 13
Intel NT4-service pack 6A
SQL 7
Service Pack 2
 
Lisa,

What was the solution on the first issue (the one you solved...)? Please, let the forum know.

As for this new one, again, i am not familiar with the application.
First, could you use the Debug Application (in menu GH902) on the application to see if anything gets selected?

Open the debuger, select the "APPL" tab, in the QBE, type in the application name P03B102 and Enter, then double click on the program.
Insert a breakpoint just before your code and run the program.
Then go through the instructions one by one by pressing F10. You can inspect your variables and see how the logic flows.

Hope this helps

Cheers

Philippe

One World B7333 SP16 AS400
 
Phillipe,

Thanks for the suggestion. I will try to do that.

Thank you very much.



Best regards;
Lisa
OneWorld XE B733.3
SP 13
Intel NT4-service pack 6A
SQL 7
Service Pack 2
 
Hello Phillippe,

I need some information on an application = P4314. This application was called from P0411. The thing is I need to total up the Amount to Voucher in the Voucher Match form. Seems like the business view it use is actually a temporary table.

I am confused on trying to figure out which table to use to get the Amount Voucher to insert into that application in order to total up. Can you help me? Or anyone who knows the information of this application pls do help.

Thank you very much \. Have a nice day!

Best regards;
Lisa
OneWorld XE B733.3
SP 13
Intel NT4-service pack 6A
SQL 7
Service Pack 2
 
Hi Lisa,

The Grid on the Voucher Match form uses V4314ZA as the BSVW.
This is based on F4314Z (Voucher match Selection File). So I guess that this is the file you want to use to apply the same logic as what we did on the other applications.

Cheers

Philippe

One World B7333 SP16 AS400
 
Philippe,

Thanks for your information again. Well, actually I know what type of the table that they using. Maybe my explaination is not detail enough. Sorry for the mistakes though.

Anyway, the thing now is that I found that the table that they are using as the business view is actually does not contains any data, so i assume this table might be temporarily table? If like that how can I perform the logic as per what we have discuss earlier on other application?

Please advice. Thanks again for your kind help.

Thank you very much

Best regards;
Lisa
OneWorld XE B733.3
SP 13
Intel NT4-service pack 6A
SQL 7
Service Pack 2
 
Back
Top