Skip to Content
avatar image
Former Member

SOM Error while using Dynamic Tables

Hi Gurus,

I have created a Adobe form with Dynamic tables and integrated in Webdynpro ABAP.

When I test the form, while opening the form the following error occurs ..

" The SOM Expression '$record.BP_DETAILS' for the dataRef specified on field 'BP_DETAILS' ,resolved to an incompatible node of type 'dataValue'..

After I press ok in the popup error message the Interactive form is displayed and I am able to add rows dynamically .. but the data .. but on submit the data is not passed to the context..

when i change the cardinality of the context from " 0..n" to "1..n" .. this error does not appear.. but while submit only the first row is saved to the context..

Has some one come across this error.. Please let me know how to get the dynamic table data to be passed to webdynpro ..

Thanks and Regards

Sivaraj

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Apr 24, 2008 at 05:40 AM

    Hi

    To show dynamic data in tables using adobe,follow these steps:

    1. Create a value node say DataSource of cardinality 1.n and an other value node of cardinality 0.n which actually contains data.

    2. create an array or use value node to collect data which is to be transferred to adobe.

    3. data can be collected using for loop and create node element inside the loop and set corresponding values of each element.

    4. add this element to value node.(step 3,4 are to be performed under loop)

    5.You can use reverse loop to read and send data from adobe to data base which can be performed under submit button to sap.

    Sample code to send data from dynpro view to adobe

     Collection myRecords = new ArrayList();
     myRecords.clear();
    
     Collection records = new Vector();
    
     IPrivateTestAdobeFormView.INotificationRecordsElement notifRecord = null;
    
     int NUM_RECORDS = 5;
     for (int i = 0; i < NUM_RECORDS; i++)
     {
     IPrivateTestAdobeFormView
    	.INotificationRecordsElement 
    		notifRecordElement = 
    			wdContext
    				.createNotificationRecordsElement();
    
     notifRecordElement.setNotificationNumber("" + i);
     notifRecordElement.setNotificationDesc("Description for " + i);
     myRecords.add(notifRecordElement);
    
     }
    
     wdContext.nodeNotificationRecords().bind(myRecords);
    

    To save data from adobe to sap

     IPublic<your view>.I<your>Node node = wdContext.<your>node();
    	   node.invalidate();
    
    	   int size = wdContext.nodeRFQ_Questions().size();
    	   Zqq_Qid_Ans_Txt newnode;
    	
    	   for (int i = size-1; i >= 0; i--) {
    		   newnode = new Zqq_Qid_Ans_Txt();
    		   String answertext = wdContext.nodeRFQ_Questions().getRFQ_QuestionsElementAt(i).getAnswer_Text();
    		   newnode.setAnswer_Text(answertext);
    		   String questionid = wdContext.nodeRFQ_Questions().getRFQ_QuestionsElementAt(i).getQuestion_Id();
    		   newnode.setQuestion_Id(questionid);
    		   quote.addT_Qid_Anstxt(newnode);
    	   } 
    

    Mandeep Virk

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 24, 2008 at 08:43 AM

    Hi Mandeep Virk,

    Thanks for rour reply.. but I am using Webdynpro ABAP ...

    I get this error while loading form.

    Add comment
    10|10000 characters needed characters exceeded