on 01-27-2009 10:58 AM
Hi,
I want to create 2 local parameters of type XML with the structure corresponding to -
i) a row of a input table in a BAPI and
ii) the input table itself.
What is the best way to do this - something quick and easy? Thanks.
Regards,
V M.
Hi Venki,
Most of the templates in SDN utilize the technique that Rick is referring to. Download them for examples of how to structure his suggestion.
Regards,
Mike
Edited by: Michael Appleby on Feb 5, 2009 4:56 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have set up the xml parameters and the additional JCo Block (dummy) the way it was explained in one of those sample SDN templates. Of course, the transaction I am working with is a little different from the sample one.
I keep getting the message "[ERROR]: STEP EXCEPTION () : Target XML Node Is Null". I think this is at the item level. Not sure what seems to be wrong.
Regards,
V M.
Jeremy,
I understand what you are saying. Its allowing me to assign the values and the XML links, there is no problem with this part. But, like I said before, it works fine when the XML parameter structure is pre-defined (fixed), but gives a runtime error when I use the assign reference document method.
I think I have spent a lot of time trying to figure out whats wrong. Not successful though. I will just stick to the other transaction thats working. I understand its not the best. Unless one of you guys wanna take a look at my transaction and point out the mistakes.
Appreciate it.
Regards,
V M.
"What is the best way to do this - something quick and easy?"
I wish the "best way" was always "quick and easy".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Resolved successfully.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have you looked at the sample content for download on SDN? There is a 12.0 project available containing all sorts of BAPI interface transactions, as well as an old school 11.5 content zip file.
Your local property can contain the sample xml stub as its default value - this will benefit both design time and runtime usage, but if the format changes then you also have some maintenance to consider because you will have a bit of a disconnect between R/3 and the local property.
Assigning a reference document for the input table itself, by associating the local property with the input table is another more dynamic approach but this only helps you out in the link editor at design time (it will be blank when the transaction is run).
Regards,
Jeremy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I palyed with it a little more. I found the following things -
i) Rolling the mouse over where it says 'Xml <Request>' in the JCo Block displays the Xml script in a pop-up window although it wouldn't let me copy it there.
ii) In the 'Outgoing' section of the link editor of the JCo block, I linked the 'Xml <Request>' to the Xml transaction parameter I created. You can copy the Xml code by clicking on the 'Evaluate' button and of course delete the link later.
Quick and dirty!
Thanks Jeremy.
Regards,
V M.
For everyone: The cut-and-paste approach, while "quick and dirty", does create a potential issue if changes to the RFC/BAPI are made.
An alternative, which is "pretty quick" and "not too dirty":
1. Insert a JCO call action, configure it, but uncheck the "Execute Function" checkbox, so the function will not actually be run.
2. In your case, create two XML Local parameters
3. Insert an Assign action, and copy the appropriate XML from the JCO action to your XML parameters
4. Using the same XPath expression you used in the Assign action, assign a reference document to each of these two Local XML parameters, using the "Link to Other Object Property" option in the assign reference dialog
Now you have XML documents that will be more dynamic when changes occur to the underlying RFC.
Rick
User | Count |
---|---|
11 | |
6 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.