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: 

Problem during Rate Routing Upload using BDC.

Former Member
0 Kudos

Dear Sir/Madam,

I am uploading Rate Routings using a BDC program which is working perfectly but having a single problem.

In the initial screen of the transaction CA21(Create Rate Routing), I need to enter only the Material Number and its Plant and all the other fields should be left blank.

But, here the group number field is automatically getting filled with the previous value and it is incrementing the group counter number.

I want the system to allocate different group number for each Routing. I want the group number to be unique.

Thanks,

Ranjan.

6 REPLIES 6

Former Member
0 Kudos

Hi,

I the BDC when you are recording why dont you try to record the step of clearing that field too and use that in the program.

Regards,

Himanshu

0 Kudos

Dear Himanshu,

While recording I cleared that field and used the same recording in my program but still I dont know from where it is picking a value for that field.

0 Kudos

Hi

I think it is picking up the value from the parameter id. So clear the parameter id and set your value to the paramerter id and try.

Hope it will solve your problem.

Regards,

Gowri Sankar

0 Kudos

Hi,

I hope you have checked if it works in all screen mode. Also my understanding is that the group is to group a number of tasks in one group so that in case a change is required you can use this number to change all of the tasks(routing). I think if a number is not assigned on the initial screen the system might do it based on the material and plant combination that you are using based on a number range it is already maintaining. So even if your clearing is working and you can still see a GROUP number assigned check if it is the same number assinged to a the same conbination of mat and plant. A work around to have new group numbers for each individual group would be to create youor own number range and use that to assign numbers to this field.

Himanshu.

Former Member
0 Kudos

Hi,

Clear the group number field value while populating the value of material number and plant in CA21(BDC).

Regards,

Gowri Sankar

Former Member
0 Kudos

Dear Ranjan,

While doing recording CA21. you would pass only the material number and plant (i mean you did recording of CA21 based on material number as well as plant not for routing number (group counter))

Routing number (group counter) dynamic (In your case Internal number rage has assigned).

So the Problem is:

1st record of you internal table update smoothly because you program will pass only material and plant

group counter (RC271-PLNNR) field is blank, after update 1st record system will regenerates the

group counter number.

ones the system updates the data it will generates Group counter number and assign to filed 😞RC271-PLNNR).

after saving the record system will go loop statement of you program. again program will call the call transaction statement with 2nd record of the internal table. call transaction statement pass the material number and plant field at ca21. but group counter number automatically poulated in the screen field because that time system can't be refresh the initial screen of CA21,

so system will shows previous updated screen ( 1st routing record will show)

***********************************************

Remove your bdc perform and add this code in your BDC perform.

-----------------------------------------------------------------

*----------------------------------------------------------------------*

*        Start new screen                                              *

*----------------------------------------------------------------------*

FORM BDC_DYNPRO USING PROGRAM DYNPRO.

   CLEAR BDCDATA.

   BDCDATA-PROGRAM  = PROGRAM.

   BDCDATA-DYNPRO   = DYNPRO.

   BDCDATA-DYNBEGIN = 'X'.

   APPEND BDCDATA.

ENDFORM.

*----------------------------------------------------------------------*

*        Insert field                                                  *

*----------------------------------------------------------------------*

FORM BDC_FIELD USING FNAM FVAL.

   IF FVAL <> SPACE.

     CLEAR BDCDATA.

     BDCDATA-FNAM = FNAM.

     BDCDATA-FVAL = FVAL.

     APPEND BDCDATA.

   ENDIF.

*--------------------------------------------------------------------------*

*                Clearing the Group Counter                                *

*--------------------------------------------------------------------------*

   IF FVAL = SPACE.

     CLEAR BDCDATA.

     BDCDATA-FNAM = FNAM.

     BDCDATA-FVAL = FVAL.

     APPEND BDCDATA.

   ENDIF.

------------------------------------------------------------------------------------------------

above code: 1st time of call transaction FVAL = space means ( group counter field is blank)

2nd and rest of the time FVAL <> space. means (previous record group number exists for new call transaction ) so system will be by pass with new record.

Check with debugging mode. you will come to whats going in you code.

Even i have go same problem while uploading routing data. i have find out solution after doing my RND.

Regards,

Akshath