Generische Objektdienste (GOS): Unterschied zwischen den Versionen

Aus SAP Wiki ツ
Zeile 7: Zeile 7:
<syntaxhighlight lang="abap" line start="1">  
<syntaxhighlight lang="abap" line start="1">  
DATA(ls_lpor) = VALUE sibflporb( instid = *Business Objekt Key* "z.B. Belegnummer Kundenauftrag
DATA(ls_lpor) = VALUE sibflporb( instid = *Business Objekt Key* "z.B. Belegnummer Kundenauftrag
                                 typeid = *Business Objekt TYPE "z.B. Kundenauftrag BUS2032
                                 typeid = *Business Objekt TYPE* "z.B. Kundenauftrag BUS2032
                                 catid  = 'BO' ).
                                 catid  = 'BO' ).



Version vom 15. November 2024, 20:28 Uhr

Coding

FuBas, Klassen

Anhänge bekommen

 
DATA(ls_lpor) = VALUE sibflporb( instid = *Business Objekt Key* "z.B. Belegnummer Kundenauftrag
                                 typeid = *Business Objekt TYPE* "z.B. Kundenauftrag BUS2032
                                 catid  = 'BO' ).

DATA(lt_rel_options) = VALUE obl_t_relt( ( sign   = 'I'
                                           option = 'EQ'
                                           low    = 'ATTA' ) ).

cl_binary_relation=>read_links_of_binrels(
 EXPORTING
  is_object           = ls_lpor
  it_relation_options = lt_rel_options
  ip_role             = 'GOSAPPLOBJ'
 IMPORTING
  et_links            = DATA(lt_links) ).
 CATCH cx_obl_parameter_error
  cx_obl_internal_error
  cx_obl_model_error.

Anhänge kopieren

 
"Prüfen, ob die Quelle Anhänge hat, s. o.

DATA(ls_source) = VALUE sibflporb( instid = *Business Objekt Key* "z.B. Belegnummer Kundenauftrag
                                   typeid = *Business Objekt TYPE* "z.B. Kundenauftrag BUS2032
                                   catid  = 'BO' ).

DATA(ls_target) = VALUE sibflporb( instid = *Business Objekt Key* "z.B. Belegnummer Kontrakt
                                   typeid = *Business Objekt TYPE* "z.B. Kundenauftrag BUS2034
                                   catid  = 'BO' ).

cl_gos_service_tools=>copy_linked_objects( is_source            = ls_source
                                           is_target            = ls_target
                                           it_service_selection = VALUE tgos_sels( ( sign   = 'I'
                                                                                     option = 'EQ'
                                                                                     low    = 'PCATTA_CREA' ) 
                                                                                  ) 
                                          ).

APIs