MIRO Item Screen Enhancenment _ SCN

download MIRO Item Screen Enhancenment _ SCN

If you can't read please download the document

Transcript of MIRO Item Screen Enhancenment _ SCN

  • 25/5/2014 MIRO item screen enhancenment | SCN

    http://scn.sap.com/thread/1019130 1/5

    Getting Started Newsletters Store

    Products Services & Support About SCN Downloads

    Industries Training & Education Partnership Developer Center

    Lines of Business University Alliances Events & Webinars Innovation

    Log On Join UsHi, Guest Search the Community

    Activity Communications Actions

    Brow se

    1 Tweet 0

    11 Replies Latest reply: Sep 12, 2008 8:25 AM by Pablo Casamayor

    Share

    5103 View s Topics: abap

    Average User Rating

    (0 ratings)

    MIRO item screen enhancenmentThis question is Assumed Answered.

    hi guys,

    i've been trying to use badi BADI_FDCB_SUBBAS04 to add zz field for MIRO screen item level, has

    anybody done this before..i have put the coding as per sample of implementation...how to make the

    screen appears

    ester johannes Aug 26, 2008 6:29 AM

    Re: MIRO item screen enhancenment

    Hi,

    ive used badi 'BADI_FDCB_SUBBAS04' to display customer fields but at Header level.

    For item level ive used another badi: MRM_ITEM_CUSTFIELDS

    Anyway (for Header level) you can have a look at:

    https://wiki.sdn.sap.com/wiki/display/Snippets/Displaycustomerfields inheaderoflogistics invoiceverification+transactions

    And for item level have a look at this thread:

    Hope it helps.

    Best regards.

    Edited by: Pablo Casamayor on Aug 27, 2008 5:28 PM

    Like (0)

    Pablo Casamayor Feb 29, 2012 12:46 PM (in response to ester johannes)

    Re: MIRO item screen enhancenment

    Hi Pablo,

    Appreciate your posting which is available in code gallery for adding custom fields in MIRO.

    I have some sort of similar requirement as you had....here is my requirement...

    I need to add a custom field in "Basic data" tab(header level) of MIRO transaction and once MIRO

    invoice is posted and it's follow-on documents got created, the new custom field value need to be

    transferred to all line items of FI document (into BSEG-XREF1).

    I have implemented the BADI BADI_FDCB_SUBBAS04 and successfully added a field to "Basic

    data" tab.

    Also added a append structure with the same custom field name into BSEG. There is a statement in

    the code where the values of INVFO are moving to BSEG. In the run time I observed that the values

    are passing to BSEG but it is not really getting saved into FI document. My intention here is once the

    custom field value is populated into BSEG, then I can create a substitution to fill BSEG-XREF1 with

    BSEG-

    Nanda veera Sep 7, 2008 10:31 PM (in response to ester johannes)

  • 25/5/2014 MIRO item screen enhancenment | SCN

    http://scn.sap.com/thread/1019130 2/5

    But this is not working.....

    In MIRO from header data, the data needs to move to line item data i.e. into BSEG.

    Do I need to go for the other BADI implementation MRM_ITEM_CUSTFIELDS?

    Any suggesstions are highly appreciated.

    Best Regards,

    Nanda.

    Like (0)

    Re: MIRO item screen enhancenment

    Hi,

    heres one possible solution (via field-symbols):

    CONSTANTS: c_ydrseg12(18) TYPE c VALUE '(SAPLMR1M)YDRSEG[]'.

    DATA: wa_drseg12 TYPE mmcr_drseg.

    CLEAR wa_drseg12.

    FIELD-SYMBOLS: TYPE table.

    ASSIGN (c_ydrseg12) TO .

    CLEAR lt_drseg0.

    REFRESH lt_drseg0.

    lt_drseg0[] = .

    IF NOT [] IS INITIAL.

    LOOP AT lt_drseg0 INTO wa_drseg12.

    CONSTANTS: c_bseg(14) TYPE c VALUE '(SAPLFDCB)BSEG'.

    TYPES: BEGIN OF t_bseg.

    INCLUDE STRUCTURE bseg.

    TYPES: END OF t_bseg.

    DATA: wa_bseg TYPE STANDARD TABLE OF t_bseg WITH HEADER LINE.

    CLEAR wa_bseg.

    FIELD-SYMBOLS: TYPE t_bseg.

    ASSIGN (c_bseg) TO .

    READ TABLE WITH KEY bukrs = wa_drseg12-bukrs

    belnr = wa_drseg12-belnr

    gjahr = wa_drseg12-gjahr

    buzei = wa_drseg12-buzei.

    IF sy-subrc = 0.

    wa_bseg = .

    wa_bseg-XREF1 = wa_drseg12-YOURCUSTOMFIELD.

    = wa_bseg.

    ENDIF.

    ENDLOOP.

    ENDIF.

    Best regards.

    Edited by: Pablo Casamayor on Sep 8, 2008 8:28 AM

    Like (0)

    Pablo Casamayor Feb 29, 2012 12:49 PM (in response to ester johannes)

    Re: MIRO item screen enhancenment

    Hi Pablo,

    Thanks for your response.

    Where do I need to put this code, will it be in the BADI_FDCB_SUBBAS04 implementation or are you

    referring any Userexit?

    Please let me know.

    Regards,

    Nanda.

    Like (0)

    Nanda veera Sep 8, 2008 3:35 PM (in response to ester johannes)

  • 25/5/2014 MIRO item screen enhancenment | SCN

    http://scn.sap.com/thread/1019130 3/5

    Re: MIRO item screen enhancenment

    Hi Pablo,

    I tried the way you suggested.

    I am getting the reference for the field symbol (SAPLFDCB)BSEG in the BADI implementation and I

    changed it with the custom field value. But it is not reflecting in the FI document.

    No clue why it is behaving like that.....any thoughts on this?

    Regards,

    Nanda.

    Like (0)

    Nanda veera Sep 8, 2008 8:40 PM (in response to ester johannes)

    Re: MIRO item screen enhancenment

    Hi Pablo,

    Finally I was able to achieve this.

    The custom field need to be added to RBKP, RBKP_V as you mentioned in your document. So that

    the custom field value will be stored in RBKP.

    And then in the function module MRM_INVOICE_POST, we need to create a enhancement point, in

    that we need to change the lines of XACCIT with the value present it RBKP-custom field.

    Regards,

    Nanda.

    Like (0)

    Nanda veera Sep 9, 2008 8:41 PM (in response to ester johannes)

    Re: MIRO item screen enhancenment

    Hi,

    in the BADI_FDCB_SUBBAS04 implementation

    Best regards.

    Like (0)

    Pablo Casamayor Sep 8, 2008 3:50 PM (in response to Nanda veera)

    Re: MIRO item screen enhancenment

    Hi,

    please do have a look at OSS Note 904652.

    This note says:

    MIRO primarily creates an MM document in tables RBKP and RSEG and only

    consequently creates follow-on documents in accounting. The corresponding

    calculations and value transfers do not take place until the document has been

    posted or simulated. This means that there are differences for FI validations and

    substitutions, among other things (For more information, see Note 308866).

    Have you checked that after posting the document the values in BSEG are not updated?

    Best regards.

    Like (0)

    Pablo Casamayor Sep 9, 2008 7:13 PM (in response to Nanda veera)

    Re: MIRO item screen enhancenment

    Pablo Casamayor Feb 29, 2012 12:49 PM (in response to Nanda veera)

  • 25/5/2014 MIRO item screen enhancenment | SCN

    http://scn.sap.com/thread/1019130 4/5

    1 Tweet 0Share

    Re: MIRO item screen enhancenment

    Hi Pablo,

    As you mentioned in your code gallery document I have added the custom field to INVFO, RBKP,

    RBKP_V and ACMM_VENDOR_COMP.

    Now when I post MIRO invoice the custom field value is getting populated in RBKPV.

    Now go to MRM_INVOICE_POST function module, just before the call of function module

    CKMV_AC_DOCUMENT_CREATE, I have created an enhancement spot and changed the XACCIT-

    XREF1 with RBKPV-custom field value.

    I just build a prototype and need to do the actual developement and needs to test it rigorously.

    Can you please let me know, how can I restrict to display the custom field on just MIRO and MIRA

    only. We don't want to see it on other transactions like FB60 etc?

    Regards,

    Nanda.

    Like (0)

    Nanda veera Sep 12, 2008 1:04 AM (in response to ester johannes)

    Hi,

    im very interested in the enhancement point you mention.

    Could you please give some details about it?

    Best regards.

    Like (0)

    Re: MIRO item screen enhancenment

    Hi,

    one possible solution in order to display the custom field on just MIRO and MIRA:

    In the PBO declare a module thus:

    PROCESS BEFORE OUTPUT.

    * Hides/Displays custom fields

    MODULE display_custfields.

    and then within the module:

    MODULE display_custfields OUTPUT.

    CASE sy-tcode.

    WHEN 'FB60' OR 'FB65' OR 'FB70' OR 'FB75'

    OR 'FV60' OR 'FV65' OR 'FV70' OR 'FV75' OR 'FV63'

    OR 'MIR4' OR 'MR8M' OR 'MIR7' OR 'MIR6'.

    LOOP AT SCREEN.

    CASE screen-name.

    WHEN 'INVFO-YOURCUSTOMFIELD'.

    screen-input = '0'.

    screen-invisible = '1'.

    MODIFY SCREEN.

    ENDCASE.

    ENDLOOP.

    ENDCASE.

    ENDMODULE. " display_custfields OUTPUT

    (as you can see i try to hide the custom field in all the transactions where it appears except for

    MIRO and MIRA)

    Best regards.

    Edited by: Pablo Casamayor on Sep 12, 2008 8:23 AM

    Like (0)

    Pablo Casamayor Sep 12, 2008 8:25 AM (in response to Nanda veera)

  • 25/5/2014 MIRO item screen enhancenment | SCN

    http://scn.sap.com/thread/1019130 5/5

    Follow SCNSite Index Contact Us SAP Help Portal

    Privacy Terms of Use Legal Disclosure Copyright