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

VOFM Routine to omit zero values

Hi All,

We have a requirement where if the condition value of a condition type ZXXX is '0.00' at the first access sequence, it should not consider such a pricing record, it should move to the next sequence.

Normal SAP behavior is that a zero condition value is also considered a valid condition record.

This is the code that I have written:

FORM KOBED_907.

IF KONP-KSCHL = 'ZK04'.

IF KONP-LOEVM_KO IS INITIAL AND KONP-KBETR IS INITIAL.

sy-subrc = 4.

ENDIF.

ENDIF.

ENDFORM.

The access sequence is in the attached file.

But this does not choose the right record. The value remains as 0.

Can you please let me know what needs to be changed?

Thanks

Sneha

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 Dec 16, 2014 at 10:40 AM

    Hi Sneha,

    I am unable to understand what you are trying to achieve actually. In code you are setting sy-subrc value as 4. What you will achieve with that?

    Also, KBETR is rate and condition value.

    But this does not choose the right record. The value remains as 0.

    Are you trying to change condition value for KSCHL = 'ZK04'?

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Sneha,

      Setting sy-subrc value as 4 will not help. I am still confused on what do you mean by skip this condition record and go to next. What you want to achieve is still not clear.

      The condition record with 0 value should not be displayed in standard transaction? Instead of checking IF KONP-KSCHL = 'ZK04', check if complete table is available to you in debugging mode and then loop on that table.

  • Posted on Dec 16, 2014 at 05:11 PM

    Hi Sneha,

    Hope it helpful.

    CASE KONP-KSCHL.

    WHEN 'ZK04'.

    IF KONP-LOEVM_KO IS INITIAL AND KONP-KBETR IS INITIAL.

    CONTINUE.

    ENDIF.

    ENDCASE.

    Regards,

    Venkat.

    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.