Call CA22 in BDC program

来源:互联网 发布:mac如何使用搜狗输入法 编辑:程序博客网 时间:2024/05/16 17:08

In this blog i will  describe the key point of calling CA22 in BDC program.

First,batch input program always have a data source.And i select the excel document as my data source.The excel document has five columns,they are plant,material,work center, base quantity and production time.The base quantity and production time are the new value for the corresponding work center.Of course ,first step is to upload data to internal table from excel document.

Second,get all group counter and sequence data under one material and work center.What this operation result? From a CA22's user point,if he or she want to positon a specific work center,he must know the group counter and sequence first. In another word,if we want to know where this work center,we must get the group center and sequence first. But group counter and sequence are not the last data we need to use in BDC call.

Third,determine the index of the specific work center.What this mean? It is mean the index of the specific work center under specific sequece.Sometimes,one work center will occurs within several group counters or several sequences,but the index will different.We must get the real index of the work center .And use the index data to determine the OK_CURSOR value during the BDC call.Below is my logic to get index data information.

1) Loop in one line of the upload internal table.
2) Get group counter collection(MAPL-PLNAL) of this material and object id collection(CRHD-OBJID) of this 
work center.
3) Get task list nodes of the work center from table PLPO using object id information.
4) Get group counters and sequences and task list nodes of this work center from table PLAS using task list nodes information.
5) Use group counter to determine the group counter index from table MAPL.Use sequence to determine the sequence index from table PLFL.Use task list node to determine work center index from table PLPO.

Now,we get all information for calling CA22 in BDC.

原创粉丝点击