How To add Attribute Dynamical in Existing Context Node *------------------------------------------------------- * add attribute in existing context node *------------------------------------------------------- data LR_PAR_NODE type ref to IF_WD_CONTEXT_NODE_INFO. data LR_NODE type ref to IF_WD_CONTEXT_NODE_INFO. data LT_ATT type STRING_TABLE. data LR_ATTRIBUTE type WDR_CONTEXT_ATTRIBUTE_INFO. *****to get context node information LR_PAR_NODE = WD_CONTEXT->GET_NODE_INFO( ). * Name of node where you want to add attribute LR_NODE = LR_PAR_NODE->GET_CHILD_NODE( `TEST` ). * get all existing attribute name LT_ATT = LR_NODE->GET_ATTRIBUTE_NAMES( ). LR_ATTRIBUTE-NAME = `DUMMY` . LR_ATTRIBUTE-TYPE_NAME = 'CHAR40' . * check attribute is present or not * if not present then create attribute in node read table LT_ATT transporting no fields with key TABLE_LINE = `DUMMY` .
Popular posts from this blog
Alternative to READ_TEXT Function Module (to fetch multiple long text at one go )
Multi READ_TEXT Code in SAP *&---------------------------------------------------------------------* *& Report ZMULTI_READ_TEXT *& *&---------------------------------------------------------------------* *& *& *&---------------------------------------------------------------------* REPORT ZMULTI_READ_TEXT. *---------------------------------------------------------------------* * data declaration *---------------------------------------------------------------------* TABLES vbap . DATA curs TYPE cursor . TYPES : BEGIN OF ty_stxl , tdname TYPE stxl - tdname , tdid TYPE stxl - tdid , clustr TYPE stxl - clustr , clustd TYPE stxl - clustd , END OF ty_stxl . TYPES : BEGIN OF ty_stxh , tdobject TYPE stxh - tdobject , tdname TYPE stxh - tdname , tdid TYPE stxh - tdid , END OF ty_stxh . TYPES : BEGIN OF ty_tdid
Comments
Post a Comment