Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- METHOD /iwbep/if_mgw_appl_srv_runtime~create_deep_entity.
- TYPES BEGIN OF ty_entity.
- INCLUDE TYPE zcl_zos_academia_juego_mpc=>ts_compania.
- TYPES to_juegos TYPE STANDARD TABLE OF zcl_zos_academia_juego_mpc=>ts_juego WITH DEFAULT KEY.
- TYPES END OF ty_entity.
- DATA: ls_compania TYPE ty_entity,
- ls_juego_nuevo TYPE ztca_juegos_pa.
- io_data_provider->read_entry_data( IMPORTING es_data = ls_compania ).
- SELECT MAX( id_juego ) FROM ztca_juegos_pa
- INTO @DATA(lv_id_juego)
- WHERE id_compania = @ls_compania-id_compania.
- IF sy-subrc NE 0.
- lv_id_juego = 1.
- ENDIF.
- * Datos de lista de juegos
- LOOP AT ls_compania-to_juegos INTO DATA(ls_juego).
- CLEAR ls_juego_nuevo.
- lv_id_juego = lv_id_juego + 1.
- MOVE-CORRESPONDING ls_juego TO ls_juego_nuevo.
- ls_juego_nuevo-id_compania = ls_compania-id_compania.
- ls_juego_nuevo-id_juego = lv_id_juego.
- MODIFY ztca_juegos_pa FROM ls_juego_nuevo.
- COMMIT WORK.
- ENDLOOP.
- copy_data_to_ref( EXPORTING is_data = ls_compania
- CHANGING cr_data = er_deep_entity ).
- ENDMETHOD.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement