cancel
Showing results for 
Search instead for 
Did you mean: 

Table Input for Web Dynpro Java Application

former_member300754
Participant
0 Kudos

		wdThis
			.wdGetZztest_test002CompController()
			.executeZbapi_Hriq_Out_Tab_Input();

		int n = wdContext.nodeOutput_Out().nodeEt_Hrp1000().size();

		if (n > 0) {
			IPrivateMainView.IIt_Hrp1000Node nodeIn =
				wdContext.nodeZbapi_Hriq_In_Tab_Input().nodeIt_Hrp1000();
			IPrivateMainView.IEt_Hrp1000Node nodeOut =
				wdContext.nodeOutput_Out().nodeEt_Hrp1000();
			Zbapi_Hriq_In_Tab_Input nodeBapi = new Zbapi_Hriq_In_Tab_Input();
			Hrp1000 model = new Hrp1000();

			for (int i = 0; i < n; i++) {
				IPrivateMainView.IEt_Hrp1000Element dataElem =
					nodeOut.getEt_Hrp1000ElementAt(i);
				IPrivateMainView.IIt_Hrp1000Element inElem =
					wdContext.nodeIt_Hrp1000().createIt_Hrp1000Element(model);
				inElem.setBegda(dataElem.getBegda());
				inElem.setEndda(dataElem.getEndda());
				inElem.setLangu(dataElem.getLangu());
				inElem.setObjid(dataElem.getObjid());
				inElem.setOtype(dataElem.getOtype());
				inElem.setPlvar(dataElem.getPlvar());
				inElem.setStext(dataElem.getStext());
				inElem.setShort(dataElem.getShort());
				wdContext
					.nodeZbapi_Hriq_In_Tab_Input()
					.nodeIt_Hrp1000()
					.addElement(
					inElem);
				
			}
		}

		try {
			wdThis
				.wdGetZztest_test002CompController()
				.executeZbapi_Hriq_In_Tab_Input();
		} catch (Exception e) {
			msgMgr.reportWarning("Error occurs");
		}

hi all,

Above is a part of code in a program. I'm trying to make a table input and parse the table to Bapi. Before I execute a Bapi (wdThis.wdGetZztest_test002CompController().executeZbapi_Hriq_In_Tab_Input();), the table has the data inside (i map a node with a display table on web).

After the Bapi is called, it returns Mandatory parameter IT_HRP1000 of method ZBAPI_HRIQ_IN_TAB missing. That means the table input is blank.

Please help me on this. Thanks in advance for your effort.

Regards,

Peerasit

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member300754
Participant
0 Kudos

Firstly, the global node variable has been declared as the following:

Zbapi_Hriq_Get_Recpt_Det_Input detBapi = new Zbapi_Hriq_Get_Recpt_Det_Input();

Then, I loop the data and insert in each subnode

detBapi.addIt_Clrdoc(model);

Lastly, I bind a node

wdContext.nodeZbapi_Hriq_Get_Recpt_Det_Input().bind(detBapi);

====

The solution is binding all the things at the end before execute Bapi. That's it.

: D

Former Member
0 Kudos

Can you first check all the .getXXX? Are they returning any values?

former_member300754
Participant
0 Kudos

Yes, they have the value.

I test by displaying those nodes as the tables on web and the tables show the records.

Former Member
0 Kudos

Can you try setting the value to : currentNodeXXX.xxx

instead of node.xxx..

In this case when you execute, you will be executing with the current working values.

former_member300754
Participant
0 Kudos

In case I define with currentXXX, I cannot use the following statement when I loop a node:

nodeOut.getEt_Hrp1000ElementAt()

Btw at table input node, it has value inside but when i call Bapi, the error msg returns as NO DATA IN TABLE.