Problem in BDC recording of MM02
hi all,
I am doing recording for MM02 . i am changing material description through MM02.
My problem is that as soon as i save the changes my recording stops.
My requirement is that after saving the changes i want to go back to main screen of MM02 and after that my recording should stop.
Is there is any way to go back to main screen of MM02 after saving the changes in MM02.
Please reply ASAP.
Thanks in advance
Sachin yadav
Hi Sachin,
When you have BAPI for a partcular transaction it is always better to use them, as the screen configuration might have get changed by functionals for example a field might be marked as mandatory etc.
Use the BAPI BAPI_MATERIAL_SAVEDATA for this.
Refer this link for eg. [BAPI_MATERIAL_SAVEDATA|https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/creating%252ba%252bmaterial%252busing%252bthe%252bbapi%252bbapi_material_savedata]
Regards,
Manoj Kumar P
Edited by: Manoj Kumar on Jan 19, 2009 7:08 AM
Similar Messages
-
Hi I am having a problem in BDC Recording. My requirement is that when I input data in transaction fb02 to block the invoices, It shows a list of invoices. Now i need to double click that item(line) in which PK = 06 at runtime during bdc recording. During BDC recording it takes the line number on which we have clicked which is constant but i want it dynamic that if item 1 is having PK=6, that line should be double clicked and if item 3 is having PK=6, the third item should be double clicked to open another screen. Kindly help me... Thanks in advance.
Hi Ravi,
While writing your code that is in your code you know which line number is having the PK = 06, then you can use the same line number and add the code for double click after that.
Regards,
Atish -
I have a problem in BDC Recording?
HI,
When I do recording method in BDC to trasfer legacy in "MM01" (Material Master) "It records scroll bar also when we select Data". Is there any solution.
Thanks & Regards,
GaganHi,
You can also use FM "SELECTION_VIEW_FIND" to find the appropriate Material Master View.
But I agree with Sanjay, why go through the hassle of possibly creating a very complicated BDC (each different material type could concievably be a spearate recording), and use the RMDATIND load program (with LSMW) or even use the BAPI "BAPI_MATERIAL_SAVEDATA" insetad?
Hope this helps.
Cheers,
Pat.
PS. Kindly assign Reward Points to the posts you find helpful. -
Problem in BDC recording for transaction /J4I/015W3A
hello all,
i am recording for transaction /J4I/015W3A it has 4 select options if we enter all select options and press enter it will guide to another screen which has table control . i need the fill the entries there also and save the recording.
i have completed recording with all the steps.
if i try to run the report with this recording the problem is that the first screen the entries which i have entered in select options are not defaulted and instead first enter okcode is getting triggered as there are no values on select options and enter is triggered an error message is displayed saying enter all the values .
how can i over come this problem...........?hi,
while recording, ok code will come first, for each screen you have to kept ok code at last .
This will work.
regards,
pavan -
Problem during BDC recording using wb01
Hi,
I have done recording using the T-Code WB01. While running the recording from SM35 it runs fine. But while the recording is being used to create the program to upload data, the execution stops at one field DELIVERY PRIORITY which is not a mandatory field. We can't proceed further even if the we put some value in the field. Please suggest some solution.
Regards,
UttamDear Mr. Bhowmik,
SAP retail site master data was never batch input enabled. For this reason, during batch input several errors or endless loops could occur. To avoid this, please read note 1274501 and 1400394 which contains some modification proposals .
Please keep in mind, that SAP-Retail Site master does not support Batch Input (Rel. >=4.6C) and for this reason we do not support modification proposals.
SAP recommends the use of CATT/SECATT instead of batch input.
With Best Regards,
Markus Dinger -
Problem uploding flatfile in bom(cs01) using bdc recording
Hi,
I had a problem while uploading flatfile records in bom(cs01) by using bdc recording.
I had four records in flatfile(.txt & xl), i.e., header data with its components.
Sample material:
(Header data) (components)
SOFTDRINKS,WIND,1, ' 14','1','ml','l'
SOFTDRINKS,WIND,1, '11','1','ml','l'
SOFTDRINKS,WIND,1, '13','1','ml','l'
SOFTDRINKS,WIND,1, ' 15','1','ml','l'
while executing, the same component entered while recording has been displayed four times not the ff records.
So, i want to know whether whether ff structure is ok or not,
whether coding is correct or not?
report ZBOM1
no standard page heading line-size 255.
*include bdcrecx1.
DATA: BEGIN OF bdc OCCURS 0,
matnr(18),
werks(4),
stlan(1),
END OF BDC.
DATA: BEGIN OF BDC1 OCCURS 0,
idnrk(40),
MENGE(13),
MEINS(3),
postp(1),
END OF bdc1.
DATA: BEGIN OF BDCDATA OCCURS 0,
matnr(18),
werks(4),
stlan(1),
idnrk(18),
MENGE(18),
MEINS(3),
postp(1),
END OF BDCDATA.
data: ibdcdata type standard table of bdcdata with header line.
*start-of-selection.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = 'C:\Documents and Settings\dilipkumar.b\Desktop\soft.txt'
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = ','
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
VIRUS_SCAN_PROFILE =
NO_AUTH_CHECK = ' '
IMPORTING
FILELENGTH =
HEADER =
TABLES
DATA_TAB = BDCDATA
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*perform open_group.
loop at bdcdata.
perform bdc_dynpro using 'SAPLCSDI' '0100'.
perform bdc_field using 'BDC_CURSOR'
'RC29N-STLAN'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RC29N-MATNR'
'SOFTDRINKS'.
perform bdc_field using 'RC29N-WERKS'
'WIND'.
perform bdc_field using 'RC29N-STLAN'
'1'.
perform bdc_field using 'RC29N-DATUV'
'16.09.2008'.
perform bdc_dynpro using 'SAPLCSDI' '0110'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RC29K-BMENG'
'1'.
perform bdc_field using 'RC29K-STLST'
'1'.
perform bdc_field using 'BDC_CURSOR'
'RC29K-EXSTL'.
perform bdc_dynpro using 'SAPLCSDI' '0111'.
perform bdc_field using 'BDC_CURSOR'
'RC29K-LABOR'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_dynpro using 'SAPLCSDI' '0140'.
perform bdc_field using 'BDC_CURSOR'
'RC29P-POSTP(01)'.
perform bdc_field using 'BDC_OKCODE'
'=FCBU'.
perform bdc_field using 'RC29P-IDNRK(01)'
'11'.
perform bdc_field using 'RC29P-MENGE(01)'
'1'.
perform bdc_field using 'RC29P-MEINS(01)'
'ml'.
perform bdc_field using 'RC29P-POSTP(01)'
'l'.
perform bdc_dynpro using 'SAPLCSDI' '0130'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'BDC_CURSOR'
'RC29P-POSNR'.
perform bdc_field using 'RC29P-POSNR'
'0010'.
perform bdc_field using 'RC29P-IDNRK'
'11'.
perform bdc_field using 'RC29P-MENGE'
'1'.
perform bdc_field using 'RC29P-MEINS'
'ML'.
perform bdc_dynpro using 'SAPLCSDI' '0131'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'BDC_CURSOR'
'RC29P-POTX1'.
perform bdc_field using 'RC29P-SANKA'
'X'.
*perform bdc_transaction using 'CS01'.
*perform close_group.
CALL TRANSACTION 'CS01' USING IBDCDATA MODE 'A' UPDATE 'S'.
REFRESH IBDCDATA.
endloop.
Start new screen *
FORM BDC_DYNPRO USING PROGRAM DYNPRO.
CLEAR iBDCDATA.
iBDCDATA-PROGRAM = PROGRAM.
iBDCDATA-DYNPRO = DYNPRO.
iBDCDATA-DYNBEGIN = 'X'.
APPEND ibDCDATA .
ENDFORM.
Insert field *
FORM BDC_FIELD USING FNAM FVAL.
IF FVAL <> NODATA.
CLEAR iBDCDATA.
iBDCDATA-FNAM = FNAM.
iBDCDATA-FVAL = FVAL.
APPEND iBDCDATA .
ENDIF.Hi Dilip,
You are reading your flat file into an internal table, you perform a LOOP over the read itab, but you are not using your BDCDATA data anywhere into IBDCDATA internal table! Those data have to be filled into FVAL parameter.
Here an additional hint:
1. The content of flat file is delivered as a STRING in GUI_UPLOAD. First you have to post these values into a structured internal table. And then perform the LOOP at this structured table.
2. In the new ABAP concept newer ever user Header Lines (in an internal table). One reason: Header Lines are not allowed in ABAP Objects. Instead use
LOOP AT itab into wa_structure.
*do something with wa_structure
APPEND wa_structure to IBDCDATA.
ENDLOOP.
Good success,
Heinz -
Problem with SM37 BDC recording
Hi ,
I want to change the output device for the job scheduled of 1000 pgms in SM37.
For this i am using BDC recording.
But when i run the recording, it does not fill the data and does not move from 1 screen to other screen.
I have checked the recording, and everything got recorded.
Please suggest .
Thanks in advance.
Rgds/AbhiHi,
Why not make things simpler by using FM BP_CHANGE_JOB_STEP. Parameters required are:
JOBNAME
JOBCOUNT
STEP-PROGRAM & STEP-TYP (equal to 'A')
STEP_NUM
ALLPRIPAR-PDEST
Presumably you will have the info for JOBNAME, JOBCOUNT etc from your BDC feed. To preserve the rest of the print parameters then use something like FM BP_JOB_READ and fill in ALLPRIPAR fields.
Thanks,
Pete -
Hi all,
Is there any way by which we can delete the BDC_CURSOR field from the recording of LSMW 's BDC recording method.
thanks
Sonalhi
I think, Simply edit the recorded structure and delete that recorded code, but I am not sure v can delete that....
I donno how come it is going to work because it is in the sequential order of the screens and the operation u did in that tcode while recording
~~Guduri -
PO13 Recording problem for BDC
Hi All.
We have a requirement for PO13 bdc for changing the cost center data per position wise.
I am trying to change the cost center from PO13.while doing manually, the new cost center is delimimting the older record & appending a new record in PO13 & as well as in PA30(Org Data).it is working fine.
same thing I did in recording by SHDB for PO13.In this time it is overwriting the existing costcenter record & is not reflecting in the PA30 also.
while doing manually , while saving the Popup"Previous record will be delimited at end.Do you want to save" (Program-SAPLSPO1)is comming.But same popup screen is not comming in SHDB recording.
that's why even I ran the bdc , records are not comming properly.
appart from this PO13 bdc, is there any other method of changing the Cost center (like bapi / function module) in mass.
it is very urgently needed.Plaese help me to sort out this issue.
Thanks in advance,
Regards,
VenkatHi Venkat,
You'd better try PP02 transaction for BDC recording when Organizational Management Objects are in question.
Regards,
Dilek -
hello expert,
I had a problem on BDC . it is that after recording , I want to upload my pc file to the server ,then change the material description . (I record TRX MM02).
after I upload the local file to the server , when I execute the BDC session , it poped up a window shows 'select at least one view',
I just wandered how to skip this popup window , I just only want to see the view of BASIC DATA1 .
Kind Regards
NickHi,
You need to do the recording again. It seems you recording file is not complete.
While recording perform the steps for update in the way you want you system
do to it for you.
Also check whether you are calling MM02 or MM01 while calling the BDC.
Regards,
Prakash Pandey -
Hi All,
I am facing a problem with bdc on va02. After hitting enter on the first screen it pops an info message "consider subsequent douments". It doesn't get recorded in recorded. Hence I am not able to run the transaction with no screen mode. Please help me to suppress the info message
NavinHi Navin,
These kind of messages and pop ups are precisely the reason why use of BDC for updating transactions is NOT advisable.
If you were to bypass such messages, you would have to put a check to see why the message appears (in this case probably because the sales document flow for the sales order in table VBFA has some documents) and then write a logic to either handle the message or not.
Instead i would recommend you use the BAPI functions provided by SAP to change the sales order.
Have a look the BAPI for sales order change attached to the business object BUS2012. For this goto transaction SWO1 and enter the BUS2012 business object. Then goto methods and look for the "change" method. Double click on the method and look at the BAPI used to implement the method. Go ahead and use this method in your program as against a BDC.
I am sure it will be a much better option.
Otherwise if you still want to proceed with a BDC, please debug at the point where the message/pop up appears to ascertain reason for the same and then incorporate the same check in your program to handle the pop up.
Regards,
Aditya -
Hi
I am facing a problem in BDC ,call trasaction, for FB01
While the recording is done, the confi has BSEG-DMBTR field (Local Currecny)
and now its not there is the screen.
If i run my BDC is foreground, it says Field does not exist as sucess message and then i press enter and it let me post the record.
But in Background, its not letting me post the document.
wether its because , in background if any screen elements is message , being a succes message, it doesnot post ?
please helpHi Munish singh,
Actually this error because of currency field.
1) declare the character variable equal to the dmbtr field output length. ex: data: v_dmbtr type c length 18.
2) before passing to the screen field.
3) move itab-dmbtr to v_dmbtr.
condence v_dmbtr.
4) And pass this v_dmbtr to the screen field ....
then your issue positively will resolved.
Dont forgot to Reward me points .....
All the very best....
Regards,
Sreenivasa sarma K. -
Problem in bdc session method for tcode FS00
Hi Experts,
problem in bdc session method, when i run this program no output is shown.
Even it is not calling the transaction.
code as follows.
*& Report Z_GL_MASTER
*& CATEGORY = BDC.
*& DESCRIPTION = UPLOADING G/L MASTER RECORDS.
*& TECHNICAL CONST = FRANCIS REDDY.
*& FUNTIONAL CONST = FICO.
REPORT Z_GL_MASTER.
*& Internal Table
DATA : BEGIN OF IT_UPLOAD OCCURS 0,
SAKNR LIKE GLACCOUNT_SCREEN_KEY-SAKNR, " ACCOUNT NUMBER.
BUKRS LIKE GLACCOUNT_SCREEN_KEY-BUKRS, " COMPANY CODE.
KTOKS LIKE GLACCOUNT_SCREEN_COA-KTOKS, " ACCOUNT GROUP.
XPLACCT LIKE GLACCOUNT_SCREEN_COA-XPLACCT, " P&L STATEMEMENT.
GVTYP LIKE GLACCOUNT_SCREEN_COA-GVTYP, " P&L STATEMENT TYPE.
XBILK LIKE GLACCOUNT_SCREEN_COA-XBILK, " BALANCE SHEET STATEMENT
SHORT LIKE GLACCOUNT_SCREEN_COA-TXT20_ML, " SHORT TEXT.
LONG LIKE GLACCOUNT_SCREEN_COA-TXT50_ML, " LONG TEXT.
WAERS LIKE GLACCOUNT_SCREEN_CCODE-WAERS, " ACCOUNT CURRENCY.
XSALH LIKE GLACCOUNT_SCREEN_CCODE-XSALH, " ONLY BALANCES IN LOCAL CURRENCY.
MITKZ LIKE GLACCOUNT_SCREEN_CCODE-MITKZ, " RECONCILATION ACCOUNT FOR ACCOUNT TYPEGLACCOUNT_SCREEN_CCODE-MITKZ
XOPVW LIKE GLACCOUNT_SCREEN_CCODE-XOPVW, " OPEN ITEM MANAGEMENT.
XKRES LIKE GLACCOUNT_SCREEN_CCODE-XKRES, " LINE ITEM DISPLAY.
ZUAWA LIKE GLACCOUNT_SCREEN_CCODE-ZUAWA, " SORT KEY.
FSTAG LIKE GLACCOUNT_SCREEN_CCODE-FSTAG, " FIELD STATUS GROUP.
XGKON LIKE GLACCOUNT_SCREEN_CCODE-XGKON, " RELAVENT CASH FLOW.
END OF IT_UPLOAD.
*& Internal Table FOR BDC DATA.
DATA : IT_BDCDATA TYPE BDCDATA OCCURS 0 WITH HEADER LINE.
*& DATA DECLARATIONS.
DATA : V_FILE LIKE RLGRAP-FILENAME.
*& SELECTION SCREEN.
PARAMETER : P_FILE LIKE V_FILE.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
PERFORM GET_FILENAME.
START-OF-SELECTION.
PERFORM UPLOAD_DATA.
PERFORM BDCDATA_OPEN.
PERFORM BDC_POPULATE.
PERFORM BDC_CLOSE.
*& Form GET_FILENAME
form GET_FILENAME .
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = 'P_FILE'
IMPORTING
FILE_NAME = P_FILE.
endform. " GET_FILENAME
*& Form UPLOAD_DATA
form UPLOAD_DATA .
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
FILENAME = P_FILE
FILETYPE = 'DAT'
TABLES
data_tab = IT_UPLOAD.
endform. " UPLOAD_DATA
*& Form BDCDATA_OPEN
FORM FOR BDC_OPEN_GROUP.
form BDCDATA_OPEN .
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
CLIENT = SY-MANDT
GROUP = 'GLMASTER'
HOLDDATE = SY-DATUM
KEEP = 'X'
USER = SY-UNAME.
endform. " BDCDATA_OPEN
*& Form BDC_POPULATE
POPULATING BDC DATA .
form BDC_POPULATE .
loop at it_upload.
PERFORM BDC_SUB1 USING 'X' 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
PERFORM BDC_SUB2 USING 'BDC_OKCODE' '=ACC_CRE'.
PERFORM BDC_SUB2 USING 'BDC_CURSOR' 'GLACCOUNT_SCREEN_KEY-SAKNR'.
PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_KEY-SAKNR' IT_UPLOAD-SAKNR.
PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_KEY-BUKRS' IT_UPLOAD-BUKRS.
PERFORM BDC_SUB1 USING 'X' 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
PERFORM BDC_SUB2 USING 'BDC_OKCODE' '=2102_GROUP'.
PERFORM BDC_SUB2 USING 'BDC_CURSOR' 'GLACCOUNT_SCREEN_COA-KTOKS'.
PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_COA-KTOKS' IT_UPLOAD-KTOKS.
PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_COA-XPLACCT' IT_UPLOAD-XPLACCT.
PERFORM BDC_SUB1 USING 'X' 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
PERFORM BDC_SUB2 USING 'BDC_OKCODE' '=2102_BS_PL'.
PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_COA-GVTYP' IT_UPLOAD-GVTYP.
PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_COA-XBILK' IT_UPLOAD-XBILK.
PERFORM BDC_SUB1 USING 'X' 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
PERFORM BDC_SUB2 USING 'BDC_CURSOR' 'GLACCOUNT_SCREEN_COA-TXT20_ML'.
PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_COA-TXT20_ML' IT_UPLOAD-SHORT.
PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_COA-TXT50_ML' IT_UPLOAD-LONG.
PERFORM BDC_SUB1 USING 'X' 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
PERFORM BDC_SUB2 USING 'BDC_OKCODE' '=TAB02'.
PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_CCODE-WAERS' IT_UPLOAD-WAERS.
PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_CCODE-XSALH' IT_UPLOAD-XSALH.
PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_CCODE-MITKZ' IT_UPLOAD-MITKZ.
PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_CCODE-XOPVW' IT_UPLOAD-XOPVW.
PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_CCODE-XKRES' IT_UPLOAD-XKRES.
PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_CCODE-ZUAWA' IT_UPLOAD-ZUAWA.
PERFORM BDC_SUB1 USING 'X' 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
PERFORM BDC_SUB2 USING 'BDC_OKCODE' '=TAB03'.
PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_CCODE-FSTAG' IT_UPLOAD-FSTAG.
PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_CCODE-XGKON' IT_UPLOAD-XGKON.
CALL FUNCTION 'BDC_INSERT'
EXPORTING
TCODE = 'FS00'
TABLES
dynprotab = IT_BDCDATA.
endloop.
endform. " BDC_POPULATE
*& Form BDC_CLOSE
FORM FOR CLOSING BDC_GROUP
form BDC_CLOSE .
CALL FUNCTION 'BDC_CLOSE_GROUP'.
endform. " BDC_CLOSE
*& Form BDC_SUB1
FORM FOR BDCDATA.
form BDC_SUB1 USING A B C.
CLEAR IT_BDCDATA.
IT_BDCDATA-DYNBEGIN = A.
IT_BDCDATA-PROGRAM = B.
IT_BDCDATA-DYNPRO = C.
APPEND IT_BDCDATA.
endform. " BDC_SUB1
*& Form BDC_SUB2
text
form BDC_SUB2 USING A B.
CLEAR IT_BDCDATA.
IT_BDCDATA-FNAM = A.
IT_BDCDATA-FVAL = B.
APPEND IT_BDCDATA.
endform. " BDC_SUB2
Points will be rewarded.
Thanks in advance.
Francis.Hi,
Once the program is executed..It will a BDC session..
THen you have to use the transaction SM35..To process the BDC session..
Thanks,
Naren -
Problem in bdc to change std price to moving price
hi
I had created BDC for changing std price ' S ' to moving price ' V ' . I had done recording for MM02 Trans.
At the time of creation of material ,MM person selects different views for same type of material .
moving price presents in Accounting 1 View. In recording this view was at 13th position .but If I check my BDC for other material while running BDC in foreground it takes MRP1 view which is at 13th position
because here the no of views are more as compared to the recorded material .Again position of recording is also not matching.
please advice what to do in this case ?
Thanks in Advance.
Regards,
Atulhiii,
take the PSTAT field from mara for that particular material and make the following changes in ur code.
PERFORM POPULATE_BDC_TAB1 tables itab1 USING :
'1' 'SAPLMGMM' '0060',
' ' 'BDC_CURSOR' 'RMMG1-MATNR',
' ' 'BDC_OKCODE' '/00',
' ' 'RMMG1-MATNR' new_material,
' ' 'RMMG1-MBRSH' ind_sec,
' ' 'RMMG1-MTART' mat_type.
PERFORM POPULATE_BDC_TAB1 tables itab1 USING :
' ' 'BDC_OKCODE' '=P+'.
SEARCH pstat FOR 'K'. "BASIC DATA
IF sy-subrc = 0.
PERFORM POPULATE_BDC_TAB1 tables itab1 USING :
' ' 'MSICHTAUSW-KZSEL(01)' 'X',
' ' 'MSICHTAUSW-KZSEL(02)' 'X'.
ENDIF.
SEARCH pstat FOR 'V'. "SALES ORG DATA
IF sy-subrc = 0.
PERFORM POPULATE_BDC_TAB1 tables itab1 USING :
' ' 'MSICHTAUSW-KZSEL(04)' 'X',
' ' 'MSICHTAUSW-KZSEL(05)' 'X',
' ' 'MSICHTAUSW-KZSEL(06)' 'X',
' ' 'MSICHTAUSW-KZSEL(07)' 'X',
' ' 'MSICHTAUSW-KZSEL(08)' 'X'.
ENDIF.
CLEAR flag_pur.
SEARCH pstat FOR 'E'. "PURCHASING
IF sy-subrc = 0.
PERFORM POPULATE_BDC_TAB1 tables itab1 USING :
' ' 'MSICHTAUSW-KZSEL(09)' 'X',
' ' 'MSICHTAUSW-KZSEL(10)' 'X',
' ' 'MSICHTAUSW-KZSEL(11)' 'X'.
*************SHAFI********
flag_pur = 'X'.
ENDIF.
SEARCH pstat FOR 'D'. "MRP
IF sy-subrc = 0.
PERFORM POPULATE_BDC_TAB1 tables itab1 USING :
' ' 'MSICHTAUSW-KZSEL(12)' 'X',
' ' 'MSICHTAUSW-KZSEL(13)' 'X',
' ' 'MSICHTAUSW-KZSEL(14)' 'X',
' ' 'MSICHTAUSW-KZSEL(15)' 'X'.
ENDIF.
SEARCH pstat FOR 'P'. "FORECASTING
IF sy-subrc = 0.
PERFORM POPULATE_BDC_TAB1 tables itab1 USING :
' ' 'MSICHTAUSW-KZSEL(16)' 'X'.
ENDIF.
SEARCH pstat FOR 'A'. "WORK SCHEDULING
IF sy-subrc = 0.
PERFORM POPULATE_BDC_TAB1 tables itab1 USING :
' ' 'MSICHTAUSW-KZSEL(17)' 'X'.
ENDIF.
PERFORM POPULATE_BDC_TAB1 tables itab1 USING :
'1' 'SAPLMGMM' '0070',
' ' 'BDC_OKCODE' '=ENTR'.
SEARCH pstat FOR 'Z'. "GENERAL PLANT DATA/STORAGE LOCATION
IF sy-subrc = 0.
PERFORM POPULATE_BDC_TAB1 tables itab1 USING :
' ' 'MSICHTAUSW-KZSEL(01)' 'X',
' ' 'MSICHTAUSW-KZSEL(02)' 'X'.
ENDIF.
****************shafi**********
IF NOT v_drg IS INITIAL.
PERFORM POPULATE_BDC_TAB1 tables itab1 USING :
' ' 'MSICHTAUSW-KZSEL(02)' 'X'.
ENDIF.
SEARCH pstat FOR 'S'. "WAREHOUSE MGMT
IF sy-subrc = 0.
PERFORM POPULATE_BDC_TAB1 tables itab1 USING :
' ' 'MSICHTAUSW-KZSEL(03)' 'X',
' ' 'MSICHTAUSW-KZSEL(04)' 'X'.
ENDIF.
SEARCH pstat FOR 'Q'. "QUALITY MGMT
IF sy-subrc = 0.
PERFORM POPULATE_BDC_TAB1 tables itab1 USING :
' ' 'MSICHTAUSW-KZSEL(05)' 'X'.
ENDIF.
SEARCH pstat FOR 'B'. "ACCOUNTING
IF sy-subrc = 0.
PERFORM POPULATE_BDC_TAB1 tables itab1 USING :
' ' 'MSICHTAUSW-KZSEL(06)' 'X',
' ' 'MSICHTAUSW-KZSEL(07)' 'X'.
ENDIF.
SEARCH pstat FOR 'G'. "COSTING
IF sy-subrc = 0.
PERFORM POPULATE_BDC_TAB1 tables itab1 USING :
' ' 'MSICHTAUSW-KZSEL(08)' 'X',
' ' 'MSICHTAUSW-KZSEL(09)' 'X'.
ENDIF.
make sure that u have the ok code 'P+' for view which are displayed after u press page down event.
Hope it helps u..
Regards,
Anil N. -
Hi All,
I am doing a bdc program inside RFC-FM.in which i need to do a posting in FI and return the document number via the export parameter of the RFC-FM.when the function module is tested in
foreground its giving me the document number via the success message but while testing in background mode the document number is not captured.I think there is some problem withe message capturing in background mode.
can anybody advice.....
Regards,
PrajithHi
I do not think so it is due to Background.
Sometimes if the BDC recording is not done properly, it will not work in MODE 'N'. it will work only in MODE 'A'.
I would suggest to take the code inside the RFC and place it in a ZREPORT and check.
If the problem still exists, than i suggest to do re-recording of the transaction
Regards
Madhan D
Maybe you are looking for
-
http://author.confirmit.com//isa/KTAYBTGOKOMVCAAHHMPIDXAQKVOTBALO/srinu/Mozilla%20Firefox_trouble1.htm Please find this link. I am getting this message frequently.
-
HHi I have a 2011 Mac with Os X 10.8.1. Need any OS X update .?
-
Intel Rapid Storage Technology (pre-OS) driver installation
My desktop machine is built on Gigabyte GA-Z87-UD3H and Gigabyte provides the latest driver for Intel Rapid Storage Technology (IRST), which I installed after installing the OS. Same goes for my Lenovo Thinkpad-T420. And for both machine, checking th
-
Air App for Android - error 301: application descriptor missing
Greetings! I've been building in Flash for a while but am brand new to mobile development. I'm currently trying to create my first Android app, a very basic game called "302 Saves The Galaxy". I don't intend to sell the game. I'm really just trying
-
Get rid of tiny border in openbox
Hey there all, if i undecorate a window openbox, there is still a tiny line around it. in fluxbox, the toggle decor will remove it. undecorate gets close in openbox, but not all the way gone. any ideas? thanks