‎2007 Aug 16 4:40 AM
Hi...
what is the use of nodes . how to create that. Please give me the steps.
Regards
Prajwal
‎2007 Aug 16 4:46 AM
‎2007 Aug 16 5:38 AM
HI,
Nodes is a Keyword used in Logical Database.It is Similar to TABLES.Nodes are specially made for data exchange between LDB and ABAP program.
Regards,
Padmam.
‎2007 Aug 16 5:50 AM
‎2007 Aug 16 5:53 AM
Hi,
I already mentioned that it is a keyword used in Logical Database.
The nodes must be structures defined in the ABAP Dictionary or data types from a type group. Normally, these are the structures of database tables which the logical database reads and passes to the user for further evaluation. However, it is also possible, and sometimes useful, to use ABAP Dictionary structures without an underlying database.
Regards,
Padmam.
‎2007 Aug 16 6:03 AM
Hi tried.
its giving error like this "<b>SPFLI" is not a node of the logical database __S. </b> what may be the problem
‎2007 Aug 16 4:41 PM
Hello Prajwal ,
I was thinking that ALV Tree types node.
Okya now i got it ,you need to cevelop one logical database in SE36 Transaction or SLDB Transaction.
Steps creation of Logical database :
LDB Name start with Z* or Y* -> now click on create button.-> enter short description -> click on create button
Here you need to mention structure or database table,when you give table or structure it becomes node.
Here example purpose i am taking the MARA and MAKT Table
Enter Root node name is MARA -> give the description -> enter database table as MARA -> click on create button
Now select MARA -> click on create button
Node name -> MAKT -> description - text table -> hierarchy table as MARA -> database table MAKT-> click on create button
Save it
Note : when you mention nodes here ,it should have parent child relationship,otherwise LDB Will not work
click on selection push button on tool bar
you get pop up window -> click on yes
select Nodes for which field selection are to be generated -> select check box mara table,click on transfer.
You get below code :
SELECT-OPTIONS : s_matnr FOR MARA-MATNR. -> uncommented and used s_matnr
Parameter for search pattern selection (Type SY-LDB_SP):
PARAMETERS p_sp AS SEARCH PATTERN FOR TABLE MARA.
SELECT-OPTIONS :
? FOR MAKT-MATNR,
? FOR MAKT-SPRAS.
Enable DYNAMIC SELECTIONS for selected nodes :
Enable FIELD SELECTION for selected nodes :
SELECTION-SCREEN FIELD SELECTION FOR TABLE MARA.
do not check syntax and just activate it. -> back
Now click on source code :you get pop up window -> click on yes
save and activate the current screen
see the following code ,which is system generated
include DBZSDFTOP . " header
include DBZSDFNXXX . " all system routines -> keep the cursor here and double click
include DBZSDFF001 . " user defined include
You get following code here ->
include DBZSDFN001 . " Node MARA
include DBZSDFN002 . " Node MAKT
include DBZSDFFXXX . " init, PBO, PAI
include DBZSDFSXXX . " search help
Save and activate here.
include DBZSDFN001 . " Node MARA -> keep the cursor on include and double click
You will get following code :
----
Call event GET MARA
----
FORM PUT_MARA.
STATICS FLAG.
IF FLAG = SPACE.
FLAG = 'X'.
Declarations for field selection for node MARA ***
STATICS MARA_FIELDS TYPE RSFS_TAB_FIELDS.
MOVE 'MARA' TO MARA_FIELDS-TABLENAME.
READ TABLE SELECT_FIELDS WITH KEY MARA_FIELDS-TABLENAME
INTO MARA_FIELDS.
ENDIF.
SELECT * INTO CORRESPONDING FIELDS OF -> uncommented and made some changes
MARA " (choose one of them)
FROM MARA
WHERE MATNR IN s_matnr.
PUT MARA.
ENDSELECT.
ENDFORM. "PUT_
----
Authority Check for node MARA
----
FORM AUTHORITYCHECK_MARA.
AUTHORITY-CHECK ...
ENDFORM. "AUTHORITYCHECK_MARA
Save and activate it.
go back
Now keep the cursor on include .. include DBZSDFN002 . " Node MAKT and double click
You get following code
----
Call event GET MAKT
----
FORM PUT_MAKT.
SELECT * FROM MAKT -> i made some changes
INTO MAKT
INTO TABLE ? (choose one!)
WHERE MATNR = MARA-MATNR
AND SPRAS = 'E'.
PUT MAKT.
ENDSELECT.
ENDFORM. "PUT_
----
Authority Check for node MARA
----
FORM AUTHORITYCHECK_MARA.
AUTHORITY-CHECK ...
ENDFORM. "AUTHORITYCHECK_MARA
save and activate it -> go back
Now i am able to use LDB ( ZSDF - I created) in SE38.
goto SE38 Transaction
Create program starting with Z* or Y* -> click on create
enter description and select type is executable program
here you will see logical database -> enter LDB Name ( ZSDF)
Click on SAVE
see the simple code which i written in se38
nodes : mara,
makt.
start-of-selection.
get mara.
write:/ mara-matnr.
Hope you got it
Thanks
Seshu