Figure 1: Table relationship
Figure 2 : Product Master
Figure 3 : Set type and Attributes
Coding Example
FUNCTION zget_prodexcl_flag.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" REFERENCE(IM_PRODUCT_GUID) TYPE COMT_PRODUCT_GUID
*" EXPORTING
*" REFERENCE(EX_PRODEXCL_FLAG) TYPE FLAG
*"----------------------------------------------------------------------
* Note:
* IMPORTING parameter - product_guid.
DATA: lv_prodinfo_guid TYPE comc_settype-frgtype_guid,
lv_prodexcl TYPE flag.
* Set Type
DATA: lc_prod_info TYPE comc_settype-frgtype_id VALUE 'ZPRODINFO'.
CLEAR: ex_prodexcl_flag.
SELECT SINGLE frgtype_guid INTO lv_prodinfo_guid FROM comc_settype
WHERE frgtype_id EQ lc_prod_info.
IF sy-subrc EQ 0.
* Get attribute of product info set type
SELECT SINGLE b~zz0012
INTO ex_prodexcl_flag
FROM comm_pr_frg_rel AS a
INNER JOIN zprodinfo AS b
ON a~fragment_guid = b~frg_guid
WHERE a~product_guid EQ im_product_guid
AND a~fragment_type EQ lv_prodinfo_guid.
ENDIF.
ENDFUNCTION.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 |