Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Urgent : BDC PROBLEM WITH MIRO Transaction

Former Member
0 Kudos

Hi All

1 I am facing problem with BDC program using MIRO transaction. When I login for the first time into SAP and execute this transaction, it will pop up a window asking for company code and next transaction onwards, it will take the default company code and gets to the next screen. I can change company code in this screen by going into Edit and switch company code.

How do I handle this situation in a interface program using BDC logic.

Situation 2 :When i run BDC through screen sequence below

MIRO -> Edit-> Switch company code -> Its just giving Invoice date as enable with all other fields as disabled with error on bottom as Invali date, So i just have Invoice date and hit Enter

Again only reference number is enabled and i entered reference number and hit enter , Then BDC screen shows up with all values and wil post Invoice perfectly

WHY THE SCREEN GETTING STUCK ON INVOICE DATE AND REFERENCE NUMBER , why is it not taking values from BDC thought there is BDCDATA updated on internal table

Please help me solve both the situations

I am sending you what are the fields i need to populate IN MIRO and post an invoice and wil also give the sequence of my present program .

Below is the sequence of BDC FLOW

_____ Fields which we need to fill on MIRO are

INVOICE DATE

POSTING DTAE

REFERENCE NUMBER

AMOUNT

CURRENCY

PuRCHASE ORDER ( Hit enetr ) - automatically it wil give line item

GOTO DETAILS TAB

and GIVE BUSINESS AREA

Invoice should post now

here is the sequence of BDC flow

PERFORM BDC_DYNPRO USING 'SAPLMR1M' '6000'.

PERFORM BDC_FIELD USING 'BDC_OKCODE'

'/ENEWCC'.

perform bdc_dynpro using 'SAPLACHD' '1000'.

perform bdc_field using 'BDC_CURSOR'

'BKPF-BUKRS'.

perform bdc_field using 'BKPF-BUKRS'

t_int_frt-bukrs.

perform bdc_field using 'BDC_OKCODE'

'=ENTR'.

perform bdc_dynpro using 'SAPLMR1M' '6000'.

perform bdc_field using 'BDC_OKCODE'

'/00'.

perform bdc_field using 'RM08M-VORGANG'

'1'.

perform bdc_field using 'BDC_CURSOR'

'INVFO-BLDAT'.

perform bdc_field using 'INVFO-BLDAT'

t_int_frt-bldat.

perform bdc_field using 'INVFO-BUDAT'

t_int_frt-budat.

perform bdc_field using 'INVFO-XBLNR'

t_int_frt-xblnr.

perform bdc_field using 'INVFO-WRBTR'

t_int_frt-wrbtr.

perform bdc_field using 'INVFO-WAERS'

t_int_frt-waers.

perform bdc_field using 'INVFO-XMWST'

'X'.

perform bdc_field using 'INVFO-MWSKZ'

t_int_frt-mwskz.

perform bdc_field using 'RM08M-REFERENZBELEGTYP'

'1'.

perform bdc_field using 'BDC_CURSOR'

'RM08M-EBELP'.

perform bdc_field using 'RM08M-EBELN'

t_int_frt-ebeln.

perform bdc_field using 'RM08M-EBELP'

t_int_frt-ebelp.

perform bdc_field using 'RM08M-XWARE_BNK'

'1'.

perform bdc_field using 'RM08M-ITEM_LIST_VERSION'

'7_6310'.

perform bdc_field using 'BDC_OKCODE'

'/00'.

perform bdc_dynpro using 'SAPLMR1M' '6000'.

perform bdc_field using 'DRSEG-WRBTR(01)'

t_int_frt-wrbtr.

perform bdc_field using 'DRSEG-MENGE(01)'

t_int_frt-menge.

perform bdc_field using 'DRSEG-OK(01)'

'X'.

perform bdc_field using 'BDC_OKCODE'

'=BU'.

perform bdc_dynpro using 'SAPLMR1M' '6000'.

perform bdc_field using 'INVFO-GSBER'

t_int_frt-gsber.

perform bdc_field using 'INVFO-BLART'

'RE'.

perform bdc_field using 'INVFO-LIFRE'

t_int_frt-konto.

perform bdc_field using 'BDC_OKCODE'

'=BU'.

Please correct me if there is anything wrong .

Appreciate your help on this .

Thank you

Raja

7 REPLIES 7

Former Member
0 Kudos

Hi Raja, check this sample code for interface program.

TABLES ZVIJIRANK.

DATA IT LIKE TABLE OF ZVIJIRANK WITH HEADER LINE.

INTERFACE I1.

METHODS : GETDATA.

ENDINTERFACE.

CLASS CL1 DEFINITION.

PUBLIC SECTION.

INTERFACES I1.

ENDCLASS.

CLASS CL2 DEFINITION.

PUBLIC SECTION.

INTERFACES I1.

ENDCLASS.

CLASS CL1 IMPLEMENTATION.

METHOD I1~GETDATA.

SELECT * FROM ZVIJIRANK INTO TABLE IT.

ENDMETHOD.

ENDCLASS.

CLASS CL2 IMPLEMENTATION.

METHOD I1~GETDATA.

SELECT * FROM ZVIJIRANK INTO TABLE IT WHERE REG_NO = '101'.

ENDMETHOD.

ENDCLASS.

DATA: OBJ1 TYPE REF TO CL1,

OBJ2 TYPE REF TO CL2.

START-OF-SELECTION.

CREATE OBJECT: OBJ1 , OBJ2.

CALL METHOD OBJ1->I1~GETDATA.

LOOP AT IT.

WRITE : / IT-REG_NO , IT-NAME , IT-BRANCH.

ENDLOOP.

CALL METHOD OBJ2->I1~GETDATA.

LOOP AT IT.

WRITE : / IT-REG_NO , IT-NAME , IT-BRANCH.

ENDLOOP.

If you have doubt means go through the following links.

http://help.sap.com/saphelp_nw04/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm

kindly reward if found helpful.

cheers.

Hema.

Former Member
0 Kudos

Is your answer relevant ?

kostas_tsioubris
Contributor
0 Kudos

Hi,

for your first question you can use something like this.

SET PARAMETER ID 'BUK' FIELD T_INT_FRT-BUKRS.

This way, the popup won't appear and the bukrs value will change according the value into t_int_frt-bukrs.

Br

Kostas

Edited by: Kostas Tsioubris on Jan 25, 2008 12:55 PM

Former Member
0 Kudos

Hi Kostas

Thank you for your response . By the time you responded i too got the same idea and implemented . It works fine. Set parameter with the internal table . So BDC wil populate with the company code given

in the file .

Thanks allot!

Raja

Former Member
0 Kudos

Raja and Hema -

I came across your note while looking into a somewhat related issue.

We are using MIRO with a third party package for Invoice Processing. We are running into a problem when posting items for Planned Delivery Costs.

We need to find a way a way to make the RM08M-XWARE_BNK field default to Planned Delivery costs - - Or even better, we would like to make the default value for this field a User-Parameter.

I tried to update the Screen Number 6211 to assign a Parameter ID for this field, but it appears that this is not an option.

Are you aware of any ways to do this without modifying the standard SAPLMR1M program, or the associated Include programs?

Any input would be very much appreciated!

0 Kudos

HI Kennth

Guess you are refreing abt screen field RM08M-XWARE_BNK , and you would like to assign default value . Did you try assigning user parameter to internal table and intern refer itab-field (Default value ) with screen field ?

Or else you can set parameter id if the value is constant always using set parameter .

Thank you

Raja

Former Member
0 Kudos

I have the following issue.

I lauch the MIRO, by a call transaction with a program custom. I don't pass the save instruction, because the user wants to see the results and save byhimself.

Based on the purchase order type I need to set a different layout, for example 4_6350 for the PO type A and 5_6350.

My call transaction passes this value to the bdc session, but this has no effect and the layout is always 7_6310. More over I can't change the layout manually.

Could you help me please?

Thanks a lot in advance.

Daniela