cancel
Showing results for 
Search instead for 
Did you mean: 

Error creating debit memo request with refernece to contract

wjanes
Explorer
0 Kudos

Hi Community.

I have a little problem and hope i can solve it with your help 🙂

I am creating a debit memo request with FM "SD_SALESDOCUMENT_CREATE".

Actually it is working but when i look under the tab i have no assignment to my contract

If i try it without bapi (transaction va01) i have an assignmen to the contract (sales order)t:

Item

        ls_items = VALUE #( material = <outtab>-matnr
                            target_qty = <outtab>-menge
                            target_qu = <outtab>-meins
                            ref_doc = <outtab>-kontrakt
                            ref_doc_it = <outtab>-posnr
                            ref_doc_ca = 'G'
                            itm_number = <outtab>-posnr ).

        ls_itemx = VALUE #( material = abap_true
                            target_qty = abap_true
                            target_qu = abap_true
                            ref_doc = abap_true
                            ref_doc_it = abap_true
                            ref_doc_ca = abap_true
                            itm_number = abap_true ).

Header

          "Header
          ls_header-doc_type = <outtab>-fkart.
          ls_header-sales_org = <outtab>-vkorg.
          ls_header-distr_chan = '01'.
          ls_header-division = '01'.
          ls_header-bill_date = <outtab>-budat.
          ls_header-ref_doc = <outtab>-kontrakt.
          ls_header-refdoc_cat = 'G'.
          ls_header-ord_reason = <outtab>-augru.

          ls_headerx-doc_type = abap_true.
          ls_headerx-sales_org = abap_true.
          ls_headerx-distr_chan = abap_true.
          ls_headerx-division = abap_true.
          ls_headerx-bill_date = abap_true.
          ls_headerx-ref_doc = abap_true.
          ls_headerx-refdoc_cat = abap_true.
          ls_headerx-ord_reason = abap_true.

Hope you can help me 🙂

Thanks

View Entire Topic
wjanes
Explorer
0 Kudos

Hi mateuszadamus

Thanks for the hint, but unfortunately that didn't solve the problem 😞

mateuszadamus
Active Contributor
0 Kudos

Hello Wolfgang,

Please use the "Comment" feature to provide more details in the future.

Can you paste your code responsible for the data preparation and function call?


Kind regards,
Mateusz