SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

BAPI_CLASS_GET_CLASSIFICATIONS



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> Interfaces | Интерфейсы -> BAPI
View previous topic :: View next topic  
Author Message
admin
Администратор
Администратор



Joined: 01 Sep 2007
Posts: 1637

PostPosted: Sat May 10, 2008 8:06 pm    Post subject: BAPI_CLASS_GET_CLASSIFICATIONS Reply with quote

BAPI_CLASS_GET_CLASSIFICATIONS - Read Values Assigned to Objects in Class
Caution: Method is obsolete as of Release 46C !

Code:
CONSTANTS: c_011(3) TYPE klassenart VALUE '011',
           c_kna1(4) TYPE c VALUE 'KNA1'.
DATA: i_class_objects LIKE bapi_class_objects
      OCCURS 0 WITH HEADER LINE,
*
      i_obj_classfctn TYPE STANDARD TABLE OF bapi_object_values
      WITH NON-UNIQUE KEY name_char
      WITH HEADER LINE .
*
IF idoc_type = 'DEBMAS05'.
* Append the IDOC
  i_class_objects-object_key = e1kna1m-kunnr.
  i_class_objects-object_type = c_kna1.
  APPEND i_class_objects.
  CLEAR i_class_objects.
  CALL FUNCTION 'BAPI_CLASS_GET_CLASSIFICATIONS'
    EXPORTING
      classtype             = c_011
      classnum              = c_ahhinp
      key_date              = sy-datum
    TABLES
      object_classification = i_obj_classfctn
      class_objects         = i_class_objects.
  SORT i_obj_classfctn BY name_char.
*
  READ TABLE i_obj_classfctn
  WITH KEY name_char = c_ah_hin_primary.
*
  IF sy-subrc = 0.
    x_sbcust-hinprm = i_obj_classfctn-char_value.
  ENDIF.
  idoc_data-sdata = x_sbcust.
  APPEND idoc_data.
ENDIF.


Code:
DATA: BEGIN OF MCHA_KEY,
MATNR TYPE MATNR,
WERKS TYPE WERKS_D,
CHARG TYPE CHARG_D,
END OF MCHA_KEY.

DATA: BATCHCLASS LIKE BAPI_CLASS_KEY-CLASSTYPE VALUE '022'.

DATA: OBJECT_CLASSIFICATION LIKE BAPI_OBJECT_VALUES
OCCURS 0 WITH HEADER LINE,
CLASS_OBJECTS LIKE BAPI_CLASS_OBJECTS OCCURS 0 WITH HEADER LINE.
DATA: _CLASSNUM LIKE BAPI_CLASS_KEY-CLASSNUM.

BAPIFLAG = 'X'.

CALL FUNCTION 'BAPI_CLASS_GET_CLASSIFICATIONS'
EXPORTING
CLASSTYPE = '022'
CLASSNUM = _CLASSNUM
CHARACTS_OF_CLASS_ONLY = BAPIFLAG
TABLES
OBJECT_CLASSIFICATION = OBJECT_CLASSIFICATION
CLASS_OBJECTS = CLASS_OBJECTS
EXCEPTIONS
OTHERS = 1.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> Interfaces | Интерфейсы -> BAPI All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG.
Every effort is made to ensure content integrity. Use information on this site at your own risk.