Skip to Content
0
Former Member
Jan 25, 2008 at 02:44 AM

Urgent : BDC PROBLEM WITH MIRO Transaction

1035 Views

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