SAP for Healthcare Discussions
Foster discussions about patient care, cost reduction, and operational excellence in healthcare organizations using SAP. Join the conversation.
cancel
Showing results for 
Search instead for 
Did you mean: 

PMD: Get the value into table (Clinical Document)

Former Member
0 Kudos

Greetings everyone,

I created a clinical document with the transaction N2T7. I created a document element, "multiple structure (table)" -> avalo_ib

The issue is coding level, I want to access the content of all elements of this structure. During the search, i only found the form v01_mu0510_get_data, but this function depends the document version and i considered that is not correct used this one.


Somebody know other standard function, now I am working with this code:


LOOP AT aux_y000002 WHERE dokar = in_ndoc-dokar

                                        AND doknr = in_ndoc-doknr

                                        AND dokvr <> in_ndoc-dokvr

                                        AND doktl = in_ndoc-doktl.

       READ TABLE avalo_ib WITH KEY r-dokvr = in_ndoc-dokvr

                           r-valo_val1 = aux_y000002901-val1

                           r-valo_val2 = aux_y000002901-val2

                           r-valo_val3 = aux_y000002901-val3

       IF sy-subrc = 0.


       ENDIF.






7 REPLIES 7

vwegert
Active Participant
0 Kudos

Please provide some additional information:

  • Which release and patch level of the component IS_H are you using?
  • Is the document category developed with generator version 2 (set in the header data, enabled for new document categories by default, STRONGLY recommended since generator version 1 is hardly maintained any more!)?

Former Member
0 Kudos

Hello,


We use patch level 26 for SAP IS-H 6.04. I am using generator version 2 to create clinical documents.

I want to perform the following tasks:

- To copy all datas to other table

- To save data before out the document

- To get all datas


For example, to save data, I only found the 01_mu0510_set_data, but it is the same problem that 01_mu0510_get_data.


By other hand, I found that there are temporal tables. Is correct used these temporal tables (tmptab_01_0560 and tmplin_01_0560 ) to copy data or is better used the Y table?


Thanks a lot


vwegert
Active Participant
0 Kudos

If you're on Gen2, you don't access the internal structures you named directly any more. Use the official API (class CL_ISHMED_PMD_SERVICES available throught <pub__service> and the other pub__... and <pub__...>). Unfortunately (and I'm restraining myself there) the only official documentation is Generator Version 2 - i.s.h.med Clinical System - SAP Library, which is less than adequate.

If you want to read the entire table, check the documentation of api__get_value, there are some short-cuts to simplify things. But again, DO NOT access other generated structures directly.

EDIT: There are demo document categories named NXDEMO* available that you may want to check. You can install them using BC-Set ISH_N2_INSTPMDS_DEMO and the PMD transport workbench.

Former Member
0 Kudos

Thanks a lot

I continued to work with a document multiple structure (table) in clinical documents on Gen2. But I'm having problems when read the table. I am using the following code, but does not work.

CALL METHOD <PUB__SERVICE>->API__SET_FOCUS

         EXPORTING

           I_ALIAS = 'VALO_IBRES'

           I_OCC   = 0.

  ld_R_OCC = <pub__service>->API__MAX_OCCURRENCE( i_alias = 'VALO_IBRES' ).

Where 'VALO_IBRES' is the multiple structure. I want to know the number of rows into table, and after I can get the value each row

Perhaps, I don't understand well as works APi_SET_FOCUS()

Thanks

vwegert
Active Participant
0 Kudos

api__max_occurrence will return the number of lines in the table, that should be correct. Unfortunately, since you don't provide an exact description of the problems you're facing, it's hard to be more specific. Be aware that, depending on the release and patch level, you might be able to retrieve the entire table using the pseudo-alias '=VALO_IBRES'.

I'm not certain why you would want to set the dialog focus before counting the number of lines - that is unnecessary (unless there's some hiden objective you didn't specify). However, in the form you pasted above, the call to api__max_occurrence will never be reached. You can't place the dialog cursor "anywhere in the table line", you need to specify the alias of a table column. The way you wrote it, the call to api__set_focus will throw an exception, aborting your form/method.

Former Member
0 Kudos

Thanks,

We use patch level 26 for SAP IS-H 6.04.

You're  right, the call to api_set_focus gave an exception (VALO_IBRES document element no exist). The VALO_IBRES field is the alias of the table, which contains 10 columns. The table is stored into Y000001601. Finally, I deleted the function api__set_focus call, and now I get the number of lines

DATA ld_R_OCC TYPE SYTABIX.

ld_R_OCC = <pub__service>->API__MAX_OCCURRENCE( i_alias = 'VALO_IBRES' ).

On the one hand, I want to make a copy of the internal table in an auxiliar table (is possible to retrieve the entire table with the patch level?). And by other hand, I want to delete duplicate rows.

I want to obtain the entire table, because I need to store the table, and then add more rows to the table knowing the value of the last musek.

Other question, I am using the PERFORM v01_mu0560_set_data call to stored the values into VALO_IBRES table, is correct? This function depends on document version

Thanks for the help

Regards

vwegert
Active Participant
0 Kudos

I don't have that specific patch level available to check. You may want to look for yourself - check whether CL_ISHMED_PMD method API__GET_VALUE contains a line dealing with l_pseudo_ali(1) = '=' - if it does, you can use the syntax I mentioned above. To delete duplicate lines, use api__sort and api__delete_duplicates if applicable. Use api__set_value to change the data - don't ever call tze generated FORM routines.