Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Text editor in screen painter?

Former Member
0 Likes
566

Hi friends,

I got a problem in text editor in which i am not able to understand the keyword 'ID' my code is like...

&----


*& Form add_new_request

&----


FORM add_new_request.

DATA: maxreq TYPE Yreqno.

SELECT MAX( reqno ) INTO maxreq

FROM zrif.

IF sy-subrc NE 0.

zrif-reqno = 1.

ELSE.

zrif-reqno = maxreq + 1.

ENDIF.

pi_text_key-reqno = ZRIF-reqno.

CLEAR pi_text_key-srtf2.

EXPORT reqtext FROM it_pi_text

TO DATABASE ZRIF(pi) ID pi_text_key.

PERFORM clear_all.

and my DAta declaration code is like.

DATA:

BEGIN OF text_idx,

reqno TYPE yreqno,

srtf2 LIKE ZRIF-srtf2,

END OF text_idx,

pi_text_key like text_idx.

CONSTANTS:

c_pi_relid(2) TYPE c VALUE 'PI',

c_edit_mode TYPE i VALUE 0,

c_read_only TYPE i VALUE 1,

PLease can anyone tell me wht ID refers to.

Thks

Hi friends,

I got a problem in text editor in which i am not able to understand the keyword 'ID' my code is like...

&----


*& Form add_new_request

&----


FORM add_new_request.

DATA: maxreq TYPE Yreqno.

SELECT MAX( reqno ) INTO maxreq

FROM zrif.

IF sy-subrc NE 0.

zrif-reqno = 1.

ELSE.

zrif-reqno = maxreq + 1.

ENDIF.

pi_text_key-reqno = ZRIF-reqno.

CLEAR pi_text_key-srtf2.

EXPORT reqtext FROM it_pi_text

TO DATABASE ZRIF(pi) ID pi_text_key.

PERFORM clear_all.

and my DAta declaration code is like.

DATA:

BEGIN OF text_idx,

reqno TYPE yreqno,

srtf2 LIKE ZRIF-srtf2,

END OF text_idx,

pi_text_key like text_idx.

CONSTANTS:

c_pi_relid(2) TYPE c VALUE 'PI',

c_edit_mode TYPE i VALUE 0,

c_read_only TYPE i VALUE 1,

PLease can anyone tell me wht ID refers to.

Thks

1 REPLY 1
Read only

Former Member
0 Likes
433

Have a read of:

[Saving Data Objects in INDX-Type Databases|http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3c2c358411d1829f0000e829fbfe/content.htm]

as it explains the concept of data stores in SAP that use INDX-style tables... so it looks like your ZRIF table has been defined as one of these and you therefore maintain and read it via export / import commands. If you browse it in SE16 you will be able to see the key values but not the data as this is held in an internal format.

Jonathan