on ‎2021 Mar 15 12:11 PM
hi experts,
in our process, we had the requirement to create a commercial invoice for all deliveries related to the package units attached to a given freight booking. We did that via a button on the freight booking. The invoice creation works now. In addition, the business has asked us now to add a link where they can navigate from the TM freight booking to the invoice gui transaction VF03. In order to do that, I need to assign a n action class in the floor plan manager befind the link (see attachment). In the action, I need to use class cl_fpm_factory, but which data to pass and how to do the coding? While I am waiting for the answer, I will add screenshots of the link in FPM and of the freight booking with the link.
Thanking you in advance for any hint.
Regards
Petra
Request clarification before answering.
Hi Dragos,
thank you for your valuable advise. I have done the following coding, but it does not work.
where do I find the ok code for batch input? Found the batch code ok code as attached in system status of the invoice entry screen. But, my coding still does not work. Please help.
CHECK lt_root IS NOT INITIAL.
READ TABLE lt_root ASSIGNING FIELD-SYMBOL(<ls_root>) INDEX 1.
lv_fb_key = <ls_root>-key.
lv_fb_id = <ls_root>-tor_id.
lv_invoice = <ls_root>-zz_tm_inv_link.
lv_base_btd_id = lv_invoice.
"Call the invoice in gui
cl_fpm_factory=>get_instance( )->get_navigate_to( )->launch_transaction(
is_transaction_fields = VALUE #(
tcode = 'VF02'
parameter = VALUE #( ( key = 'VBRK-VBELN'
value = lv_base_btd_id )
)
)
is_additional_parameters = VALUE #(
batch_input_program = 'SAPMV60A'
batch_input_dynnr = '104'
batch_input_ok_code = 'AEND'
navigation_mode = 'EXT_HEAD'
window_features = 'toolbar=no, resizable=yes'
parameter_forwarding = 'G'
history_mode = 2
)
).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You must use the FPM navigation API. First get hold of the required singleton:
DATA(o_fpm) = cl_fpm_factory=>get_instance( ).
DATA(o_nav) = o_fpm->get_navigate_to( ).then call its corresponding method:
o_nav->launch_transaction(
is_transaction_fields = fields
is_additional_parameters = addparams ).in which of course you must define the structures fields and addparams as per method's signature and fill them accordingly.
Alternately, you can use a one statement to rule them all:
cl_fpm_factory=>get_instance( )->get_navigate_to( )->launch_transaction(
is_transaction_fields = VALUE #(
tcode = "enter your target tcode, e.g. 'VF03'
parameter = VALUE #( ( key = "enter DYNP field name for ID, e.g. 'VBRK-VBELN'
value = "enter the taget document ID )
)
)
is_additional_parameters = VALUE #(
navigation_mode = 'EXT_HEAD' ##no_text
window_features = 'toolbar=no, resizable=yes' ##no_text
parameter_forwarding = 'G'
history_mode = 2
)
).the <DYNP field name> can be found out using Help > Technical Information when being positioned in the relevant field, e.g. 'VBRK-VBELN'. On the same dialog you can find the program name and screen number that you optionally pass into corresponding components of addparams.
Best regards,
DragoÈ™ Florescu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 17 | |
| 16 | |
| 5 | |
| 3 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.