cancel
Showing results for 
Search instead for 
Did you mean: 

Bapi nodes VS custom nodes

Former Member
0 Kudos

Hi all,

I want to be clear on Bapi nodes VS custom node.

Example : I have imported Bapi using Adaptive RFC, and Bapi nodes are there under my context node. Now my doubt is, I can directly use (map) Bapi nodes to UI elements?? or I need to creat new custom nodes under context and transfer the values in Bapi node to my custom nodes and then use the custom nodes??

Even I am using Bapi nodes directly to map to UI elements successfully, some people are suggesting me to "not to use bapi nodes directly, get them into local nodes (custom ones) and then use local nodes".

Could any one tell me what is the difference between these two ways. and what sort of problems I am going to get in future if I directly use Bapi nodes to UI elements.

Thanks In advance

Pradeep

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Pradeep

You can map BAPI Nodes directly to UI Elements Unless you are not changing the table Structure, for viewing the data its ok that is getting the data from table and diplaying.

When you are performing some critical operations like updatiion,Deletion and Insertion its better you create a local node copy all the datas from the BAPI and perform the operation. When you use directly the BAPI the change get reflected in the BAPI table and its become crucial.

use the Code Suggested by T.Suresh For Copying the BAPI record to Local Context

Regards

Chandran

Former Member
0 Kudos

Hi Pradeep,

What ever you are assuming that is perfect.

You've to use like that only.

UI elements directly binding with BAPI Nodes not wrong.

Rgds

SS

Former Member
0 Kudos

Hi,

1)If u use Bapi nodes directly,we cant able to change the values of that bapi.we dont have permission to modify the bapi records.

2)if we copy that bapi node to our custom node we can change the values as we need.

3)creating custom node is better,then only we can some concepts like table filter,table sorter etc.

This is the main difference.....

Former Member
0 Kudos

Is this is only the difference?? So If I no need to change the values of the Bapi output, Then I can use Bapi nodes directly? will there be any more side effects if I directly use bapi nodes?

If possible please give me the sample (example) code to transfer the data from bapi node to custom(local node).

Former Member
0 Kudos

Hello Pradeep,

There is no such of code.

1)Create ModelNode in your view

2)RightClick-->EditContextMapping -->Select BAPI Nodes from Component Controller

Your view happing BAPI nodes data.

If you need any clarification get back to me.

Rgds

-SS

Former Member
0 Kudos

Hi,

1)But compulsory u have to context map between model and component controller

2)For views only u can create cutom nodes

use this code in wdDoInit();

{

IWDNode srcNode = (IWDNode)wdThis.wdGetFlightCompController().wdGetContext().nodeFlight_List();

IWDNode destNode = (IWDNode)wdContext.nodeFlight_Sorted();

WDCopyService.copySubtree(srcNode,destNode);

}

Workout following application,

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/d352a790-0201-0010-5082-b1a...