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: 

regarding BDC

Former Member
0 Kudos

Dear guys,

I have problem in Batch input program.

we have written batch input program to upload text file containting one record.

Text data contains records for Companycode 100, the structure like this delimted by tab.

Comp

code Year GLacct no amount

100 2004 045N 081100100 -65000000 -65000000 -65000000 -70000000 -65000000 -70000000 -70000000 -70000000 -86000000 -111000000 -127000000 0

when i used this text file to upload.its not uploading uploaded to table glt0 even though it works fine for

company code 200 or 790.

Yes, if i just try for changing Companycode 100 to 200 or 790 it gets uploaded fine without any problem.

only in case of companycode 100, I get not working. why is it. How can i debug and where could be the problem.

can some body help me.

Ambichan

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hey Ram,

Just now i confirmed that problem is with only client 500,

all other client works fine.

By default, All client except 500, allows only 8 digit input for account code, where as in client 500, allows me to input 9digit code.

so can i come to conclusion that problem is due to config settings or setting problem.is it correct?

if so can you pls guide me what can be the nearest reason for this change in screen for the particular client.

if we have any particular setting to be change, then pls tell me i can check with that..

ambichan.

Message was edited by: ambi chan

27 REPLIES 27

Former Member
0 Kudos

In you CALL TRANSACTION statement change the mode as 'A' instead of 'N'.

Then you would be able to see the problem for yourself as screens will be shown to you.

I think there is some the error at the time of processing that you would come to know and then you need to solve it accordingly.

Thanks,

Ram

0 Kudos

hey Ram,

Thanks, I am using BDC not Call transaction.

How can i check this mode in bDC..open,insert and close.?

Ambichan

0 Kudos

Hi Ambichan,

Then in that case it should be creating a BDC session.

Actaully both are called BDCs only..CALL Xn and Session methods of BDC.

If you are not processing your session from within your program then you should check if a session is created in Xn SM35 and process it from there .

It will also help you in looking at the screens or error sessions. Just check out there and let me know if you find anything over there !!

There will be a few tabs , check all and see if a session is created/processed recently.

If it was not processed properly then it should be there in incorrect tab.

If you could not find any session created over there in that case you should debug your program to check if the file is getting uploaded and BDCDATA is populated properly.

Message was edited by: Ram Manohar Tiwari

Message was edited by: Ram Manohar Tiwari

0 Kudos

hey RAM,

thanks for your reply.

Condition here is i get Session in SM35.

It was successfully executed. also i debugged the code

i can see data get poplulated at BDCDATA..i can see all SY-subrc to be normal.

that what i am wondering where the problem is...

In case of 200 companycode also same thing but i datas are updated.

anyother alternative..

see code as below

perform frm_open_group using tmp_sess sy-uname.

check wk_subrc = 0.

perform frm_bdc_insert

using cns_trcd tmp_sess.

check wk_subrc = 0.

perform frm_close_group using tmp_sess.

check wk_subrc = 0.

perform frm_submit " ƒZƒbƒVƒ‡ƒ“‚ðŽÀs‚·‚éB

using tmp_sess sy-uname.

0 Kudos

I will suggest keep a breakpoint at check wk_subrc = 0 stmt in the code below.

perform frm_close_group using tmp_sess.

check wk_subrc = 0.

By this time your session is created but not processed.

Let the program be standstill at the breakpoint.

open another session for Xn SM35 and check the session .

it should be there as new.

Then process it from there in foreground mode.

Please let me know ..I would be leaving for office soon.

Message was edited by: Ram Manohar Tiwari

andreas_mann3
Active Contributor
0 Kudos

Hi ambi,

for what transaction is your bdc ?

Which error mess. you've got in bdc-protocol ?

regards Andreas

Former Member
0 Kudos

Dear Andreas,

Thanks for your continuation.

I am working with transaction GP12.

do we have any problem with this transaction flow..because..

for 200 and 700 I can retrieve GL code 81100100 with 8digits length.

but i heard there is some prob when Company code is 100 and to fetch GL account code

we have to add "0" before 81100100 is it?(I am not 100%sure of this fact)

whatever it is..i am struck up here..

As per Ram..i continued till creating new Session at SM35 and i was trying to execute it by clicking clock icon.

now its running..and it seems taking long time for this process..let me check out for some more time..

In the mean while...BTW, I dont get any error message while executing my program..thats the problem i could not

debug.

could u pls follow me...

AMbichan.

Message was edited by: ambi chan

0 Kudos

Hi ambi,

sorry but Gp12 isn't my profession.

i've no possib. to test your bdc.

-> the only hint i can give you is to the account

-> map the field with conversion-extit alpha:

data: out_racct type glt0-racct.

PERFORM ALPHAFORMAT(SAPFS000) USING in_racct out_racct.

and transfer out_racct to the according dynpro field

regards Andreas

0 Kudos

hey andreas,

Thanks for your hint.

Actually i find the problem in GP12 transactionwith screen SAPMGPLN.

where i can enter the GL account code say example 81100100 into textbox and click enter

will take you to the corresonding account code 8110100 textbox from the list.

Problem here is while i enter GP12 with 100 company code, 8digit 8110100 code entering

in text box, does not matches the search.(unless 0 is added to 8110100 as 08110100)

where as for 200 companycode, no need to give 0 in front, it automatically finds search with this

8 digit code. why is this.

This looks strange in my environment..could yuu pls tell me whether its SAP BUG or

only with my environment.

Already i have done what u have said can u check below code. difference is

data TMP_SAKNR_SAP LIKE SKB1-SAKNR is declared instead of GLt0-saknr.

-


DATA:

TMP_SAKNR_SAP LIKE SKB1-SAKNR,

TMP_SAKNR_OUT(09) TYPE C.

LOOP AT ITAB_PLAN01 WHERE ( BUKRS = P_BUKRS )

AND ( RYEAR = P_RYEAR ).

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

INPUT = ITAB_PLAN01-SAKNR

IMPORTING

OUTPUT = TMP_SAKNR_SAP.

IF TMP_SAKNR_SAP CN '0123456789'." i iimoto

MOVE TMP_SAKNR_SAP+0(8) TO TMP_SAKNR_OUT. " i iimoto

ELSE. " i iimoto

MOVE TMP_SAKNR_SAP+2(8) TO TMP_SAKNR_OUT. " i iimoto

ENDIF. " i iimoto

PERFORM FRM_BDC_SAPMGPLN_2210

USING CNS_FN_FIND TMP_SAKNR_OUT CNS_OK_ENT.

ambichan.

0 Kudos

Dear andreas,

one more thing is,

Why in screen SAPMGPLN, Account code text field differs

in width by 8 or 9 sometimes..is it fixed lenght for the text field or dynamic.

Is this not standard bug?

ambichan

Former Member
0 Kudos

BTB, I have one doubt here..

I just made breakpoint in program and program is still in debug mode, not executing the session thru SUBMIT statement.

In the mean time i tried to execute the Session by SM35.its executing by showing hourglass..icon..but

i want to know whether i want to executed the remaining program after executing SM35 session. or only executing SEssion is enough to confirm error.?

BEcause while executing session i did not get any screens coming up..fastly.

Ambichan

0 Kudos

Ambi,

Are you executing the session in foreground from SM35?

If yes then how come you diddn't get any screen ?

Did you check the log in SM35? Paly around with SM35.

you have the mouse to click and a screen right there in front of you, how come you guys manage to not play with it

After the breakpoint you may not execute your program.

Cheers,

Ram

0 Kudos

Hey Ram,

Sorry to trouble u more.

Yes i executed the session in forground.

and i found that In transaction GP12, screen SAPMPLG,

The GL account code setted in text box is not retrieving the correct one from the list of Accountcode, Instead

it take very first one GL account code in the list

and session continues.

so if we think Problem is with Account code, then i have to say that only for Company code100 has this problem and where as for Company code 200 it works fine with the same record datas.

i think problem is with matching the account code..sometimes it works fine and sometime it not.why.

Thats the problem. what i have paste above code does matters. if y ou have some idea on this pls suggest me

ambichan.

0 Kudos

you can't select from F4 value list in a BDC .

You should determine it in your program and populate it in BDCDATA.

Determine Account code and populate it in BDCDATA.

Thanks,

Ram

0 Kudos

hey Ram,

I am determining the account code not selecting from F4.

problem here is next step is not proceeding taking this account code as input...

if u could see that screen u can find my point.

ambichan

0 Kudos

Does that mean that config is not there ..

Is the account code applicable for 1000 company code?

Why don't you do this transaction from outside the BDC.

Just as a normal trasnaction and input the same data to check ?

And then discuss with your FI functional conaultant if it's a config issue.

Thanks,

Ram

0 Kudos

Hi Ambichan,

Sorry for not reading your last post before replying , earlier. But it was a busy day for me in the office.

The problem might be due to number range / account range config difference. you can check this with some help from your FI consultant. And check it outside BDC , just by using Xn directly and entering similar data.

But if you are sure that in case of Ccode 1000, adding 0 before Account works , then you can use alpha conversion exit as suggested by others.

Thanks,

Ram

Former Member
0 Kudos

Hi ambi,

From your discussions you had mentioned that due to GL not being popualted properly its not executing fully , put a condition before the perform BDCXXX that if the company code is being entered is Gl account number should begin with 0 for company code 200, and if the company code is 100 to use the FM "CONVERSION_EXIT_ALPHA_OUTPUT" this would help you place a 0 before the GL account number if the company code is 200 and it will negate if the company code is 100 (depends on your condition)

Regards

Seshi

GP12 transactionwith screen SAPMGPLN.

where i can enter the GL account code say example 81100100 into textbox and click enter

will take you to the corresonding account code 8110100 textbox from the list.

Problem here is while i enter GP12 with 100 company code, 8digit 8110100 code entering

in text box, does not matches the search.(unless 0 is added to 8110100 as 08110100)

where as for 200 companycode, no need to give 0 in front, it automatically finds search with this

8 digit code. why is this.

This looks strange in my environment

Former Member
0 Kudos

Dear experts,

Thanks for your replies.

today let me explain my problem in particular.

we have two clients 900development sys and 500 prod sys.

I checked GL12 transaction scree in both clients with respect to company code 100.

In client 900(dev), It allows me only 8 digits account code to be entered and it proceeds fine.

(Without BDC, direct entry in GLP12 trcd date updates fine)

but in client 500(prod), It allows me 9 digits account code to be entered, and asking for adding 0 before the

account code.(Without BDC, direct entry in GLP12 trcd date does not update data fine, unless you add 0 at the begining, if u enter only8 digits acct code, then it takes first accout no by default and proceeds the process)

Note : only for ccode 100, its like this(ie, allowing 9 digits at textbox), all other company code it allows only 8 digit code.

i want to find the reason why it is, as i dont have FI consutlant with me here..atleast i want to point out exact reason for the problem.

thats why i am struggling..here

Hope u understand. further advise pls.

Actually my old colleague did codedlike this in case of alpha exits conversion

could you pls check and tell if anything can be changed and check here.

DATA:

TMP_SAKNR_SAP LIKE SKB1-SAKNR,

TMP_SAKNR_OUT(09) TYPE C.

LOOP AT ITAB_PLAN01 WHERE ( BUKRS = P_BUKRS )

AND ( RYEAR = P_RYEAR ).

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

INPUT = ITAB_PLAN01-SAKNR

IMPORTING

OUTPUT = TMP_SAKNR_SAP.

/* here by default my colleagueis taking 8 digit and continuing the process..

hope thats why the problem

IF TMP_SAKNR_SAP CN '0123456789'." i iimoto

MOVE TMP_SAKNR_SAP+0(8) TO TMP_SAKNR_OUT. " i iimoto

ELSE. " i iimoto

MOVE TMP_SAKNR_SAP+2(8) TO TMP_SAKNR_OUT. " i iimoto /* condition goes here always with100

ENDIF. " i iimoto

PERFORM FRM_BDC_SAPMGPLN_2210

USING CNS_FN_FIND TMP_SAKNR_OUT CNS_OK_ENT.

ambichan.

Former Member
0 Kudos

hey Ram,

Just now i confirmed that problem is with only client 500,

all other client works fine.

By default, All client except 500, allows only 8 digit input for account code, where as in client 500, allows me to input 9digit code.

so can i come to conclusion that problem is due to config settings or setting problem.is it correct?

if so can you pls guide me what can be the nearest reason for this change in screen for the particular client.

if we have any particular setting to be change, then pls tell me i can check with that..

ambichan.

Message was edited by: ambi chan

0 Kudos

Hi Ambichan,

I don't think the field length can be altered in this case. So only problme seems to me is account range specified in your 500 client.

Check SNRO ( Number Range Settings ) for accounts .

I am not really sure as what is the NR object for this.

I think i this case they have specified the number range to be 9 digits in place of 8 digits.

But try to find it. Also accounts assignment to company codes might give you some idea. Take help from any FI consultant or else I will try to reply again after I'll have a SAP system to check.

Further, don't change anything without knowing the implications specially if your client 500 is a production client.

Thanks,

Ram

0 Kudos

Sorry this is not a NR config.

Try the Xn OBR1 / OBR2 and check digits for your Accounts.

In SPRO you can check

Financial Accounting > General Ledger > Accounting > G/L Accounts > Master Records >>

Also Check Xn OBD4 for account group config.

In SPRO

Financial Accounting „_ General Ledger Accounting „_ G/L Accounts „_ Master Records „_ Preparations „_ Define Account Group

0 Kudos

Dear Ram,

Thanks for your sound voice.

i am also searching myself...in the mean time if you could find pls show me the place to confirm it.

I just want to show them difference why this page is strange.

ambichan..

0 Kudos

Dear Ram.

I checked SPRO and OBR1/OBR2.

i have never used this before..could you pls be more specific to check the points.

ambichan

0 Kudos

Hi Ambichan,

There is no point in checking the settings though because you will not be abler to correct the settings.

It will have a larger implications.

Just in your program select the account number from main G/L account table

<<<<

concatenate '%' bdc_account_var into var_account_no.

like SELECT single <HKONT- not sure> inot bdc_account_no FROM SAKA1 < Not sure again > into var_account_no

where HKONT like var_account_no.

Also use other key fields in where clause.

Further, use this bdc_account_no further.

Former Member
0 Kudos

Ram,

small doubt from me here..

r u looking for account number range for a particular company code 100 or generally?

because..i want to tell you that

In client 500, for other company codes except 100,

account number range(ie,text box in tr-cd GP12) is 8 only.

Only with 100 company code it appears as 9digit in textbox.

r we both in same frequency?

ambichan

Former Member
0 Kudos

Dear Ram,

Thanks for all the help.

well, since my customer have one more client 400(which works fine)

they are ready to use that environment.

since my BDC program works in all environment except 500, and at customer code 100,

they told us to just find the reason for the strange screen.

so anyway i found the reason why my BDC did not get updated. so i am relieved from this stuff.

However, we are in need of locating the exactproblem, eventhough we cant change settings or anything

we need exact cause for the abnormal behaviour in the screen.

since this post supported me for long time, once i will close this thread and i will

continue with next thread with new question.

Thanks for your fulll support RAM, However i will catch you in next thread..ahah

ambichan.