2006 Jul 19 9:21 AM
Hi,
i have one issue when i activate wrapped Z_BAPI_PO_CREATE.
Function Module Z_BAPI_PO_CREATE
Statement "FBGENMAC" is not defined. Check your spelling. spelling.
so what is fbgenmac? and how can i activate Z_BAPI_PO_CREATE copied from BAPI_PO_CREATE?
generate data record
fbgenmac 'BAPI_PO_CREATE'.
DATA: l_common_plant LIKE ekpo-werks,
l_common_vsr LIKE ekpo-ltsnr.
DATA: lt_itemaddrzav TYPE mepoitemaddrzav OCCURS 0 WITH HEADER LINE.
DATA: po_header_ch LIKE bapiekkoc,
po_address_ch LIKE bapiaddress, "489310
po_header_add_ch LIKE bapiekkoa. "606768
DATA: ls_header_tech LIKE bapitech.
docu: initialize
refresh all internal fields and tables
CLEAR: return, cekko, cekpo, ceket, cekkn, cadr, cesll, ceskl, cesuh,
cesuc.
REFRESH: return, ceket, cekkn, cesll, ceskl, cesuh, cesuc.
PERFORM po_refresh TABLES return.
CALL FUNCTION 'MS_REFRESH_STORAGE'.
CHECK exitflag EQ space.
CLEAR transaction_id.
Assigning BAPI-execution.
bapi_mode = 'X'.
if bypass_bapi = 'X'.
PURCHASEORDER = '90000001'.
EXIT.
endif.
thanks
venjamin
2006 Jul 19 9:31 AM
Hi,
I assume you want the variable <b>fbgenmac</b> should have the value <b>'BAPI_PO_CREATE'</b>.
Declare it in this way.
DATA : fbgenmac(14) TYPE c VALUE 'BAPI_PO_CREATE'.Regards,
Arun S.
2006 Jul 19 9:31 AM
Hello,
While activating choose your main program and other related components and activate it.
Hope this will help you.
Reward for helpful answers.
thanks,
krishna
2006 Jul 19 9:31 AM
Hi,
I assume you want the variable <b>fbgenmac</b> should have the value <b>'BAPI_PO_CREATE'</b>.
Declare it in this way.
DATA : fbgenmac(14) TYPE c VALUE 'BAPI_PO_CREATE'.Regards,
Arun S.
2006 Jul 19 9:57 AM
hi,
fbgenmac issue is disappear, but some many error happened.
Field "CEKKO" is unknown. it is neither in one of the specified tables nor defined by a DATA statement.
the following is same issue.
mepointemaddrzav,
cekpo, ceket, cekkn, cadr, cesll, ceskl, cesuh,
cesuc.
message is that "these table does not exist"
i already tried tables : cekpo... it is same.
is it come to many issue when you copy BAPI_PO_CREATE usally?
DATA: l_common_plant LIKE ekpo-werks,
l_common_vsr LIKE ekpo-ltsnr.
DATA: lt_itemaddrzav TYPE mepoitemaddrzav OCCURS 0 WITH HEADER LINE.
DATA: po_header_ch LIKE bapiekkoc,
po_address_ch LIKE bapiaddress, "489310
po_header_add_ch LIKE bapiekkoa. "606768
DATA: ls_header_tech LIKE bapitech.
docu: initialize
refresh all internal fields and tables
CLEAR: return, cekko, cekpo, ceket, cekkn, cadr, cesll, ceskl, cesuh,
cesuc.
2006 Jul 19 10:01 AM
Hi Venjamin ,
Beside copying the code , I think you should also copy the includes which are there in the standard FM (or the one which are part of that function group) or else just put include <includename> . in youor code .
Hope this helps .
Thanks ,
Shounak M.
Message was edited by: Shounak M
2006 Jul 19 10:37 AM
Hi,
Please ignore the previous post.
<b>FBGENMAC</b> is a Macro Definition.
Its a include file, copy that Include file and name its as <b>FBGENMAC</b> .
The field <b>CEKKO</b> is defined in the incude <b>LMEWPTOP</b>.
<b>Copy the whole function group and then activate it.</b>
<b>Best way to do this is.</b>
1. Goto se80
2. Open the function group
3. CLICK on the function group.
4. Right-click and select COPY !
5. In this way, it will copy
all includes, top files, all functional modules .
6. A new window will come
there u have to specify the NEW name
of the related function module,
for all FM's.
Let me know if any further errors.
Regards,
Arun Sambargi.