cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass an internal table to another application

former_member510315
Discoverer
0 Kudos

Hi FPM experts,

I have defined my own Web Dynpro application using the OVP floorplan. Now I want to launch this application from outside and pass an internal table which contains object ids.

I've looked into the IF_FPM_NAVIGATE_TO interface which seems promising: I can pass key/value pairs but only in the form of strings.

Two solutions come to my mind:

- Break the internal table down into key/value pairs, eg. objectid1=<..>&objectid2=<...> etc. (BTW: Is there an upper limit for URL length?)

- Have a global singleton which holds the internal table -> call my Web Dynpro Application -> get internal table from singleton

Both approaches seem pretty dirty to me. Are there other ways?

Thank you very much for your help

Andreas

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Andreas,

why do you think Singleton is dirty? I`ve learned anything else than Singleton ist dirty It would be nice to have an argument for the next discussion.

Cheers

Dieter

former_member510315
Discoverer
0 Kudos

Hi Dieter,

concerning singletons, a series of posts in the Google Testing Blog once made me think about them. For example you can start reading http://misko.hevery.com/2008/08/17/singletons-are-pathological-liars/ or http://googletesting.blogspot.de/2008/08/root-cause-of-singletons.html

In short:

  • Singletons introduce global state and global state is mostly bad. That's why we're preferring local and private variables to public ones if possible.
  • They hide dependencies which makes an application more difficult to understand: They fake simplicity where in reality the dependencies are complex.
  • Additionally those dependencies are tightly coupled which makes unit tests impossible (not that I'm using much of them any of them though).

All in all I'm pretty critical about them but the topic seems to be heavily debated. I've also seen more and more singletons in ABAP recently -- maybe in ABAP those problems are not so serious?

Nevertheless I think it's a code smell to set a global variable (the internal table), call a method (the navigation) and read the global variable from there instead of simply (?) passing it. But if that's not possible, then I'll probably go for it.

Former Member
0 Kudos

Hi Andreas,

thanks for your detailed answer. I have read the articles, too and understand the disadvantages. So next time I can argument

Cheers

Dieter

Former Member
0 Kudos

Hi Andreas,

You may try Memory or INDEX tables to export and import. or if you are using FPM for both applications you can try interface IF_FPM_SHARED_DATA.

Cheers.

San

former_member510315
Discoverer
0 Kudos

Hi San,

thanks for your answer. Unfortunately I'm not calling my application from another Web Dynpro application, so IF_FPM_SHARED_DATA is not an option.

What do you mean with Memory and INDEX tables? How should i use them?

Regards

Andreas

Former Member
0 Kudos

Hi Andreas,

What is your calling application? means is it Webdynpro ABAP application or some other application?

If it is ABAP Application you can follow as below.

Export your internal table:

EXPORT tab = itab

  TO DATABASE demo_indx_table(SQ)

  FROM wa_indx

  ID 'TABLE'.

Import your internal table:

IMPORT tab = itab

  FROM DATABASE demo_indx_table(SQ)

  TO   wa_indx

  ID 'TABLE'.

Same way you can use Memory IDs.

Cheers,

San