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: 

G/L Account in MIRO :BADI

Former Member
0 Kudos

Hi Experts,

My requirement is to update the G/L a/c number according the material Group enterd in the PO.

While running MIRO, I need to give the G/L a/c to which the amount is going to be posted. This G/L has to be validated based on the Material group in the PO.

Based on Matgroup, G/L number should be picked up. if the user selects the diffrerent G/L, system should throw an error , that, this is not the G/L and so and so si the correct G/L.

I am trying to do it in INVOICE_UPDATE , BADI, but, when I tried, No Matgroup field in the interface parameters. If I could find the Matgroup there, I can determine the G/L.

Pls suggest me regarding.

Regards,

Sujatha.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

In the method CHANGE_AT_SAVE

parameter TI_RSEG_NEW uses

<b>MRM</b> Type Group is used which consists of

TYPES: BEGIN OF mrm_idoc_data_ers,

s_rbkp LIKE rbkp,

t_rseg_x LIKE rseg OCCURS 0,

t_ekbe1 LIKE ekbe OCCURS 0,

t_ekko LIKE ekko OCCURS 0,

t_ekpo LIKE ekpo OCCURS 0,

t_bset LIKE bset OCCURS 0,

t_t001w LIKE t001w OCCURS 0,

t_mara LIKE mara OCCURS 0,

t_makt LIKE makt OCCURS 0,

t_marm LIKE marm OCCURS 0,

t_eina LIKE eina OCCURS 0,

t_essr LIKE essr OCCURS 0,

s_addr1_val LIKE addr1_val,

s_lfa1 LIKE lfa1,

it consists of

t_mara LIKE mara OCCURS 0,

t_makt LIKE makt OCCURS 0,

so from these tables you get MATKL (material group) use it along with GL account as the MRM type group consists hell lot of info.

Reward points if useful

Regards

Anji

6 REPLIES 6

Former Member
0 Kudos

Hi

In the method CHANGE_AT_SAVE

parameter TI_RSEG_NEW uses

<b>MRM</b> Type Group is used which consists of

TYPES: BEGIN OF mrm_idoc_data_ers,

s_rbkp LIKE rbkp,

t_rseg_x LIKE rseg OCCURS 0,

t_ekbe1 LIKE ekbe OCCURS 0,

t_ekko LIKE ekko OCCURS 0,

t_ekpo LIKE ekpo OCCURS 0,

t_bset LIKE bset OCCURS 0,

t_t001w LIKE t001w OCCURS 0,

t_mara LIKE mara OCCURS 0,

t_makt LIKE makt OCCURS 0,

t_marm LIKE marm OCCURS 0,

t_eina LIKE eina OCCURS 0,

t_essr LIKE essr OCCURS 0,

s_addr1_val LIKE addr1_val,

s_lfa1 LIKE lfa1,

it consists of

t_mara LIKE mara OCCURS 0,

t_makt LIKE makt OCCURS 0,

so from these tables you get MATKL (material group) use it along with GL account as the MRM type group consists hell lot of info.

Reward points if useful

Regards

Anji

0 Kudos

Anji,

But those tables

TYPES: BEGIN OF mrm_idoc_data_ers,

s_rbkp LIKE rbkp,

t_rseg_x LIKE rseg OCCURS 0,

t_ekbe1 LIKE ekbe OCCURS 0,

t_ekko LIKE ekko OCCURS 0,

t_ekpo LIKE ekpo OCCURS 0,

t_bset LIKE bset OCCURS 0,

t_t001w LIKE t001w OCCURS 0,

t_mara LIKE mara OCCURS 0,

t_makt LIKE makt OCCURS 0,

t_marm LIKE marm OCCURS 0,

t_eina LIKE eina OCCURS 0,

t_essr LIKE essr OCCURS 0,

s_addr1_val LIKE addr1_val,

s_lfa1 LIKE lfa1,

are not visible in the method CHANGE_AT_SAVE.

while I tried looking into these tables, its giving like ' Specified table name not recognised'.

Suggest me regarding.

Regards,

Sujatha.

Former Member
0 Kudos

you can get the matnr from the parameters then why dont you select the data from mara i.e. matl grp with the reference of that matnr...

regards

shiba dutta

0 Kudos

Shiba,

in the PO, for our client, material number is not mandatory, so we may or maynot find material number, so no luck in that way. suggest me regarding with some other alternative way.

I had an alternative way, I have taken EBELN,EBELP from TI_RESG_NEW paramenter, and fromthat, I am getting MATKL.

with that MATKL, I can get G/L account number, but this needs to be updated in appropriate place, I cannt get where should I update it.

Pls help me out in this.

Regards,

Sujatha.

Message was edited by:

Sujatha Reddy

0 Kudos

try method <b>change_at_save</b>, i think there u have parameters for G/L data.

Regards

Prabhu

0 Kudos

Hi Prabhu,

I am trying to use G/L data in miro but I do not have experience in BADI.

Can you send me the some code and some documentation in order to make this possible?

Best Regards

João Fernandes