Need help to build a navigation from billing component BEABDS_BILLDOC to sales order component BT115H_SLSO on follow up create action

Hello Experts,
I have been assigned to a CRM-UI Object which is basically to create follow-up action i.e. creating debit/credit memos with reference of one/multiple billing documents.
SAP has already provided an option to create the follow-up action for 1 billing document at a time, but the requirement is to create follow-up action for multiple billing documents at a time. For example, There are 2 invoices raised against a dealer "DEL" and due to some reason the dealer wants to send back the products.
Now the dealer wants to create only 1 claim/return for those 2 invoices, Which Standard SAP doesn't provide.
I did some of the development and added the 'Follow-up create' Button to the search result work area of the billing search. But could not able to build the link between the Billing and Sales order Components.
It would be really a great favor if you can guide me to build this navigation link.
Please let me know if any further information required.
Please find the attachment for step-by-step process.
Codes and Configs:
Method DO_PREPARE_OUTPUT to provide the “Follow-up Create” Button
method DO_PREPARE_OUTPUT.
CALL METHOD SUPER->DO_PREPARE_OUTPUT .
DATA:
lr_coco                  TYPE REF TO cl_beabds_b_bspwdcomponen_impl,
ls_button                TYPE crmt_thtmlb_button,
lv_usage                  TYPE string,
lv_info                  TYPE string,
lv_info_transfert        TYPE string,
lv_show_btn_transfer      TYPE boolean VALUE abap_false,
lv_show_btn_cancel        TYPE boolean VALUE abap_false,
lv_show_btn_split        TYPE boolean VALUE abap_false,
lv_show_btn_create      TYPE boolean VALUE abap_false,
lr_col                    TYPE REF TO if_bol_bo_col,
lv_show_separator        TYPE abap_bool,
lv_num_marked            TYPE i,
lr_entity                TYPE REF TO if_bol_bo_property_access,
lv_appl                  TYPE bea_appl_ubd.
lr_coco ?= comp_controller.
lr_col  = me->typed_context->ubdheader->collection_wrapper->get_marked( ).
lv_num_marked = lr_col->size( ).
* Decide based on the usage which buttons should appear, others are not shown by default
CALL METHOD lr_coco->get_env_info
IMPORTING
ev_usage          = lv_usage
ev_info          = lv_info
ev_info_transfert = lv_info_transfert.
CASE  lv_usage.
WHEN cl_beabds_b_bspwdcomponen_impl=>gc_usage_search_result.
IF lv_info_transfert = cl_beabds_b_bspwdcomponen_impl=>gc_inf_trans_search_result.
lv_show_btn_create = abap_true.
lv_show_separator = abap_true.
ENDIF.
ENDCASE.
if  lv_show_btn_create  = abap_true.
*  Separator between two buttons if needed
IF lv_show_separator = abap_true.
CLEAR ls_button.
ls_button-type = cl_thtmlb_util=>gc_separator.
APPEND ls_button TO gt_buttons.
lv_show_separator = abap_false.
ENDIF.
CLEAR ls_button.
IF lv_num_marked > 0.
ls_button-enabled = abap_true.
ELSE.
ls_button-enabled = abap_false.
ENDIF.
ls_button-text      = text-001.
ls_button-id        = 'BTN_CREATE'.                    "#EC NOTEXT
ls_button-on_click  = 'CREATE'.                        "#EC NOTEXT
APPEND ls_button TO gt_buttons.
lv_show_separator = abap_true.
ENDIF.
endmethod.
METHOD eh_oncreate.
* Added by wizard: Handler for event 'CREATE'
TYPES: BEGIN OF ty_trans,
process_type      TYPE crmt_process_type,
proc_type_descr_20 TYPE crmt_description_20,
subobject_category TYPE crmt_subobject_category,
subob_cat_descr_20 TYPE crmt_description_20,
END OF ty_trans.
DATA: lt_trans      TYPE STANDARD TABLE OF ty_trans ,
ls_trans      TYPE ty_trans ,
lv_ref_struct TYPE REF TO  ty_trans.
DATA:
lv_struct_ref TYPE REF TO crmt_extbt_il_header_ref,
lv_value_node TYPE REF TO cl_bsp_wd_value_node,
lr_ent        TYPE REF TO if_bol_bo_property_access,
lv_bo_coll    TYPE REF TO if_bol_bo_col,
ls_ref_header TYPE crmt_extbt_il_header_ref,
lv_title      TYPE string,
lr_comp_ctrl  TYPE REF TO cl_beabds_b_bspwdcomponen_impl,
lr_cw        TYPE REF TO cl_bsp_wd_collection_wrapper,
lr_col        TYPE REF TO if_bol_bo_col,
lr_col_proc  TYPE REF TO if_bol_bo_col,
lr_bo        TYPE REF TO cl_crm_bol_entity.
IF gv_fu_popup IS NOT BOUND.
lv_title = cl_wd_utilities=>get_otr_text_by_alias( 'CRM_UIU_BT/FOLLOW_UP' ).
gv_fu_popup = comp_controller->window_manager->create_popup(
iv_interface_view_name = 'MainWindow'
iv_usage_name          = 'UCBTEXTFOLLOWUP'
iv_title              = lv_title ).
ENDIF.
CREATE OBJECT lv_bo_coll TYPE cl_crm_bol_bo_col.
lr_comp_ctrl ?= me->comp_controller.
lr_cw = lr_comp_ctrl->typed_context->ubdheader->collection_wrapper.
lr_col  = lr_cw->get_marked( ).
CREATE DATA lv_struct_ref.
CREATE OBJECT lv_value_node
EXPORTING
iv_data_ref = lv_struct_ref.
CHECK lr_col IS BOUND AND lr_col->size( ) > 0.
CREATE OBJECT lr_col_proc TYPE cl_crm_bol_bo_col.
lr_bo ?= lr_col->get_first( ).
WHILE lr_bo IS BOUND AND lr_bo IS NOT INITIAL.
lr_bo->get_property_as_value(
EXPORTING
iv_attr_name    = 'HEADNO_EXT'
IMPORTING
ev_result      = ls_ref_header-object_id  ).
ls_ref_header-object_type = 'BILLDO'.                  "#EC NOTEXT
lv_value_node->set_properties( ls_ref_header ).
lv_bo_coll->add( lv_value_node ).
lr_bo ?= lr_col->get_next( ).
ENDWHILE.
gv_fu_popup->set_on_close_event( iv_view = me iv_event_name = 'FOLLOWUP_SEL_CLOSED' ).
gv_fu_popup->set_display_mode( if_bsp_wd_popup=>c_display_mode_surrounded ).
gv_fu_popup->open( iv_inbound_plug = 'EXTFOLLOWUP' iv_collection = lv_bo_coll ).
ENDMETHOD.
method EH_ONFOLLOWUP_SEL_CLOSED.
* Added by wizard: Handler for event 'FOLLOWUP_SEL_CLOSED'
DATA:
lr_context_node  TYPE REF TO cl_bsp_wd_context_node,
lr_current      TYPE REF TO cl_crm_bol_entity,
lr_col          TYPE REF TO if_bol_entity_col,
lr_wdw          TYPE REF TO cl_bsp_wd_window.
IF gv_fu_popup->get_fired_outbound_plug( ) EQ 'LEAVE'. "# EC NOTEXT
lr_context_node = gv_fu_popup->get_context_node( iv_cnode_name = 'BTORDER' ). "# EC NOTEXT
CHECK lr_context_node IS BOUND.
lr_current ?= lr_context_node->collection_wrapper->get_current( ).
CHECK lr_current IS BOUND.
CREATE OBJECT lr_col
TYPE
cl_crm_bol_entity_col.
lr_col->add( lr_current ).
lr_wdw = me->comp_controller->if_bsp_wd_window_manager~get_window( 'MainWindow' ).
lr_wdw->call_outbound_plug( iv_outbound_plug = 'NAVIGATE_CREATE' iv_data_collection = lr_col ). "#EC NOTEXT
ELSEIF gv_fu_popup->get_fired_outbound_plug( ) EQ 'LEAVEPROCTYPE'. "# EC NOTEXT
gv_fu_popup->set_on_close_event( iv_view = me iv_event_name = 'FOLLOWUP_SEL_CLOSED' ).
gv_fu_popup->open( iv_inbound_plug = 'EXTFOLLOWUPITEMS' ).
ENDIF.
endmethod.
method OP_NAVIGATE_CREATE.
* Added by wizard: Outbound plug 'NAVIGATE_CREATE'
DATA:
lr_window TYPE REF TO cl_bsp_wd_window.
lr_window = me->view_manager->get_window_controller( ).
lr_window->call_outbound_plug( iv_outbound_plug  = 'NAVIGATE_CREATE'
iv_data_collection = iv_data_collection ).
endmethod.
Thanks,
Subhash.

Hi Srikanth,
I believe You are trying to implement dynamic navigation..
lv_data_collection->add( lv_descriptor_object ).
I can see lv_data_collection is not having the actual entity just the descriptor object details you are adding in the lv_data_collection..
If you don't have the context node binding between source and destination component, add the required data to lv_data_collection
, in the target component inbound plug retrieve the same data entity and set it on the relevant context node.
To get an idea, check standard component for where dynamic navigation is implemented.
Hope this helps..
Cheers,
Sumit Mittal

Similar Messages

  • COPA : Drive Item Category from billing doc. / without sales order

    Dear All ,
    I need to drive item category directly from billing document ( billing without sales order - POS inbound doc. )
    i tried to drive it from table VBRP but the derivation failed as table VBRP need the billing doc. number & i can't get it from COPA
    POS does not create any sales order , the in coming inbound doc. create billing directly ( billing type : FP  ).
    Edited by: Ahmed Hassan on May 25, 2011 2:28 PM

    Hi Jat
    This is not the screen I  am looking for .Please go to condition tab and look for Analysis .Let me know on what excess you are looking system to find your pricing .
      Below are are reference for u.
    Regards

  • Need help in copying Invoice date to lower level item in Sales order report

    Hello Experts,
    I am debugging into one Sales order report.I need little bit help.The report is displaying Invoice Date for
    Sales order Billing documents for Higher item in Bill of Material Structures.But as per user requirement,
    I am supposed to show the Invoice date for lower level items also.The field for Higher level item is 'UEPOS'.
    I want to copy the Invoice date for Higher level item to lower level item. Can you please guide me in the logic?
    Thanking you in anticipation.
    Best Regards,
    Harish

    Hi BreakPoint,
    Thanks for the information.
    I have applied the same way but it is showing only lower line items now.
    Invoice dates for Higher level items are not there.
    I am pasting the code here which I have applied.
    Then you can give me more guidence.
    This is to be done only for 'ZREP' sales orders.
    if w_vbak-auart EQ 'ZREP' and w_vbak-uepos is not INITIAL.
                          read table t_final into w_final_ZREP with key vbeln = w_vbak-vbeln
                                                                        posnr = w_vbak-uepos.
                             w_final-erdat_i = w_final_ZREP-erdat_i.
                             else.
                    if w_vbak-auart EQ 'ZREP' and w_vbak-uepos is INITIAL.
                      w_final-erdat_i = w_invdate.
                    endif.
                    endif.
    Can you please sugest me changes here?
    Best Regards,
    Harish
    Edited by: joshihaa on Jul 13, 2010 6:22 PM

  • Need help on IDoc for Picking, Packing and PGI against the Sale order

    Hi All,
    I am new to this IDoc stuffs. Below is the scenario for which I would like to know the details of the IDoc...
    Business Case:
    1. Storage location is a HU Managed but not WM managed.
    2. This storage locations is managed by a third party
    3. Outbound delivery document against the SO will be created by our personnels in SAP for this storage location.
    4. Picking, Packing and PGI needs to happen/post via Idoc. (By packing here, i refer to assign the HUs that are already created for the materials and is available in the storage location and not repacking)
    Is there any standard IDoc that can be used here to Pick, Pack and post PGI. We would like to have picking and packing in a first idoc and PGI on the second idoc.
    Thanks,
    Prashant

    Hi Typewriter,
    Thanks for your reply on this post..
    The business process is as below (it was changed recently to have the creation of OBD, pick HUS and then post GI via single IDOC)
    1. We have a storage loc in our enterprise structure that is HU managed but not WM managed.
    2. This storage loc is being maintained by a third party.
    3. SO will be created to be shipped out of this plant/sloc.
    3. The stocks at this storage loc will be Special stock "E" against the sales order. And the stocks will be Packed in HUs.
    4. The third party is informed to deliver the stocks (HUs - that do have the special stock number which internally refers to the the SO number and the line item number) directly to ship to party address in SO.
    5. The 3rd party will physically ship the HUs to customer and send in the details that they have shipped goods against the sales order.
    6. The details sent by the 3rd party will be received in SAP to create OBD for the sales order, Pick, Pack and post GI. This can happen via a single IDOC..
    I am now planning to create a custom IDOC type referring to the standard IDOC type DELVRY03 and message type DESADV and to use a custom BAPI/FM.
    Do you think I am using the right ones?
    Thanks,
    Prashant Kumar

  • I need help transferring Bootcamp (Windows XP) from my old Macbook Pro to the new one. How do I make bootable clone of Bootcamp?

    Hi I just got a new MacBook Pro I need help transferring Bootcamp (Windows XP) from my old Macbook Pro to my new Macbook Pro  Mac OS X 10.7.4  2.6 Ghz Intel Core 17. How do I make bootable clone of Bootcamp?

    you can't just move XP even if you took the hard drive and have Windows boot and function.
    Apparently there are Windows tools to sanitize the OS and strip all the motherboard drivers and services.
    Time to get a supported OS. Don't want to pay, then use 8 for the time until it goes on sale.
    There are no drivers for even Vista on 2011 and later Macs.

  • Need help in Activating office 365 from my BizSpark‏

    I need help in Activating office 365 from my BizSpark. When I tried to activate it asks for office 365 ac id. i don't know how to sign up for that. Please provide step by step instructions for that.
    thanks,
    Albin

    Sorry, but that one doesn't sound like something for "users helping other users" -- unless someone smarter comes along here ... :-) ... I would advise going to Apple Support to have it taken care of ... or to your local Apple Store, over to the Genius Bar.
    Apple Support
    http://www.apple.com/support/
    Apple Retail Store - Genius Bar
    http://www.apple.com/retail/geniusbar/

  • Need help in fetching requested data from JSP

    Hello,
    I really need help in fecthing requested data from JSP to servlet. Can anyone assist me as soon
    as possible because I must finish my program by today.....( 20/02/2002).
    Thanks in advance.

    It is very likely that somebody can help you, if you say what your problem is. In fact somebody might already have helped you. What is your problem?

  • I need help moving my Photoshop 7 from my old laptop to my new laptop which is running Windows 7 Enterprise.  I've tried two routes unsuccessfully.  I install the CD, it does not autoplay.  I execute Autoplay.exe at the root directory, I am welcomed, I ch

    I need help moving my Photoshop 7 from my old laptop to my new laptop which is running Windows 7 Enterprise. I’ve tried two routes unsuccessfully. I install the CD, it does not autoplay. I execute Autoplay.exe at the root directory, I am welcomed, I choose English, I accept the EULA, I get the Install/Explore choices window, with the Install button already selected, I click the Photoshop button, the CD spins, and nothing happens.  In the 2nd attempt I execute Setup.exe in the Photoshop directory, and nothing happens at all.  I’m never even offered the opportunity to enter my product code. What should I do?

    There could is likely a compatibility problem between the old software and the newer operating system.

  • I need help to transfer my movies from I tunes to an external hard drive please

    I need help to transfer my movies from I tunes to an external hard drive please

    Teach a man to fish, feed them for life.
    https://discussions.apple.com/message/16276201#16276201

  • HT1386 I need help getting my contacts transferred from my old phone to my new one

    I need help getting my contacts transferred from my old iphone to my new one

    Either backup the contacts in iCloud or with a compatible programme on your computer (Outlook, Windows Contacts, Address Book etc).
    Once done, sync the contacts to your new iPhone from that programme/iCloud.
    Read "Contacts"
    http://support.apple.com/kb/HT1296
    http://support.apple.com/kb/HT4859

  • I Need Help Syncing All My Music From My Desktop To My IPhone 5 Helllllllllllp Please

    Hi can someone help me please I have a IPhone5 64g I need help syncing all my music from my I tunes library. I have a total of 3600 songs on my I tunes library which is 26g on my desktop all the boxes are checked on each song when I hit sync im only getting 1400 songs wich is only 10g of music I want all 26g of musicon my IPhone 5 when i hit sync all my music are not syncing and I need helping syncing all my music can someone help me please?

    Are you upgrading from an existing iPhone? Back up old phone, then restore new phone with the cable. I had to do this a number of time to get all my purchases across.

  • Hello need help I download a game from 4shared and it an iPhone game . It show up and my iTunes but I can't sync it to my phone I need help

    Hello need help I download a game from 4shared and it an iPhone game . It show up and my iTunes but I can't sync it to my phone I need help

    Wowowowow I was told I can get any app from the net and it will work thank

  • Copy mode of payment from customer master data to sales order,

    Hi Gurus,
    Hope all is fine.
    I have a small doubt. If we want to transfer the mode of payment from customer master data to sales order, do we have to use Exit- MV45AFZZ.
    Can't we transfer the data without the exit?

    Hi,
    I have tested this in sand box.Thought the customer master is having payment method ( payer ) ,It is not copying from customer master to sales order but if you maintain manually in sales order ,it is copying into billing document level.FYI see below snap shot.
    Note:If you want it from customer master into sales order,may be you need to take help of abaper on this.
    BR's,
    Naren

  • Bill plan of a Sales Order/Contract

    Hi,
    Where do we create/update the bill plan for a sales order/contract.
    I tried VA41 where a bill plan button is provided. But need to understand the bill plan from a functional perspective.
    Any short summary on the same will be helpful.
    Also please provide Transaction/steps to update a bill plan.
    Thanks.
    Shreyas

    Hi
    A billing plan is a schedule of individual billing dates
    for a single item in a sales document.
    You can define a billing plan at header level, which is
    then valid for all items assigned to it.
    During sales order processing, the system determines from
    the item category whether a billing plan is required and,
    if so, which type of plan: The type of billing plan that
    is determined at this point is set up in Customizing and
    cannot be changed in the sales document.
    For each billing plan you create, you can enter a freely-
    definable search term in the details screen of the billing plan in the sales document.
    When you save the document, the system automatically
    assigns a number that later uniquely identifies the
    individual plan.
    You can use the search term later to locate specific billing plans.
    Transaction code for Sales order - VA01, VA02 & VA03
    Kindly check the following link for more information on Billing plan:
    http://help.sap.com/saphelp_47x200/helpdata/en/dd/560674545a11d1a7020000e829fd11/frameset.htm
    kindly reward points for useful answers!
    best regards,
    Thangesh

  • How I can get the Billing Type for the sales order and its items

    How I can get the Billing Type for the sales order and its items. I mean from which SAP tables and how?

    Hi,
    You need to use two tables.
    First use VBFA. Enter the sales order number in the field Predecessar and the value M in SubCt field. This will give all the billing document number for the sales order items.
    Then use the billing document numbers in table VBRK, where in you can get the billing document type.
    Regards,

Maybe you are looking for

  • How to add a button on a panel's title bar?

    Hi, How can I add a button to a panel's title bar? Buttons that are simply added to a panel's title bar become invisible. -Altu

  • SKF and AT cost element in cycle

    Hi all, Activity type cost element maintained in KL01. SKF cost element not in KK01 but base on cost element in cycle. Now, in cycle, let say, the tracing factor is using activity type, then system to use which cost element? Say, in KL01, the cost el

  • BI Apps on the hosted environment

    On the hosted environment will it be just the presentation layer which would need to be configured or is there something else which needs to be taken care as well. We do have the BI Apps financial module with us just wanted to get some insight on it.

  • MacBook pro hangs at start

    Ok So I did a fresh install of snow leopard on my disk which worked perfectly. But after finding out that all my pro apps mysteriously wouldn't work I decided to restore from a back up when they did. After that restore completed the MacBook hangs on

  • I just activated my iphone 4s but i am not getting service

    just activated 5 mins ago and is not getting service. have plugged it into the computer and restarted it.