on 01-28-2019 1:46 PM
Hi, I have a problem with the characteristics. I need to copy the value of the characteristics from one class (PDR) to another (PPR). I used the following code but no changes were made:
LOOP AT gt_draw_start.
REFRESH gt_characteristic_values.
CALL FUNCTION 'BAPI_DOCUMENT_GETDETAIL2'
EXPORTING
documenttype = gt_draw_start-dokar
documentnumber = gt_draw_start-doknr
documentpart = gt_draw_start-doktl
documentversion = gt_draw_start-dokvr
getclassification = 'X'
TABLES
characteristicvalues = gt_characteristic_values.
LOOP AT gt_draw_finish WHERE doknr EQ gt_draw_start-doknr.
CLEAR: documentdata, documentdatax.
REFRESH classallocations.
classallocations-classtype = '017'.
classallocations-classname = gt_draw_finish-dokar. "PPR
APPEND classallocations.
documentdata-documenttype = gt_draw_finish-dokar.
documentdata-documentnumber = gt_draw_finish-doknr.
documentdata-documentversion = gt_draw_finish-dokvr.
documentdata-documentpart = gt_draw_finish-doktl.
documentdatax-documenttype = 'X'.
documentdatax-documentnumber = 'X'.
documentdatax-documentversion = 'X'.
documentdatax-documentpart = 'X'.
CALL FUNCTION 'BAPI_DOCUMENT_CHANGE2'
EXPORTING
documenttype = gt_draw_finish-dokar
documentnumber = gt_draw_finish-doknr
documentpart = gt_draw_finish-doktl
documentversion = gt_draw_finish-dokvr
documentdata = documentdata
documentdatax = documentdatax
TABLES
characteristicvalues = gt_characteristic_values
classallocations = classallocations.
COMMIT WORK.
ENDLOOP.
ENDLOOP.
Would anyone know how to help me? Thank you
Whats wrong with CL6H?
Craig
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.