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

Trouble with program to find and delete comments

Former Member
0 Likes
546

Subject changed by moderator. Please use meaningful subject in future

hi evryone,

In the code snippet below am trying to compare and delete where i fidn comments. however this doesnt take care of the lines starting with *&, "$$ can someone help me with this ???

  • Compare the objects in the source and destn.

CALL FUNCTION 'SVRS_COMPUTE_DELTA_REPS'

EXPORTING

COMPARE_MODE = 1

IGNORE_CASE_DIFFERENCES = 'X'

TABLES

TEXTTAB_OLD = LT_REPORT_SRC

TEXTTAB_NEW = LT_REPORT_TRGT

TRDIRTAB_OLD = LT_TRDIR_SRC

TRDIRTAB_NEW = LT_TRDIR_TRGT

TRDIR_DELTA = LT_XTRDIR

TEXT_DELTA = LT_DELTA.

  • Delete the lines in delta table, which are comment lines

DELETE LT_DELTA WHERE LINE+0(1) = '*'.

DELETE LT_DELTA WHERE LINE+0(1) = '"'.

Thanks,

Kanthi.

Edited by: Matt on Jan 26, 2009 6:23 PM

Subject changed by moderator. Please use meaningful subject in future

hi evryone,

In the code snippet below am trying to compare and delete where i fidn comments. however this doesnt take care of the lines starting with *&, "$$ can someone help me with this ???

  • Compare the objects in the source and destn.

CALL FUNCTION 'SVRS_COMPUTE_DELTA_REPS'

EXPORTING

COMPARE_MODE = 1

IGNORE_CASE_DIFFERENCES = 'X'

TABLES

TEXTTAB_OLD = LT_REPORT_SRC

TEXTTAB_NEW = LT_REPORT_TRGT

TRDIRTAB_OLD = LT_TRDIR_SRC

TRDIRTAB_NEW = LT_TRDIR_TRGT

TRDIR_DELTA = LT_XTRDIR

TEXT_DELTA = LT_DELTA.

  • Delete the lines in delta table, which are comment lines

DELETE LT_DELTA WHERE LINE+0(1) = '*'.

DELETE LT_DELTA WHERE LINE+0(1) = '"'.

Thanks,

Kanthi.

Edited by: Matt on Jan 26, 2009 6:23 PM

2 REPLIES 2
Read only

Former Member
0 Likes
447

see the below example and write you code...

data : z_acct(18) type c value '0000000101',

like_value(19) type c.

concatenate '%' z_acct into like_value.

SELECT * FROM KNBK INTO CORRESPONDING FIELDS OF l_knbk

WHERE bankn LIKE like_value.

Read only

faisalatsap
Active Contributor
0 Likes
447

Hi, Kanthi

Welcome to SDN,

Please always use appropriate Subject for your query and please read the following SDN Rules of Engagement

[Rules of Engagement |;

Kind Regards,

Faisal