2020 Nov 21 9:00 PM
Hi
I used badi create contract
Badi_re_cn_cn
To get contract number to use it for case but
The contract number show empty like below why?
2020 Nov 22 8:37 AM
Hello alaa-azazy
I assume you're using the GET_NUMBER method of the BAdI. This method is for a custom logic to assign a new number to the Contract, not to get the Contract's number.
You can try using method AFTER_STORE with the code shown below. Just a note, the code was not tested.
DATA:
lo_contract TYPE REF TO if_recn_contract.
lo_contract ?= io_object.
DATA(ls_detail) = lo_contract->get_detail( ).
ls_detail-bukrs <-- Company Code
ls_detail-recnnr <-- Contract's number
Kind regards,2020 Nov 21 9:10 PM
Hi alaa-azazy
Do you mean BAdI or BAPI? What is the name of the function/class you use?
How do you use it - please show your invocation, otherwise it's guessing.
2020 Nov 22 7:02 AM
Hi mateusz
I want send email message after save document so I decided use badi when save to send email have a number of document
2020 Nov 22 8:37 AM
Hello alaa-azazy
I assume you're using the GET_NUMBER method of the BAdI. This method is for a custom logic to assign a new number to the Contract, not to get the Contract's number.
You can try using method AFTER_STORE with the code shown below. Just a note, the code was not tested.
DATA:
lo_contract TYPE REF TO if_recn_contract.
lo_contract ?= io_object.
DATA(ls_detail) = lo_contract->get_detail( ).
ls_detail-bukrs <-- Company Code
ls_detail-recnnr <-- Contract's number
Kind regards,2020 Nov 22 10:38 AM
There aren't get so all not have return
2020 Nov 22 11:17 AM
I'm sorry, but I don't understand what you're trying to say. Can you please explain again?
2020 Nov 22 12:18 PM
I showed you how to get the Contract's number. Email sending logic can be found on the INternet. Just use Google.
Kind regards,