2008 Apr 04 5:52 AM
Hi Experts,
I am layman of this kind of Abap language.Now my job requires to understand these things also.As SD functional Consultant,I need to understand the following things.Can anybody guide me how to understand these kind of stuffs.
FORM KOBED_002.
SY-SUBRC = 4.
IF KOMP-KPOSN NE 0.
CHECK: KOMP-PRSFD CA 'BX'.
CHECK: KOMP-KZNEP = SPACE.
ENDIF.
SY-SUBRC = 0.
ENDFORM.
Prestep
FORM KOBEV_002.
SY-SUBRC = 0.
ENDFORM.
Regards
kumar
2008 Apr 04 6:17 AM
Hello
Structure KOMP deals with the Pricing Communication Item. Below I have beautified the coding a little bit.
By default sy-subrc = 4 meaning that in the calling program this might trigger error handling or abortion of the execution. Or this item is excluded from further processing.
If, however, the item number is not zero (often header entries have item number = 0, i.e. we have a true item)
AND the "Carry out pricing" C ontains A ny 'BX' substring
AND the exclusion indicator is space (i.e. NOT excluded)
then set sy-subrc = 0.
*&---------------------------------------------------------------------*
*& Form KOBED_002
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
FORM kobed_002.
sy-subrc = 4.
IF komp-kposn NE 0. " Condition item number <> 0 (probably no header)
CHECK: komp-prsfd CA 'BX'. " Carry out pricing
CHECK: komp-kznep = space. " Condition exclusion indicator
ENDIF.
sy-subrc = 0.
ENDFORM. "KOBED_002
* Prestep
FORM kobev_002.
sy-subrc = 0.
ENDFORM. "KOBEV_002
Regards
Uwe
Hi Experts,
I am layman of this kind of Abap language.Now my job requires to understand these things also.As SD functional Consultant,I need to understand the following things.Can anybody guide me how to understand these kind of stuffs.
FORM KOBED_002.
SY-SUBRC = 4.
IF KOMP-KPOSN NE 0.
CHECK: KOMP-PRSFD CA 'BX'.
CHECK: KOMP-KZNEP = SPACE.
ENDIF.
SY-SUBRC = 0.
ENDFORM.
Prestep
FORM KOBEV_002.
SY-SUBRC = 0.
ENDFORM.
Regards
kumar
2008 Apr 04 6:17 AM
Hello
Structure KOMP deals with the Pricing Communication Item. Below I have beautified the coding a little bit.
By default sy-subrc = 4 meaning that in the calling program this might trigger error handling or abortion of the execution. Or this item is excluded from further processing.
If, however, the item number is not zero (often header entries have item number = 0, i.e. we have a true item)
AND the "Carry out pricing" C ontains A ny 'BX' substring
AND the exclusion indicator is space (i.e. NOT excluded)
then set sy-subrc = 0.
*&---------------------------------------------------------------------*
*& Form KOBED_002
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
FORM kobed_002.
sy-subrc = 4.
IF komp-kposn NE 0. " Condition item number <> 0 (probably no header)
CHECK: komp-prsfd CA 'BX'. " Carry out pricing
CHECK: komp-kznep = space. " Condition exclusion indicator
ENDIF.
sy-subrc = 0.
ENDFORM. "KOBED_002
* Prestep
FORM kobev_002.
sy-subrc = 0.
ENDFORM. "KOBEV_002
Regards
Uwe
2016 Aug 15 4:21 PM
2016 Aug 15 5:31 PM
2008 Apr 04 6:42 AM
FORM KOBED_002. = This is called by a subroutine starting with perform KOBED_002.
SY-SUBRC = 4. > Indicates a failure in any of the step processed above the statement.
IF KOMP-KPOSN NE 0. > KOMP-KPOSN not equal to zero.
CHECK: KOMP-PRSFD CA 'BX'. if komp-prsfd contains any text having BX.
SY-SUBRC = 0. Indicates a success in any of the step processed above the statement.
ENDFORM.
Revert if you any more doubts.
Award points if helpful.
Regards,
Gowri.
2022 Jan 29 4:49 AM
Es scheint so aber nicht im EHP8 zu funktionieren.lnachweise ==== Weblinks ==
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |