Hi Jose,
This development was done almost 4 years back and can give you the general overview of the solution.
The program is done in 3 steps
1. Characteristics creation
2. Update Characteristic values
3. Create master grid number using IDOC.
1. Create characteristic.
BAPI_CHARACT_CREATE - BAPI to create the characteristics
BAPI_TRANSACTION_COMMIT - BAPI commit to characteristic
2. Update Characteristic values
BAPI_CHARACT_CHANGE -> BAPI to update the value of the characteristics.
BAPI_TRANSACTION_COMMIT - BAPI commit to characteristic
3. Create Master Grid
Use FM IDOC_CREATE_ON_DATABASE to create the idoc and FM
APPLICATION_IDOC_POST to post the idoc
The Basic type & Message Types are J3AGRI02 & J3AGRI
Please check and let me know in case of any questions.
will try to answer your questions
Regards,
Phani