Batch Input Physical Inv.
Any onee can help how to process Batch input Physical Inventory carried out.
MI31, MI34 and MI37.
thanks
k Raj.
Hi
when you are using MI34 for entering counts, make sure that already invenntory documents are created and for the same you are going to enter count. also make user that the template you are using it should suit with the session.
please check in documentation about template:
The data for the batch input session is imported from an external dataset as a sequential file. The structure of the sequential file is preallocted by the table BISEG. You can display and print this structure via the information system in the data dictionary. Note that the object class Fields is chosen on the request screen of the information system.
regards
Srinivas
Similar Messages
-
regards,
still need the t-codes for the following:
Batch Input: Physical Inventory document for cycle counting, vendor consignment,project stk and ABC Analysis for cycle counting. thanksIM level see:
MI01 Create Physical Inventory Document
MI02 Change Physical Inventory Document
MI03 Display Physical Inventory Document
MI04 Enter Inventory Count with Document
MI05 Change Inventory Count
MI06 Display Inventory Count
MI07 Process List of Differences
MI08 Create List of Differences with Doc.
MI09 Enter Inventory Count w/o Document
MI10 Create List of Differences w/o Doc.
MI11 Recount Physical Inventory Document
MI12 Display changes
MI20 Print List of Differences
MI21 Print physical inventory document
MI22 Display Phys. Inv. Docs. f. Material
MI23 Disp. Phys. Inv. Data for Material
MI24 Physical Inventory List
MI31 Batch Input: Create Phys. Inv. Doc.
MI32 Batch Input: Block Material
MI33 Batch Input: Freeze Book Inv.Balance
MI34 Batch Input: Enter Count
MI35 Batch Input: Post Zero Stock Balance
MI37 Batch Input: Post Differences
MI38 Batch Input: Count and Differences
MI39 Batch Input: Document and Count
MI40 Batch Input: Doc., Count and Diff. -
Physical inventory With the help of Batch input method
Dear all;
Can anyone tell me the procedure of Physical inventory procedure with batch input method ?
kindly Give me the step .
Thanking you;
Regarsds;
Joydeep mukherjeeHi,
Go through this following code,
selection-screen begin of block B2 with frame title TEXT-005.
selection-screen begin of line.
parameters: P_BIRPT type C radiobutton group RAD1 default 'X' user-command UCOMM.
selection-screen comment 3(20) TEXT-002 for field P_BIRPT.
selection-screen end of line.
selection-screen begin of line.
parameters: P_COLRPT type C radiobutton group RAD1.
selection-screen comment 3(20) TEXT-003 for field P_COLRPT.
selection-screen end of line.
selection-screen begin of line.
parameters: P_PAYRPT type C radiobutton group RAD1.
selection-screen comment 3(20) TEXT-004 for field P_PAYRPT.
selection-screen end of line.
selection-screen end of block B2.
selection-screen begin of block B1 with frame title TEXT-001.
select-options: SO_KTOKD for KNA1-KTOKD modif id M4,
SO_BLART for BSIS-BLART modif id M2.
parameters: P_PAID type ZCLEAR modif id M3 as listbox visible length 20.
selection-screen end of block B1.
at selection-screen output.
loop at screen.
if P_BIRPT eq 'X'.
if SCREEN-GROUP1 = 'M2' or SCREEN-GROUP1 = 'M3' .
SCREEN-INVISIBLE = '1'.
SCREEN-ACTIVE = '0'.
modify screen.
endif.
elseif P_COLRPT eq 'X'.
if SCREEN-GROUP1 = 'M3'.
SCREEN-INVISIBLE = '1'.
SCREEN-ACTIVE = '0'.
modify screen.
endif.
elseif P_PAYRPT eq 'X'.
if SCREEN-GROUP1 = 'M2'.
SCREEN-INVISIBLE = '1'.
SCREEN-ACTIVE = '0'.
modify screen.
endif.
if SCREEN-GROUP1 = 'M4'.
SCREEN-INVISIBLE = '1'.
SCREEN-ACTIVE = '0'.
modify screen.
endif.
endif.
endloop.
Thanks
Anil D -
Dear Expert,
I run t-code MICN for generate session cycle physical inventory but i have problem when process the result session with t-code SM35. The error message :
- Field name not valid in the batch input data (error message 00-346)
- Transaction MI01 (SAPMM07I screen 700)
Need help to solve this problem, thanksHi
The error occurs because,
1. You tried to provide a field name in a screen with data using batch input, and the field does not exist
or
2. You tried to provide a field name in a screen with data using batch input, and the field's name is "Space" and/or has "Space"
as field value.
What you can do is
1. Correct the BDCDATA table by using a valid field name in the screen.
2. Use transaction SM35, function Session (F8) to analyze the session that was created, position the cursor on the screen
where the error occurred, and press Data (F16).
If the list of field names and values contains empty lines - that is field name and/or value are SPACE - you must change the report that creates the batch input sessions.
Thanks !
E.Avudaiappan
Edited by: Avudaiappan E on Jun 3, 2011 7:10 AM -
Manual Bank statement-batch input session
Hi experts,
I have done manual bank statement settings and tried entries in Dev server.
Once i post the entries from FF67, I was able to see a session created in SM35.
Once we started using the Prd Server the batch input session is not getting created automatically.
I have checked the Specifications settings where I have already mentioned further processing as a batch in the baground (generate as batch). The Prd server is accessed through VPN.
Once I posted the statement in FF67 in Prd Server, I am not able to see any session created in SM35.
Please help me in resolving this problem.Does it needs any BASIS settings or any thing else?
Points will be awarder for the best.Thanks for your replies my friends,
Let me clarify few more things..There is no problem with Manual bank statement configuration.
The server is not with the client at the moment. Client is accessing the Prd Server through VPN access.
In the initial screen of FF67, while chosing the Varinat for manual bank statement I have mentioned Run as a Batch in the back ground which is option number 2.
After doing all entries in manual bank statement, the client has saved it and posted. The status in overview says Manually entered only.
But on the next day when I went to my workplace (where Prd server is physically present) I accessed the same posting of the statement and it was successful. A batch got created and the next day I went to clients place and made them process the batch. Again they posted another statement and the again the same problem. (no batch got generated).
Now I feel that the option 2 I have opted (gerate as a batch in the back ground) could be the problem.
Coz the client accessed the server through VPN and was unsucessful in creating batch & I accessed the server through LAN in the office and was successful in generating a batch. Now I am confused whether to change the option 2 to Option 1 which is gerate as a batch-generate online. Please advice me regarding this. Coz I dont want to take risk of changing it without confirmation.
Thanks -
Intial Entry using Batch input.
Hi,
This initial inventory data entry is generally carried out via batch input , Can u plase let me know how to proceed the batch input for this.
What are the steps are involved for doing Bacth input/session.
Best Regards
RamHi Hare Ram,
You have a Batch Input Process for Physical Inventory i.e MI31 and series which will create a physical inventory doc and will help you in creating a doc for no of materials. I think that is the best way. I am not sure why you need to take the help of ABAP for creating a doc of physical Inventory.
Try MI31 and it should work for you.
Revert back if it works.
I am using the same process here. Also i have put a question for MI32 & MI34 ans still waiting for some response from some of the gurus.
Regards
Rajeev -
Batch input of a list of values
Hello,
I have to make a batch input of a list.
The screen of the transaction contains a list with 9 lines, if i enter a value in one, another line is added to the list.
I did record this transaction and have an incremented list in the generated program that looks like this :
it begins whith ADRPCIT-POST_CODE(01) and increments till 09
perform bdc_dynpro using 'SAPLSZRL' '0400'.
perform bdc_field using 'BDC_CURSOR'
'ADRPCDCITY-POST_CODE(08)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'ADRPCDCITY-POST_CODE(08)'
record-POST_CODE_08_017.
perform bdc_dynpro using 'SAPLSZRL' '0400'.
perform bdc_field using 'BDC_CURSOR'
'ADRPCDCITY-POST_CODE(09)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'ADRPCDCITY-POST_CODE(09)'
record-POST_CODE_09_018.
perform bdc_dynpro using 'SAPLSZRL' '0400'.
perform bdc_field using 'BDC_CURSOR'
'ADRPCDCITY-POST_CODE(09)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_dynpro using 'SAPLSZRL' '0400'.
perform bdc_field using 'BDC_CURSOR'
'ADRPCDCITY-POST_CODE(07)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'ADRPCDCITY-POST_CODE(07)'
record-POST_CODE_07_019.
perform bdc_dynpro using 'SAPLSZRL' '0400'.
perform bdc_field using 'BDC_CURSOR'
'ADRPCDCITY-POST_CODE(08)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'ADRPCDCITY-POST_CODE(08)'
record-POST_CODE_08_020.
perform bdc_dynpro using 'SAPLSZRL' '0400'.
perform bdc_field using 'BDC_CURSOR'
'ADRPCDCITY-POST_CODE(09)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'ADRPCDCITY-POST_CODE(09)'
record-POST_CODE_09_021.
perform bdc_dynpro using 'SAPLSZRL' '0400'.
perform bdc_field using 'BDC_CURSOR'
'ADRPCDCITY-POST_CODE(09)'.
perform bdc_field using 'BDC_OKCODE'
'=SAVE'.
What i did is setting the value of the incremented number to 09 if it's greater than 09 but i'm not sure it's the right way to do it cause i get only 9 records
My code :
LOOP AT gt_record ASSIGNING <fs_record>.
IF sy-tabix > 9.
ligne = 9.
ELSE.
ligne = sy-tabix.
ENDIF.
IF ligne > 1.
IF city_mem EQ <fs_record>-city_code_001.
flag_end = 'X'.
ELSE.
PERFORM bdc_field USING 'BDC_OKCODE'
'=SAVE'.
PERFORM bdc_transaction USING 'SR10'.
CLEAR flag_end.
ENDIF.
ENDIF.
city_mem = <fs_record>-city_code_001.
IF flag_end NE 'X'. "premier passage
PERFORM bdc_dynpro USING 'SAPLSZRC' '0100'.
PERFORM bdc_field USING 'BDC_CURSOR'
'ADRCITYD-CITY_CODE'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'ADRCITYD-CITY_CODE'
<fs_record>-city_code_001.
PERFORM bdc_field USING 'ADRCITYD-COUNTRY'
'FR'.
PERFORM bdc_field USING 'ADRCITYD-LANGU'
'F'.
PERFORM bdc_dynpro USING 'SAPLSZRC' '0200'.
PERFORM bdc_field USING 'BDC_CURSOR'
'ADRCITYD-COMMU_CODE'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'ADRCITYD-FLAG_STRTS'
'X'.
PERFORM bdc_field USING 'ADRCITYD-CITY_NAME'
<fs_record>-city_name_005.
PERFORM bdc_field USING 'ADRCITYD-REGION'
<fs_record>-region_006.
PERFORM bdc_field USING 'ADRCITYD-TIME_ZONE'
'CET'.
PERFORM bdc_field USING 'ADRCITYD-COMMU_CODE'
<fs_record>-commu_code_008.
PERFORM bdc_field USING 'ADRCITYD-DEF_LANGU'
'F'.
PERFORM bdc_dynpro USING 'SAPLSZRC' '0200'.
PERFORM bdc_field USING 'BDC_CURSOR'
'ADRCITYD-CITY_NAME'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=PSTC'.
PERFORM bdc_field USING 'ADRCITYD-FLAG_STRTS'
'X'.
PERFORM bdc_field USING 'ADRCITYD-CITY_NAME'
<fs_record>-city_name_005.
PERFORM bdc_field USING 'ADRCITYD-REGION'
<fs_record>-region_006.
PERFORM bdc_field USING 'ADRCITYD-TIME_ZONE'
'CET'.
PERFORM bdc_field USING 'ADRCITYD-COMMU_CODE'
<fs_record>-commu_code_008.
PERFORM bdc_field USING 'ADRCITYD-DEF_LANGU'
'F'.
* PERFORM bdc_dynpro USING 'SAPLSZRL' '0400'.
ENDIF.
PERFORM bdc_dynpro USING 'SAPLSZRL' '0400'. "ajout2
lignec = ligne.
CONCATENATE 'ADRPCDCITY-POST_CODE(' lignec ')' INTO cp.
PERFORM bdc_field USING 'BDC_CURSOR'
cp.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING cp
<fs_record>-post_code_01_016.
ENDLOOP.
* deniere sauvegarde
PERFORM bdc_field USING 'BDC_OKCODE'
'=SAVE'.
PERFORM bdc_transaction USING 'SR10'.
CLEAR flag_end.
PERFORM close_group.
PERFORM close_dataset USING dataset.
Can somebody help me on this one ?
Thank you,
Tom.If it is table control you may have to pass PageDown after 9 rec & again start with (01)
record number remains 1 to 9 but Top_line parameter will change to 9or10 after 1 pagedown.
Cxould be P++
you can record Pagedown & check recording. -
Manual bank statement: no batch input was generated
Hi,
maybe somebody has a clue with this problem regarding FF67: after the data processing, no batch input is generated in order to post the bank statement.
Please, I need your help with an OSS note or with a posting solution without batch input ( I tried to process the bank statement with "processing type = 4", but it didn't work).Hi Andrea,
Try to add value in <i>Session name for bank postings</i>
Do not hesitate to ask for further clarifications. Award points if useful.
Regards,
Siva -
Batch input session is not generating In BRS
Hello,
I am uploading bank statement through ZFF67 program manual bank statement, after entering all the line items in the file, batch input session is not generating in SM35.
Please give advice.
Thanks,
RatnamHi,
Go to environment - specification- here you need to maintain settings for batch input processing in T.code FF67.
I am not exactly remembering the menu option name. The sub option name is Specification, these settings you need to change with your user id.
Check and revert back still the same problem exists.
Regards,
Sankar -
Is it possible to maintain a view vai Batch Input
Hi guys,
The user required to develop a BDC program to upload the data source from outside of SAP, and maintain these data into a view via Tcode: SM34. But it seems the view doesn't support Batch input.....
Can anybody tell me, is it possible to maintain a view via Batch input? Many thanks!
Brian LiuAdditional information:
This requirement is to upload the Overhead Rate data from outside of SAP, and maintained via KZM2 or SM34. But when I tried to record a BDC for KZM2, it seems that the SAP can not support batch input.
I find a SAP note 208474, it says:
Symptom
Overhead rates of the costing sheet of the overhead rates, which have been created, changed or deleted via batch input or Call Transaction, are not saved.
The same rates are saved if processing is carried out via Transaction KZZ2 or the Implementation Guide IMG.
Cause and prerequisites
Processing the Customizing transactions for maintaining the overhead rates of the costing sheet (Transaction KZZ2, KZM2) is
not supported in the batch input. This corresponds to the SAP standards according to which Customizing transactions in general need not necessarily be capable of batch input.
The batch input data of the overhead rates are not saved in the standard because processing is terminated by a COMMIT WORK. This statement ensures that the internal tables for the transport of the overhead rates are only deleted if their transfer to the database tables to be transported has been processed successfully.
Solution
The subsequent modification allows batch input processing of the overhead rates, by suppressing the COMMIT WORK statement. As a result of the modification, the tables in the transport request of the overhead rates may be incomplete in single cases.
In cases where the overhead rates have not been transferred completely to the target system after implementation of the modification, include the overhead rates again in a transport request, repeat the transport and, if necessary, subsequent processing.
Note that the attached modifications are not and will not be included in the R/3 standard system.
I modified the sap standard program L0COEF04 according to another SAP note 150041, but after the modification, I still couldn't record the BDC.
Anybody who have ever met the same situation, or can give me some suggestion? With many thanks!
Brian Liu -
How to check whether a batch input session is completed in ABAP program
I have created a ABAP program to create a batch input session (reference to RSBDCSUB). After the creation of the batch input session, I kick it to start and read the execution log. However, sometimes I cannot read anything from the execution log as the execution of the batch input is a synchronized process to the execution of my program, i.e. at the time being that I try to read the log of a particular transaction, that transaction is being processing / haven't start processing.
How can I check whether a batch input session is completed in the program?
The code that corresponding to the triggering of batch input session:
SUBMIT (SUBREPORT)
USER MTAB-USERID
VIA JOB MTAB-GROUPID
NUMBER JNUMB
WITH QUEUE_ID EQ MTAB-QID
WITH MAPPE EQ MTAB-GROUPID
WITH MODUS EQ 'N'
WITH LOGALL EQ LMODUS
Or is there any method to wait here until the process is completed before further processing?Hi gundam,
1. Or is there any method to wait here until the process is completed before further processing?
There is no such direct method to wait.
2. Immediately after submitting in background,
we cannot wait
neither can we LOOP and go on detecting
whether the b/g process has completed or not !
3. To over come such problems,
we have to use another technique.
4. we have to submit another
job which will get triggered
on event SAP_END_OF_JOB
ie. when the original job will finish,
our new job will AUTOMATICALLY get triggered,
5. This new job / program
will do the FURTHER actions !
regards,
amit m. -
Batch input for IQ02 not accepting "yes" for 'POPUP_TO_CONFIRM'
Hello,
I wrote a batch input for a transaction (IQ02) and all works fine except one thing:
-when all data is entered and SAVE button is pressed, there is an additional pop-up, from an user exit which needs an YES/NO answer.
The function module used to display the popup is: 'POPUP_TO_CONFIRM'
I do not manage to press the YES button. This is the data I receive when pressing F1 on YES button:
Program SAPLSPO1
Function OPT1
Normally, in batch input, this is the way I pass user-commands:
PERFORM bdc_dynpro USING 'SAPMIEQ0' '0101'.
PERFORM bdc_field USING 'BDC_OKCODE' '/00'.
But it's not working for this particular situation.
Any ideas?
Thank you.
Edited by: Julius Bussche on Jan 5, 2009 2:07 PM
Quality of subject title improved.Hi
Find out under which condition popups appears.
for that condition you have to put the following code
PERFORM bdc_dynpro USING 'SAPLSPO1' ''<SCREEN_NUMBER>'.
PERFORM bdc_field USING 'BDC_OKCODE' '=OPT1' .
Hope this helps,
Rajat -
Error while creating a product group--Batch input error 9
Hi,
While creating a product group in T-code MC84, getting the error message" Product group can not be created (Batch input error 9)". Would appreciate providing yr help to resolve above issue.
Thks,
NileshHi Neel,
As ponited by you, the material type "PROD" is realted with creation of product group.I am able to resolve the error, "actually the work schedulling & MRP views were not activated for "PROD" resulting in the above error.
Thks for yr help.
Regards,
Nilesh -
BDC programming using Batch input Session.
Hello Experts.
I'm an ABAP beginner. I've benn practicing BDC programming using Batch input Session
at the moment.
This is the program that upload Local file which has plural records, and put the records into a Session.
These are the records.
413459,KIM EI HWAN121 ,19810607,MIADONG1234
423459,KIM EI HWAN122 ,19810607,MIADONG1235
433459,KIM EI HWAN123 ,19810607,MIADONG1236
443459,KIM EI HWAN124 ,19810607,MIADONG1237
453459,KIM EI HWAN125 ,19810607,MIADONG1238
463459,KIM EI HWAN126 ,19810607,MIADONG1239
I succeeded making Session.
However, for some reaseon, every record in the Session has got the same, value which is the first record.
Why is this happening? And How can I correct the code below?
REPORT ZBCUSER002_BATCH NO STANDARD PAGE HEADING
LINE-SIZE 255
MESSAGE-ID ZBATCH.
= Types definition ===================================================
TYPES: BEGIN OF TYP_LOCAL, "For Local file upload
RECORD(200) TYPE C,
END OF TYP_LOCAL.
= Internal table definition ==============================================
DATA: BEGIN OF BDC_TAB OCCURS 0. "BDCDATA itab
INCLUDE STRUCTURE BDCDATA.
DATA: END OF BDC_TAB.
DATA: BEGIN OF MESSAGE_BDC OCCURS 0. "Message itab
INCLUDE STRUCTURE BDCMSGCOLL.
DATA: END OF MESSAGE_BDC.
DATA: TBL_LOCAL TYPE STANDARD TABLE OF TYP_LOCAL, "Local file itab
F_TBL TYPE FILETABLE. "FILETABLE fot local
= Structure table definition =========================================
DATA: STR_F_TBL LIKE LINE OF F_TBL, "FILETABLE structure
STR_LOCAL TYPE TYP_LOCAL. "Local file structure
= Variable definition ================================================
DATA: LV_RC TYPE I, "Method parameter
ENUMBER TYPE ZT601-ENUMBER, "Employee number
NAME TYPE ZT601-NAME, "Employee name
BIRTH TYPE ZT601-BIRTH, "Birthday
HOMETOWN TYPE ZT601-HOMETOWN, "Hometown
SYSVAL TYPE SY-SUBRC. "System valuible
= Constants definition ===============================================
CONSTANTS: TBL_NAME(10) TYPE C VALUE 'ZT601'. "Table name ZT601
= Parameters definition ==============================================
PARAMETERS: F_NAME TYPE RLGRAP-FILENAME OBLIGATORY, "File path
EXECMODE(1) TYPE C. "Execute mode
INITIALIZATION
*----- Initialize all valuables, structures and internal tables
CLEAR: LV_RC,
STR_F_TBL,
STR_LOCAL,
ENUMBER,
NAME,
BIRTH,
HOMETOWN.
REFRESH: F_TBL,
TBL_LOCAL.
AT SELECTION-SCREEN
*----- When the button next to Parameter 'F_NAME',
*----- File dialog open.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR F_NAME.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
EXPORTING
WINDOW_TITLE = 'SELECT FILE'
DEFAULT_FILENAME = '*.TXT'
CHANGING
FILE_TABLE = F_TBL
RC = LV_RC
EXCEPTIONS
FILE_OPEN_DIALOG_FAILED = 1
CNTL_ERROR = 2
OTHERS = 3
*----- system valiable check.
*----- If done properly,
*----- Put the path into the File path parameter
IF SY-SUBRC = 0.
READ TABLE F_TBL INTO STR_F_TBL INDEX 1.
F_NAME = STR_F_TBL.
*----- If not done properly, show message
*----- An error occured while getting file path then end program
ELSE.
MESSAGE E000.
ENDIF.
*----- Execute code can only be A or N.
AT SELECTION-SCREEN ON EXECMODE.
IF EXECMODE <> 'A' AND EXECMODE <> 'N'.
MESSAGE E001.
ENDIF.
START-OF-SELECTION
START-OF-SELECTION.
*----- Upload Local file of file path parameter.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = F_NAME
FILETYPE = 'ASC'
TABLES
DATA_TAB = TBL_LOCAL
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
OTHERS = 6.
*----- System valiable check.
*----- If not done properly, show an error message
*----- An error occured while uploading local file then end program
IF SY-SUBRC <> 0.
MESSAGE E002.
ENDIF.
PERFORM BDC_OPEN.
*----- Loop Internal table
LOOP AT TBL_LOCAL INTO STR_LOCAL.
*----- Spilt the file record and put them into each valiable.
SPLIT STR_LOCAL AT ',' INTO ENUMBER
NAME
BIRTH
HOMETOWN.
*----- Data check Function module
CALL FUNCTION 'DATE_CHECK_PLAUSIBILITY'
EXPORTING
DATE = BIRTH
EXCEPTIONS
PLAUSIBILITY_CHECK_FAILED = 1
OTHERS = 2.
*----- When error occurs while checking date, show an error message.
*----- (&1) is not date
IF SY-SUBRC <> 0.
MESSAGE E003 WITH BIRTH.
ENDIF.
*-- The first screen of SE11
*----- Screen number 0102 of program id SAPMSRD0
PERFORM BDC_DYNPRO USING 'SAPMSRD0' '0102'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'RSRD1-TBMA_VAL'. "Field on Cursor
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=SHOW'. "Display button
PERFORM BDC_FIELD USING 'RSRD1-TBMA'
'X'.
PERFORM BDC_FIELD USING 'RSRD1-TBMA_VAL'
TBL_NAME. "ZT601
*-- Table definition screen
*----- Screen number 2000 of program id SAPLSD02
PERFORM BDC_DYNPRO USING 'SAPLSD02' '2000'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'DD02D-TABCLTEXT'. "Field on Cursor
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=TDED'. "Create entry
PERFORM BDC_FIELD USING 'BDC_SUBSCR'
'SAPLSD02'.
PERFORM BDC_FIELD USING 'BDC_SUBSCR'
'SAPLSED5'.
*-- Data input screen
*----- Screen number 0101 of program /1BCDWB/DBZT601
PERFORM BDC_DYNPRO USING '/1BCDWB/DBZT601' '0101'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'ZT601-CRUSER'. "Field on Cursor
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=SAVE'. "Save
PERFORM BDC_FIELD USING 'ZT601-MANDT'
SY-MANDT. "Client
PERFORM BDC_FIELD USING 'ZT601-ENUMBER'
ENUMBER. "Employee number
PERFORM BDC_FIELD USING 'ZT601-NAME'
NAME. "Employee name
PERFORM BDC_FIELD USING 'ZT601-BIRTH'
BIRTH. "Birthday
PERFORM BDC_FIELD USING 'ZT601-HOMETOWN'
HOMETOWN. "Hometown
PERFORM BDC_FIELD USING 'ZT601-CRDATE'
SY-DATUM. "System date
PERFORM BDC_FIELD USING 'ZT601-CRTIME'
SY-UZEIT. "System time
PERFORM BDC_FIELD USING 'ZT601-CRUSER'
SY-UNAME. "System user
*-- Data input screen (After input)
*----- Screen number 0101 of program /1BCDWB/DBZT601
PERFORM BDC_DYNPRO USING '/1BCDWB/DBZT601' '0101'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/EBACK'. "Back
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'ZT601-CRUSER'. "Field on Cursor
*-- Table definition screen]
*----- Screen number 2000 of program SAPLSD02
PERFORM BDC_DYNPRO USING 'SAPLSD02' '2000'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'DD02D-TABCLTEXT'. "Field on Cursor
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=WB_BACK'. "Back
*-- The first screen of SE11
*----- Screen number 0102 of program SAPMSRD0
PERFORM BDC_DYNPRO USING 'SAPMSRD0' '0102'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'RSRD1-TBMA_VAL'. "Field on Cursor
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=BACK'.
PERFORM BDC_FIELD USING 'RSRD1-TBMA'
'X'.
PERFORM BDC_FIELD USING 'RSRD1-TBMA_VAL'
TBL_NAME.
PERFORM BDC_INSERT.
ENDLOOP.
PERFORM BDC_CLOSE.
FORM BDC_DYNPRO *
Put Program-Id, Dynpro screen number, Start point
into DBCDATA
--> PROGRAM *
--> DYNPRO *
FORM BDC_DYNPRO USING PROGRAM DYNPRO.
CLEAR BDC_TAB.
BDC_TAB-PROGRAM = PROGRAM.
BDC_TAB-DYNPRO = DYNPRO.
BDC_TAB-DYNBEGIN = 'X'.
APPEND BDC_TAB.
ENDFORM.
FORM BDC_FIELD *
Put Field Name and Value into BDCDATA
--> FNAM *
--> FVAL *
FORM BDC_FIELD USING FNAM FVAL.
CLEAR BDC_TAB.
BDC_TAB-FNAM = FNAM.
BDC_TAB-FVAL = FVAL.
APPEND BDC_TAB.
ENDFORM.
FORM bdc_process *
FORM BDC_OPEN.
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
CLIENT = SY-MANDT
GROUP = 'Testsession'
KEEP = 'X'
USER = SY-UNAME.
IF SY-SUBRC <> 0.
MESSAGE E006 WITH SY-SUBRC.
ENDIF.
ENDFORM.
FORM bdc_insert *
FORM BDC_INSERT.
CALL FUNCTION 'BDC_INSERT'
EXPORTING
TCODE = 'SE11'
TABLES
DYNPROTAB = BDC_TAB
EXCEPTIONS
INTERNAL_ERROR = 1
NOT_OPEN = 2
QUEUE_ERROR = 3
TCODE_INVALID = 4
PRINTING_INVALID = 5
POSTING_INVALID = 6
OTHERS = 7.
IF SY-SUBRC <> 0.
MESSAGE E007 WITH SY-SUBRC.
ENDIF.
CLEAR: BDC_TAB.
ENDFORM.
FORM bdc_close *
FORM BDC_CLOSE.
CALL FUNCTION 'BDC_CLOSE_GROUP'
EXCEPTIONS
NOT_OPEN = 1
QUEUE_ERROR = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE E008 WITH SY-SUBRC.
ENDIF.
ENDFORM.God I forgot to refresh Internal table after putting record into Session.
Now I'm done.
You guys be careful too. -
Error in batch input through a job (mm01)
Hi,
I have a problem with a batch input on MM01.
I want to extend material for a new center and I do it through a batch input. If I execute this batch input with F8 and in mode = 'N', it ends ok.
The problem is when I run this program with a job, the material is not added to the new center.
Can anyone help me?
Thanks,
Liliana.Hi,
Try using BAPI BAPI_MATERIAL_SAVEDATA...
Check this link for a sample code..
http://www.sap-img.com/abap/bapi-to-copy-materials-from-one-plant-to-another.htm
Thanks,
Naren
Maybe you are looking for
-
File name field not generating dynamic file name for report printing
Hello Folks, I have a report region on a page and have enabled report printing. I would like to have the file name generated dynamically. So, I add the substitution string, say "&P1_CUSTOMER_NAME." (no quotes). The output file I get is literally name
-
SKYPE ABUSIVE CHARGES OF NON COMPLETED CALLS!
I like the idea of a class action against Skype for abusive charging of non completed calls. I sometimes call the same number and it drops 2-3-4 times before it can connect and Sleaze Skype charges me CAD 0.096 for EVERY ONE of those dropped calls. C
-
Can't connect to mobile broadband using the Ericsson MBM F3705g
Hello, I am able to connect to the Three.co.uk mobile broadband using a Huawei E156G modem but when I try to slot the sim card in my Ericsson MBM F3705g, which is incorporated to my laptop, I can't get it to work [16:40:20][root@phusis] [/home/lcoume
-
Java.io.IOException: Not enough space when running external command
Hi All, I am trying to call gzip utility from my servlet. The code line is as below : Runtime runtime = Runtime.getRuntime(); Process process = runtime.exec("gzip -f -9 " +fileName); I got the followi
-
Creative Photo Montage: worth it?
Anyone try this DVD out? http://www.aeprojects.com/swf/cpmt/sampleclip.htm Looks pretty cool. Looking for photo montage tutorials. Thanks, Simon