Skip to Content

How to check name of field?

Hi.. For this question, let's use this sample itab:

DATA: BEGIN OF itab1 OCCURS 0,
		aaa_01,
		bbb_01,
		ccc_01,
		aaa_02,
		bbb_02,
		ccc_02,
	  END OF itab1.

What if I need to check the value of the fields with prefix of 'bbb' only?

How do I determine that substring?

Thank you!

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 31, 2008 at 11:16 AM

    Hi,

    loop at itab1 where aaa_01+0(3) = 'bbb'

    and bbb_01+0(3) = 'bbb'

    and ccc_01+0(3) = 'bbb'

    and aaa_02+0(3) = 'bbb'

    and bbb_02+0(3) = 'bbb'

    and ccc_02+0(3) = 'bbb'.

    this will check all the field's prefixes are bbb or not

    if it is there then it will go other wise no

    endloop.

    regards,

    Venkatesh

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 31, 2008 at 11:20 AM

    Hi,

    Use field symbols for that.

    Check the link below

    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3860358411d1829f0000e829fbfe/frameset.htm

    Regards

    vijai

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.