Skip to Content
author's profile photo Former Member
Former Member

Syntax check field routine and "naming"

Hi ABAP expert

I have developed a field routine.

I try to "cross-check" and compare the value of a text field which is in table /BI0/TORGUNIT, needed field is TXTSH.

The "comparison" takes place with a key field of another characteristic, ZORG_ABC.

When doing the syntax check following message is given: Das Datenobjekt "SOURCE_FIELDS-/BI0/TORGUNIT-TXTSH" besitzt keine Komponente mit Namen "".

English: The data object "SOURCE_FIELDS-/BI0/TORGUNIT-TXTSH" doesn't have a component with naming "".

Where ist the problem in the coding below?

METHOD compute_ZORG_ABC.

* IMPORTING
* request type rsrequest
* datapackid type rsdatapid
* SOURCE_FIELDS-ORGUNIT TYPE /BI0/OIORGUNIT
* EXPORTING
* RESULT type _ty_s_TG_1-/BIC/ZORG_ABC

DATA:
MONITOR_REC TYPE rsmonitor.

*$*$ begin of routine - insert your code only below this line *-*
... "insert your code here
*-- fill table "MONITOR" with values of structure "MONITOR_REC"
*- to make monitor entries
... "to cancel the update process
* raise exception type CX_RSROUT_ABORT.
... "to skip a record
* raise exception type CX_RSROUT_SKIP_RECORD.
... "to clear target fields
* raise exception type CX_RSROUT_SKIP_VAL.

SELECT SINGLE /BIC/ZORG_ABC "enthält die Buchstaben-Kolonne
FROM /BIC/TZORG_ABC
INTO RESULT
WHERE /BIC/ZORG_ABC EQ SOURCE_FIELDS-/BI0/TORGUNIT-TXTSH.

.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Nov 23, 2012 at 10:56 AM

    Hi

    SOURCE_FIELDS-/BI0/TORGUNIT is the field that is available in the routine. No other field will be available.

    If you want to compare TXTSH of ORGUNIT, you need to first select it based on SOURCE_FIELDS-/BI0/TORGUNIT from ORGUNIT P table and then pass the result in the select query.

    Your code should be something like below.

    DATA: VAR_TXTSH TYPE /BI0/TORGUNIT-TXTSH.

    SELECT SINGLE TXTSH

    FROM /BI0/TORGUNIT

    INTO VAR_TXTSH

    WHERE ORGUNIT EQ SOURCE_FIELDS-ORGUNIT.

    SELECT SINGLE /BIC/ZORG_ABC "enthält die Buchstaben-Kolonne

    FROM /BIC/TZORG_ABC

    INTO RESULT

    WHERE /BIC/ZORG_ABC EQ VAR_TXTSH.

    Regards

    Murthy

    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.