‎2006 Jan 30 11:40 AM
hi
i need to upload the data for service master record i.e Tcode AC01.when i do recoring im only able to view the display mode,im not getting the write mode.when i goto tcode AC01 directly,than i'm able to view the create button,how to upload into that help me out
‎2006 Jan 30 11:45 AM
Hi Babita!
When you are recording the transaction, you have to click the create button by which that event will be recorded in to field in the recording program. you have to pass 'X' to that field in the BDC program.
Regards
Kishore
‎2006 Jan 30 11:48 AM
hi kishore im not even ale to see the create or any edt button when im in recoding mode.
‎2006 Jan 30 11:54 AM
hi,
you need to populate the BDC table manually by trail and error, i don't know even for me it is not giving the same. you need to take help of F1 and F9 and get the field names and populate the bdc table.
regards
vijay
‎2006 Jan 30 11:53 AM
Hi babita
sorry! currently i dont acess to open the transaction AC01
‎2007 Mar 23 9:56 AM
Hi pal!
I have just created a test program that uploads a single service through transaction AC02. Be aware that the number range used MUST be external.
Change the j_2gbii00 include and the Batch input performs for your system. This include comes from our Hellenization package and is therefore not suitable for you, but I believe that you can change it accordingly and easily.
The code is as follows:
-
&----
*& Report ZTESTAC02
*&
&----
*&
*&
&----
REPORT ztestac02.
Global definitions for BI
INCLUDE j_2gbii00.
CONSTANTS DEFINITIONS *****************************
CONSTANTS: c_true(1) TYPE c VALUE '1',
c_false(1) TYPE c VALUE '0'.
Table for BI
DATA: BEGIN OF my_bdc OCCURS 0.
INCLUDE STRUCTURE bdcdata.
DATA: END OF my_bdc.
Messages from BI
DATA: messtab LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE.
DATA: wl_asnum LIKE asmd-asnum.
DATA: ok_flag(1) TYPE c.
PARAMETERS: p_mode(1) DEFAULT 'A',
p_asnum like asmd-asnum OBLIGATORY.
START-OF-SELECTION.
SET PARAMETER ID 'ASN' FIELD '000000000000000000'.
First screen
PERFORM bdc_dynpro TABLES my_bdc USING 'SAPLBAS0' '0300'.
PERFORM bdc_field TABLES my_bdc USING 'BDC_OKCODE' 'NEW'.
PERFORM bdc_dynpro TABLES my_bdc USING 'SAPLBAS0' '0300'.
PERFORM bdc_field TABLES my_bdc USING 'ASMD-ASNUM' p_asnum.
PERFORM bdc_field TABLES my_bdc USING 'ASMDT-ASKTX' 'Lioumis test 2 BI'.
PERFORM bdc_field TABLES my_bdc USING 'ASMD-ASTYP' 'ZAB'.
PERFORM bdc_field TABLES my_bdc USING 'ASMD-MEINS' 'AU'.
PERFORM bdc_field TABLES my_bdc USING 'ASMD-MATKL' '33'.
PERFORM bdc_field TABLES my_bdc USING 'ASMD-TAXIM' '1'.
PERFORM bdc_field TABLES my_bdc USING 'ASMD-BKLAS' '5016'.
PERFORM bdc_field TABLES my_bdc USING 'BDC_OKCODE' 'POST'.
CALL TRANSACTION 'AC02'
USING my_bdc
MODE p_mode UPDATE 'S'
MESSAGES INTO messtab.
IF sy-subrc <> 0.
FORMAT COLOR COL_NEGATIVE.
FORMAT COLOR OFF.
ELSE.
GET PARAMETER ID 'ASN' FIELD wl_asnum.
ENDIF.
PERFORM save_text USING 'ASMD'
'LTXT'
wl_asnum
'These are the comments!!'
CHANGING ok_flag.
REFRESH: my_bdc, messtab.
CLEAR: my_bdc, messtab.
&----
*& Form save_text
&----
Save text
----
-->P_TDOBJECT Text Object
-->P_TDID Text-ID
-->P_TDNAME TDName
-->P_NOTES Comments to add
<--P_OK_FLAG Set to C_TRUE if Sales Order created
----
FORM save_text USING value(p_tdobject)
value(p_tdid)
value(p_tdname)
value(p_notes)
CHANGING p_ok_flag.
DATA: BEGIN OF t_header.
INCLUDE STRUCTURE thead.
DATA: END OF t_header.
DATA: BEGIN OF tlines OCCURS 0.
INCLUDE STRUCTURE tline.
DATA: END OF tlines.
DATA: wl_len TYPE i,
wl_off TYPE i,
wl_cnt TYPE i,
wl_msg(100).
t_header-tdobject = p_tdobject.
t_header-tdname = p_tdname.
t_header-tdid = p_tdid.
t_header-tdspras = sy-langu.
t_header-tdform = 'SYSTEM'.
t_header-TDLINESIZE = '070'.
Split p_notes at 72 columns
wl_len = STRLEN( p_notes ).
IF wl_len <= 70.
tlines-tdline = p_notes.
APPEND tlines.
ELSE.
tlines-tdline = p_notes+0(70).
APPEND tlines.
tlines-tdline = p_notes+70.
APPEND tlines.
ENDIF.
DESCRIBE TABLE tlines LINES t_header-tdtxtlines.
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
header = t_header
insert = 'X'
savemode_direct = 'X'
TABLES
lines = tlines
EXCEPTIONS
id = 1
language = 2
name = 3
object = 4
OTHERS = 5.
IF sy-subrc <> 0.
p_ok_flag = c_false.
WRITE 'Comments cannot be added to service %' TO wl_msg.
REPLACE '%' WITH p_tdname INTO wl_msg.
EXIT.
ENDIF.
Prepare long texts for update (but keep them in the memory)
CALL FUNCTION 'COMMIT_TEXT'
EXPORTING
keep = 'X'
object = 'ASMD'.
UPDATE asmdt set kzltx = 'X'
where asnum = wl_asnum.
ENDFORM. "save_text
Message was edited by:
George Lioumis
‎2007 Oct 08 8:59 PM
George,
hello, I do my Batch Input but stop in the subscreen Basic Dates, no put me values and the Batch Input lost it.
I put de Service Number Internal. Do you have any help?
This is my code.
PERFORM bdc_dynpro USING 'SAPLBAS0' '0310'.
PERFORM bdc_field USING 'BDC_CURSOR' 'RMAS0-ASNUM'.
PERFORM bdc_field USING 'RM11R-SEL_ESSR' 'X'.
PERFORM bdc_field USING 'BDC_OKCODE' '=ENTE'.
PERFORM bdc_dynpro USING 'SAPLBAS0' '0300'.
PERFORM bdc_field USING 'BDC_CURSOR' 'ASMD-ASNUM'.
PERFORM bdc_field USING 'BDC_OKCODE' '=NEW'.
PERFORM bdc_dynpro USING 'SAPLBAS0' '0300'.
PERFORM bdc_field USING 'BDC_CURSOR' 'ASMD-ASTYP'.
PERFORM bdc_field USING 'ASMD-ASNUM' '%_1'.
PERFORM bdc_field USING 'ASMDT-ASKTX' WA_DATA-ASKTX.
PERFORM bdc_field USING 'ASMD-MEINS' WA_DATA-MEINS.
PERFORM bdc_field USING 'ASMD-ASTYP' WA_DATA-ASTYP.
PERFORM bdc_field USING 'BDC_OKCODE' 'TYPC'.
PERFORM bdc_dynpro USING 'SAPLBAS0' '0300'.
PERFORM bdc_field USING 'BDC_CURSOR' 'ASMD-MATKL'.
PERFORM bdc_dynpro USING 'ASMD-MATKL' WA_DATA-MATKL.
PERFORM bdc_dynpro USING 'ASMD-SPART' WA_DATA-SPART.
PERFORM bdc_dynpro USING 'ASMD-BKLAS' WA_DATA-BKLAS.
PERFORM bdc_dynpro USING 'ASMD-MSTAE' WA_DATA-MSTAE.
PERFORM bdc_dynpro USING 'ASMD-MSTDE' SY-DATUM. "WA_DATA-MSTDE.
PERFORM bdc_dynpro USING 'ASMD-EAN11' WA_DATA-EAN11.
PERFORM bdc_field USING 'BDC_OKCODE' '=POST'.
OPCIONES ****************
opt-dismode = 'A'.
opt-UPDMODE = 'S'.
opt-CATTMODE = ' '.
opt-defsize = 'X'.
opt-NOBINPT = 'X'.
CALL TRANSACTION 'AC02' USING bdcdata OPTIONS FROM opt MESSAGES INTO IT_MESSAGES.
‎2007 Oct 08 9:33 PM
I do it.
This is the error.
PERFORM bdc_dynpro USING 'SAPLBAS0' '0300'.
PERFORM bdc_field USING 'BDC_CURSOR' 'ASMD-MATKL'.
PERFORM bdc_field USING 'ASMD-MATKL' WA_DATA-MATKL.
PERFORM bdc_field USING 'ASMD-SPART' WA_DATA-SPART.
PERFORM bdc_field USING 'ASMD-BKLAS' WA_DATA-BKLAS.
PERFORM bdc_field USING 'ASMD-MSTAE' WA_DATA-MSTAE.
PERFORM bdc_field USING 'ASMD-MSTDE' WA_DATA-MSTDE.
PERFORM bdc_field USING 'ASMD-EAN11' WA_DATA-EAN11.
PERFORM bdc_field USING 'BDC_OKCODE' '=POST'.
My Batch Input Run well.
Bye
‎2016 Feb 03 5:45 AM
Hi, record t code ac02 instead of ac01, you will find the create icon in that transaction.