on 06-19-2013 11:42 PM
I have a Table which is being passed to my context in the ADOBE Form called t_data. I need to be able to count the # of records in this table. I don’t have to display the actual table in this case on the form, I just need the record count and then I will display the record count on the form. If the table itself has to be on the form in order to do this then perhaps I can have the table on the form but just make it invisible and then display the record count. I know the easiest solution would be to do the count in SAP and pass this as a separate context element, but I am hoping to avoid this for other complicated reasons.
And, I need to do this using JavaScript and I don’t know anything about Java. Does someone know how to do this and can you give me an example that this non-java person (me) can understand? thx
Hi Janice,
Instead of doing on the form using Javascript/Formcalc, perhaps do you want to do the checking on number of record in table, under form interface 's Initialize method ? I believed this will be a lot easier and simple.
Add a global variable under Global Data.
Add this code under Code Initialization
CLEAR gv_count.
DESCRIBE TABLE iv_itab LINES gv_count.
In your form, put this code under initialize event(Formcalc, Client script) of subform, that contains your table.
If ( $record.lv_count == 0 )then
this.presence = "hidden"
endif
Hope this helps.
regards,
Xiang Li
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.