on 03-29-2007 9:34 PM
Hi all,
I'm having a problem with a RFC that I cannot see how to solve. I'm importing the BAPI_ADDRESSEMPGETDETAILEDLIST to see if the employee has a primary/secondary residence. I'm mapping it in the context, and applying a form template to have the output fields in the View. The schema is simple, if the user has a primary residence it's shown in the overview and he has a button to add a secondary residence (if he wants), the opposite is also true, and if he has one primary and one secondary residence both are shown in different overviews.
Well, the problem appears when he has none. He is supposed to have two buttons to add a primary and secondary Residence, and it's true, but when I try to set the values in the output node of the BAPI it calls an exception because it has no structure. The employee didn't have any residence so the output node is null...
Is there any way to inicialize the structure despite the fact of having no values? Do I have to map private var's to set them if the node built from the bapi is empty?
Thank you in advance for your answers,
Regards.
Ricardo Nascimento.
hi,
yeah you can initialise structure with default values through code. So this code will get executed if the user has no residence.
Or other way round , if you dont want to initialise with default values then you can execute it with wahtever values or no values and if it throws exeption you can catch that and show relevant message in catch block
hope it helps
regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ricardo,
You can acheive this by writting code to check null values.
Or While handling the Exception the control must come to the
catch block ,there you can display any warning messages
by using message manager or call any other methods.
Regards,
Ramganesan K.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ricardo
One way to avoid the problem that you are facing is to have a value node which has structure similar to that of model output node. After execution of model object, copy the output to this value node and then use this value node in your view.
I hope this helps you.
Regards
Kapil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.