on 05-09-2006 7:33 PM
how to solve this error
Unreachable Statement After Jump Statement EXIT:
PERFORM get_item_category1
TABLES gt_comm_pr_frg_rel
gt_comm_prmat
USING ls_orderadm_i_wrk
CHANGING item_category_group1.
subsequent coding
IF lt_orderadm_i_wrk IS INITIAL.
SELECT SINGLE * FROM comm_pr_frg_rel
INTO lt_comm_pr_frg_rel
WHERE product_guid = ls_orderadm_i_wrk-product.
IF sy-subrc EQ 0.
SELECT SINGLE * FROM comm_prmat
INTO lt_comm_prmat
WHERE frg_guid = lt_comm_pr_frg_rel-fragment_guid.
IF sy-subrc EQ 0.
item_category_group1 = lt_comm_prmat-item_cat_group.
ENDIF.
ENDIF.
ENDIF.
EXIT.
hi
if u put exit in u r program it will terminate ur program and after exit no statement is executed
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What exactly problem are you facing. If you want to terminate the program you can use STOP command also.
Can you please post the full code with exact requirement.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
im getting the error in slin
.....the part of code is as folows
DATA: lt_comm_pr_frg_rel TYPE comm_pr_frg_rel,
lt_comm_prmat TYPE comm_prmat.
DATA item_category_group1 TYPE crmt_item_cat_group.
CLEAR item_category_group1.
Store the data into the global internal tables for the first time.
IF gt_comm_pr_frg_rel IS INITIAL.
SELECT * FROM comm_pr_frg_rel
INTO CORRESPONDING FIELDS OF TABLE gt_comm_pr_frg_rel
FOR ALL ENTRIES IN lt_orderadm_i_wrk
WHERE product_guid = lt_orderadm_i_wrk-product.
IF sy-subrc = 0.
SELECT * FROM comm_prmat
INTO CORRESPONDING FIELDS OF TABLE gt_comm_prmat
FOR ALL ENTRIES IN gt_comm_pr_frg_rel
WHERE frg_guid = gt_comm_pr_frg_rel-fragment_guid.
ENDIF.
ENDIF.
IF lt_orderadm_i_wrk IS INITIAL.
SELECT SINGLE * FROM comm_pr_frg_rel
INTO lt_comm_pr_frg_rel
WHERE product_guid = ls_orderadm_i_wrk-product.
IF sy-subrc EQ 0.
SELECT SINGLE * FROM comm_prmat
INTO lt_comm_prmat
WHERE frg_guid = lt_comm_pr_frg_rel-fragment_guid.
IF sy-subrc EQ 0.
item_category_group1 = lt_comm_prmat-item_cat_group.
ENDIF.
ENDIF.
ENDIF.
EXIT.
Get the Item category
PERFORM get_item_category1
TABLES gt_comm_pr_frg_rel
gt_comm_prmat
USING ls_orderadm_i_wrk
CHANGING item_category_group1.
item_category_group = item_category_group1.
ENDFUNCTION.
*& Form get_item_category
-->LT_COMM_PR_textREL
-->LT_COMM_PRMtext
-->LS_ORDERADMtextRK
-->ITEM_CATEGOtextROUP
----
FORM get_item_category1
TABLES lt_comm_pr_frg_rel STRUCTURE comm_pr_frg_rel
lt_comm_prmat STRUCTURE comm_prmat
USING ls_orderadm_i_wrk TYPE crmt_orderadm_i_wrk
CHANGING item_category_group1 TYPE crmt_item_cat_group.
DATA: ls_comm_pr_frg_rel TYPE comm_pr_frg_rel,
ls_comm_prmat TYPE comm_prmat .
Get item category group of product
LOOP AT lt_comm_pr_frg_rel INTO ls_comm_pr_frg_rel
WHERE product_guid = ls_orderadm_i_wrk-product .
READ TABLE lt_comm_prmat INTO ls_comm_prmat
WITH KEY frg_guid = ls_comm_pr_frg_rel-fragment_guid.
IF sy-subrc = 0.
item_category_group1 = ls_comm_prmat-item_cat_group.
EXIT.
ENDIF.
ENDLOOP.
ENDFORM. "get_item_category
Hi Pex,
The error you see in SLIN may not actually cause problem when you activate it. SLIN will do further check but you should be able to run the program you shown. It just that it does not make sense to do an EXIT without any condition and you have more program logic after that EXIT command. So I think SLIN check for that. But the regular syntax check should pass.
If you look at the piece of code below, you will realize that you will never execute the code that is there after EXIT statement. That is what the extended syntax check is telling you.
EXIT.
<i>
* Get the Item category
PERFORM get_item_category1 TABLES gt_comm_pr_frg_rel
gt_comm_prmat
USING ls_orderadm_i_wrk
CHANGING item_category_group1.
item_category_group = item_category_group1.</i>
The code in italics will never get executed. You will use EXIT if you want to exit the processing of the current processing block, but it will typically be used conditionally. Here you are exiting no matter what.
Srinivas
Message was edited by: Srinivas Adavi
User | Count |
---|---|
84 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.