We have added search box. Key in SAP issue keyword to search
TopBottom

Announcement: wanna exchange links? contact me at sapchatroom@gmail.com.

RE:[sap-dev] MM01 Not Working in Background Mode

Posted by Admin at
Share this post:
Ma.gnolia DiggIt! Del.icio.us Yahoo Furl Technorati Reddit

Reply from mic-bv on Mar 6 at 3:15 AM
Hi Vita D,
Guess your Batch-Routines are in either
INCLUDE ZSDUPLCEK. or
INCLUDE ZHRU_TOP.

Please check, if there's an option to open a BDC_Insert and a BDC_Open in there. It's quite easy to make a Batch Folder within your coding, and it might help you find the problem when processed in Background:

Instead of perform BDC_Transaction....
use something like:

call function 'BDC_INSERT'
exporting
TCode = Transakt " <--- Transaction-Code - here MM01
tables
DynproTab = XBdcdata <-- The table you generated with BDC_Dynpro and perform BDC_Field
EXCEPTIONS
INTERNAL_ERROR = 1
NOT_OPEN = 2
QUEUE_ERROR = 3
TCODE_INVALID = 4
PRINTING_INVALID = 5
POSTING_INVALID = 6
OTHERS = 7.

and insert a:
call function 'BDC_OPEN_GROUP'
exporting
client = SY-Mandt
group = VGroup
user = SY-UName.

when the first record is processed at:
LOOP AT RECORD.
PERFORM BDC_DYNPRO USING 'SAPLMGMM' '0060'.

(meaning: if sy-TabIx = 1. call function.... endif.)

at the end of that loop:
if sy-SubRC eq 0.
call function 'BDC_CLOSE_GROUP'.
endif. " sy-SubRC eq 0.




by doing so you generate a batch-Folder, which you can see in SM35 and process there. You'll be able to see the Batchinput data, see error-messages after running it etc.

Alternative:
within the "form BDC_Transaction"
(it's within the includes as mentioned above)
check if the coding is similar like:

call transaction transakt
using xbdcdata
mode p_hellkz " A = anzeigen, e = dunkel
messages into xMessTab. <<<<---- that's the important part

Afterwards you'll have the messages generated from MM01 within your xMessTab, you can printout any warnings and errors and see if there are some hints within.

Please check if you get any messages / warnings which will give you a hint about the problem. If you can't help yourself, reply again here.

Stefan

---------------Original Message---------------
From: vhietha_darwis
Sent: Tuesday, March 04, 2014 4:34 AM
Subject: MM01 Not Working in Background Mode

Dear experts,

Hi All, I wrote some BDC program for material(MM01). We have 4 steps for imputing new pipe material. First we use MM01 which is work on Basic data1, basic data2, classification. The second step is using CU41, nest is the third step using MM01(purchasing, MRP1, MRP2, MRP3, MRP4, Work Scheduling, General Plan Data/Storage 1, General Plan Data/Storage 2, Accounting 1, Accounting 2, Cost Estimate 1, Costing 2) and the last one using also MM01 for Sales Org Data 1, Sales Org Data 2, Sales : General/Plan data.

So using SHDB I'm capturing every step of it and make 4 BDC program. The first program working fine, the second one sometimes its working fine sometimes it cannot work, and the third also the fourth only working in the first line.
But all the BDC program will work fine if I using foreground mode(A). It goes very smooth with this mode.
Can anyone help me to solve this?
Thank you in advance.

Vita D

 
Reply to this email to post your response.
 
__.____._
Manage Settings | Unsubscribe | Create FAQ | Send Feedback
  
Copyright © 2014 Ziff Davis, Inc. and message author.
Ziff Davis, Inc. 28 E 28th Street New York, NY 10016
mic-bv  

achievements
 
Mark as helpful
View this online
Ask a new question
 
In the Spotlight
Become a blogger at Toolbox.com and share your expertise with the community. Start today.

_.____.__

0 comments:

Post a Comment

T r a n s l a t e to your language