Problem with BDC on VA02
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
Navin
Hi 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
Similar Messages
-
Transaction AIAB (Auc Settlement) - Problem with BDC
Dear Friends,
Problem: I am trying to distribute the amount of a asset (Auc) to other assets on line item basis by using BDC for transaction AIAB. I am facing problems when using amount based through BDC.
Can you please suggest ASAP if any FM or BAPI's available to achive this for transaction AIAB?
Thanks,
Ram.Hi Ravi,
Thanks for your valuable reply..
Everything is fine if i run the transaction in ALLSCREEN mode, but iam facing the problem with the same after running it in NOSCREEN mode 'N'..
Pls help.. -
Syntax problem with BDC perform
Dear Friends,
small problem in BDC Perform syntax but I am not getting how to do this..
I have writen the code like this in my BDC byt its throughing the error...Here I want to do the validation on each and every field. I mean If that field values are empty i don't want to change the SAP field value.
my code is like this.
PERFORM dynpro USING:
'X' 'SAPLMGMM' '0080'.
IF NOT p_int_matl-werks IS INITIAL.
' ' 'RMMG1-WERKS' p_int_matl-werks.
ENDIF.
IF NOT p_int_matl-werks IS INITIAL.
' ' 'RMMG1-LGORT' p_int_matl-lgort.
ENDIF.
' ' 'BDC_OKCODE' '/00'.
pls give me exact code how to do this...
Thanks
SridharHi sridher,
1. this kind of syntax ie. IF will give error.
2. If ur requirement is : blank value should not be put in bdc,
3. then one way is to change / write the logic
inside the form itself.
4. ie. inside the routine/form DYNPRO.
5. So, it will be then general for all performs.
regards,
amit m. -
Hi,
I Recorded the Transaction for CN21
I that I need to create a Network ,
To create the Network it contains Many Activity and 1 Activity contains many Material Component.
1 Network----> Many Activities
1 Activity -
>Many material Components.
And the Activity and Material Components are TabCtrl.
While Recording it will insert only 12 records.
When We insert the record it overwrites.
So ,
How to write a BDC Program for this complex structure and for the Tabctrl.
Points will be awarded for the solution.
Regards,
Jayasimha Jangamfor table control BDC u have to use page down command for inserting more records...
use following code :
REPORT Y730_BDC5 .
*HANDLING TABLE CONTROL IN BDC
DATA : BEGIN OF IT_DUMMY OCCURS 0,
DUMMY(100) TYPE C,
END OF IT_DUMMY.
DATA : BEGIN OF IT_XK01 OCCURS 0,
LIFNR(10) TYPE C,
BUKRS(4) TYPE C,
EKORG(4) TYPE C,
KTOKK(4) TYPE C,
NAME1(30) TYPE C,
SORTL(10) TYPE C,
LAND1(3) TYPE C,
SPRAS(2) TYPE C,
AKONT(6) TYPE C,
FDGRV(2) TYPE C,
WAERS(3) TYPE C,
END OF IT_XK01,
BEGIN OF IT_BANK OCCURS 0,
BANKS(3) TYPE C,
BANKL(10) TYPE C,
BANKN(10) TYPE C,
KOINH(30) TYPE C,
LIFNR(10) TYPE C,
END OF IT_BANK.
DATA : IT_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE,
IT_BDCMSGCOLL LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
FILENAME = 'C:\VENDOR.TXT'
FILETYPE = 'ASC'
TABLES
DATA_TAB = IT_DUMMY.
LOOP AT IT_DUMMY.
IF IT_DUMMY-DUMMY+0(2) = '11'.
IT_XK01-LIFNR = IT_DUMMY-DUMMY+2(10).
IT_XK01-BUKRS = IT_DUMMY-DUMMY+12(4).
IT_XK01-EKORG = IT_DUMMY-DUMMY+16(4).
IT_XK01-KTOKK = IT_DUMMY-DUMMY+20(4).
IT_XK01-NAME1 = IT_DUMMY-DUMMY+24(30).
IT_XK01-SORTL = IT_DUMMY-DUMMY+54(10).
IT_XK01-LAND1 = IT_DUMMY-DUMMY+64(3).
IT_XK01-SPRAS = IT_DUMMY-DUMMY+67(2).
IT_XK01-AKONT = IT_DUMMY-DUMMY+69(6).
IT_XK01-FDGRV = IT_DUMMY-DUMMY+75(2).
IT_XK01-WAERS = IT_DUMMY-DUMMY+77(3).
APPEND IT_XK01.
ELSE.
IT_BANK-BANKS = IT_DUMMY-DUMMY+2(3).
IT_BANK-BANKL = IT_DUMMY-DUMMY+5(10).
IT_BANK-BANKN = IT_DUMMY-DUMMY+15(10).
IT_BANK-KOINH = IT_DUMMY-DUMMY+25(30).
IT_BANK-LIFNR = IT_DUMMY-DUMMY+55(10).
APPEND IT_BANK.
ENDIF.
ENDLOOP.
LOOP AT IT_XK01.
REFRESH IT_BDCDATA.
perform bdc_dynpro using 'SAPMF02K' '0100'.
perform bdc_field using 'BDC_CURSOR'
'RF02K-REF_LIFNR'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RF02K-LIFNR'
IT_XK01-LIFNR.
perform bdc_field using 'RF02K-BUKRS'
IT_XK01-BUKRS.
perform bdc_field using 'RF02K-EKORG'
IT_XK01-EKORG.
perform bdc_field using 'RF02K-KTOKK'
IT_XK01-KTOKK.
perform bdc_dynpro using 'SAPMF02K' '0110'.
perform bdc_field using 'BDC_CURSOR'
'LFA1-TELX1'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'LFA1-NAME1'
IT_XK01-NAME1.
perform bdc_field using 'LFA1-SORTL'
IT_XK01-SORTL.
perform bdc_field using 'LFA1-LAND1'
IT_XK01-LAND1.
perform bdc_field using 'LFA1-SPRAS'
IT_XK01-SPRAS.
perform bdc_dynpro using 'SAPMF02K' '0120'.
perform bdc_field using 'BDC_CURSOR'
'LFA1-KUNNR'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_dynpro using 'SAPMF02K' '0130'.
perform bdc_field using 'BDC_CURSOR'
'LFBK-KOINH(02)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
DATA : FNAM(20) TYPE C,
IDX TYPE C.
MOVE 1 TO IDX.
LOOP AT IT_BANK WHERE LIFNR = IT_XK01-LIFNR.
CONCATENATE 'LFBK-BANKS(' IDX ')' INTO FNAM.
perform bdc_field using FNAM
IT_BANK-BANKS.
CONCATENATE 'LFBK-BANKL(' IDX ')' INTO FNAM.
perform bdc_field using FNAM
IT_BANK-BANKL.
CONCATENATE 'LFBK-BANKN(' IDX ')' INTO FNAM.
perform bdc_field using FNAM
IT_BANK-BANKN.
CONCATENATE 'LFBK-KOINH(' IDX ')' INTO FNAM.
perform bdc_field using FNAM
IT_BANK-KOINH.
IDX = IDX + 1.
ENDLOOP.
perform bdc_dynpro using 'SAPMF02K' '0130'.
perform bdc_field using 'BDC_CURSOR'
'LFBK-BANKS(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_dynpro using 'SAPMF02K' '0210'.
perform bdc_field using 'BDC_CURSOR'
'LFB1-FDGRV'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'LFB1-AKONT'
IT_XK01-AKONT.
perform bdc_field using 'LFB1-FDGRV'
IT_XK01-FDGRV.
perform bdc_dynpro using 'SAPMF02K' '0215'.
perform bdc_field using 'BDC_CURSOR'
'LFB1-ZTERM'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_dynpro using 'SAPMF02K' '0220'.
perform bdc_field using 'BDC_CURSOR'
'LFB5-MAHNA'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_dynpro using 'SAPMF02K' '0310'.
perform bdc_field using 'BDC_CURSOR'
'LFM1-WAERS'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'LFM1-WAERS'
IT_XK01-WAERS.
perform bdc_dynpro using 'SAPMF02K' '0320'.
perform bdc_field using 'BDC_CURSOR'
'WYT3-PARVW(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_dynpro using 'SAPLSPO1' '0300'.
perform bdc_field using 'BDC_OKCODE'
'=YES'.
CALL TRANSACTION 'XK01' USING IT_BDCDATA
MODE 'A'
UPDATE 'S'
MESSAGES INTO IT_BDCMSGCOLL.
ENDLOOP.
FORM BDC_DYNPRO USING PROG SCR.
CLEAR IT_BDCDATA.
IT_BDCDATA-PROGRAM = PROG.
IT_BDCDATA-DYNPRO = SCR.
IT_BDCDATA-DYNBEGIN = 'X'.
APPEND IT_BDCDATA.
ENDFORM.
FORM BDC_FIELD USING FNAM FVAL.
CLEAR IT_BDCDATA.
IT_BDCDATA-FNAM = FNAM.
IT_BDCDATA-FVAL = FVAL.
APPEND IT_BDCDATA.
ENDFORM.
reward points if useful... -
Hi Experts,
I'm running a BDC involving the structure / screen F110V. I'm using the following line of code to check my program name:
.....IF F110V-PROGN = 'RFF0AVIS' ....
However, F110V-PROGN is always a blank string and the condition is never satisfied. Am I checking the correct value off the screen field or is there a correction? How do I check the PROGN field for a particular value?
Any help would be greatly appreciated. Thanks.Hi Santosh,
Thanks for the quick reply.
I did, indeed, record a BDC with the said fields so that I could get the field name (PROGN).However I want to execute different logic based on the value of the F110V-PROGN.
The condition always fails due to the fact that the screen field value is always a blank.
Any comments? Thanks again. -
Hi Guys,
I am having big problems when I try to re-assign an employee to a different position using the BDC method.
If I do from PA40 directly, it works. It delimits the previous position to the date when the new position starts.
But when I try to save the recordings and then do it from there it updates it on the PA side but does not do the same on the org side. To get around that, I go to PP02 transaction and create a relationship from there. Somehow by doing so I get two positions for the same employee in the same date range and the previous position is not delimited.
Please help!!
~MarkMark,
I remember lodging this issue in OSS a couple of years back. But it was a futile effort and we didn't have enough time. So I ended up adding a few more lines of code to resolve the issue.
Regards,
Suresh Datti
P.S. and yes like you said BDCs do act 'weird' sometimes..
Message was edited by: Suresh Datti -
Problem with BDC- file transfer
I am able to open the file but the Contents of a file are not read.
Hi,
I think you are looking for BDC Problem, Its wrong forum to dicuss about it.
Refer - this could help you
How to upload excel file
data set problem bdc
Thanks
swarup -
Problem with BDC in PORTAL(its running fine in R/3)
i have done a BDC which works fine in R/3.....
but fials in PORTAL...
the reason being,
the BDC picks a record in a subscreen which has a table in a grid..the table has 15 records...5 records are visible normaly in portal(and 10 in R/3) rest of the record are visible after scrolling...
the BDC has to pick record at 14 position...it picks corectly in R/3...but when it comes to portal..the BDC stops and one has to manualy scroll and pick the record...
alternativley i have made the reocrd appear at 1 position...and everything is fine..
but whats the permanent solution?
is it related to portal..(like for BDC scrolling in portal is failing)
any alternative ways?
(the BDC is related to SEPARATION action in PA40)Hi Kumar,
The permanent solution will be using BAPI's instead of BDC.
The BDC is entirely dependent on the screen and any changes in the screen will make the BDC vulnerable.
Thanks,
Arun -
Hi All,
We are not able to record transaction PRFI, it's allowing us to record but it seems it's not complete.
When we go to PRRW, the related document status is 'Selection runnung' but it should be 'document created' than only it's complete.
User don't want to do it manually as the volume of data is more. Please suggest how to resolve this issue.
OR Suggest aby other alternatives..
Regards,
Mangalagi S VHi,
Thanks for your quick response.
perform bdc_field using 'MARC-LGFSB'
MARC-LGFSB. "'1000'.
perform bdc_field using 'BDC_CURSOR'
'MARC-PLIFZ'.
perform bdc_field using 'MARC-PLIFZ'
i_ekpo-plifz.
FAVL is not populating for only one record. i.e in above while passing i_ekpo-plifz to MARC-PLIFZ. In debug mode i_ekpo-plifz contains value but it's not assigning into bdctab-fval.
FORM BDC_FIELD USING fnam FVAL.
CLEAR bdctab.
IF not FVAL is initial.
bdctab-fnam = fnam.
bdctab-fval = FVAL.
APPEND bdctab.
endif.
ENDFORM. -
Strange problem with backgroung processing of BDC for Transcation CLMM
Folks,
I have encountered strange problem with BDC.I created an ALV report from output i select any number of rows and hit insert class button on top. If i select less than 10 row and use this statement
call transaction 'CLMM' mode 'N'
,it works fine but if i select more than 10 rows ,the sy-subrc after this statement
call transaction 'CLMM' mode 'N'
is 1001 means an error. I cant understand this problem of Mode N. if i put statement
call transaction 'CLMM'
(foreground processing) here ,everything works fine. Do you have any idea?
NiradHi,
The problem is due to the screen size which can differ between foreground and background mode.
A screen with 10 table rowsin foreground does not necessarily mean same number of rows would be available in background mode.
Hence its always better to create recording with Simulate Background Mode as checked.
When you enter transaction code 'CLMM' in SHDB transaction and start recording, check Simulate Background Mode.
Hope this helps!
Cheers,
Vikram -
BDC for VA02 to update Sales Order
Hi,
I'm try to run a BDC to update partner data on the sales order header data but I get this error when I executed the BDC.
Field 'GVS_TC_DATA-REC-PARTNER(8) does not exist in the screen SAPMV45A 4002
Please advise. The code is as shown below:
REPORT zstd21 NO STANDARD PAGE HEADING
LINE-SIZE 255.
INCLUDE bdcrecx1.
DATA:
BEGIN OF itab OCCURS 0,
vbeln LIKE vbak-vbeln,
kunnr LIKE vbpa-kunnr,
END OF itab.
PARAMETER: p_flname LIKE sopcpath-file OBLIGATORY
VISIBLE LENGTH 100.
START-OF-SELECTION.
PERFORM read_data_from_file.
PERFORM open_group.
PERFORM update_order_salesrep.
PERFORM close_group.
END-OF-SELECTION.
*& Form READ_DATA_FROM_FILE
text
--> p1 text
<-- p2 text
FORM read_data_from_file .
DATA:
lv_filename TYPE string.
CONSTANTS:
c_numeric TYPE char10 VALUE '0123456789'.
CLEAR lv_filename.
lv_filename = p_flname.
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = lv_filename
filetype = 'DAT'
has_field_separator = 'X'
dat_mode = 'X'
CODEPAGE = SPACE
CHANGING
data_tab = itab[]
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
not_supported_by_gui = 17
error_no_gui = 18
OTHERS = 19 .
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
IF itab[] IS INITIAL.
MESSAGE i000(zv).
STOP.
ENDIF.
CLEAR itab.
LOOP AT itab.
IF itab-vbeln CO c_numeric.
UNPACK itab-vbeln TO itab-vbeln.
ENDIF.
IF itab-kunnr CO c_numeric.
UNPACK itab-kunnr TO itab-kunnr.
ENDIF.
MODIFY itab.
ENDLOOP.
ENDFORM. " READ_DATA_FROM_FILE
*& Form UPDATE_ORDER_SALESREP
text
--> p1 text
<-- p2 text
FORM update_order_salesrep .
CONSTANTS:
c_header TYPE vbpa-posnr VALUE '000000',
c_srep TYPE vbpa-parvw VALUE 'ZS',
c_field TYPE bdcdata-fnam VALUE 'GVS_TC_DATA-REC-PARTNER(',
c_quote TYPE char1 VALUE '''',
c_bracket TYPE char1 VALUE ')'.
DATA:
lit_vbpa LIKE vbpa OCCURS 0 WITH HEADER LINE,
lv_field TYPE bdcdata-fnam,
lv_pos(2) TYPE n.
IF NOT itab[] IS INITIAL.
SELECT mandt vbeln posnr parvw
INTO TABLE lit_vbpa
FROM vbpa
FOR ALL ENTRIES IN itab
WHERE vbeln = itab-vbeln
AND posnr = c_header.
ENDIF.
SORT lit_vbpa BY vbeln posnr parvw.
LOOP AT itab.
CLEAR: lv_field,
lv_pos.
CLEAR lit_vbpa.
LOOP AT lit_vbpa WHERE vbeln = itab-vbeln.
lv_pos = lv_pos + 1.
IF lit_vbpa-parvw EQ c_srep.
CONCATENATE c_quote c_field lv_pos c_bracket c_quote
INTO lv_field IN CHARACTER MODE.
CONDENSE lv_field.
EXIT.
ENDIF.
ENDLOOP.
IF NOT lv_field IS INITIAL.
PERFORM bdc_dynpro USING 'SAPMV45A' '0102'.
PERFORM bdc_field USING 'BDC_CURSOR' 'VBAK-VBELN'.
PERFORM bdc_field USING 'BDC_OKCODE' '/00'.
PERFORM bdc_field USING 'VBAK-VBELN' itab-vbeln.
PERFORM bdc_dynpro USING 'SAPMV45A' '4001'.
PERFORM bdc_field USING 'BDC_OKCODE' '=KPAR_SUB'.
PERFORM bdc_dynpro USING 'SAPMV45A' '4002'.
PERFORM bdc_field USING 'BDC_OKCODE' '=SICH'.
PERFORM bdc_field USING 'GV_FILTER' 'PARALL'.
PERFORM bdc_field USING lv_field itab-kunnr.
PERFORM bdc_transaction USING 'VA02'.
ENDIF.
ENDLOOP.
ENDFORM. " UPDATE_ORDER_SALESREPHi satyadev,
As per this error message "Field 'GVS_TC_DATA-REC-PARTNER(8) does not exist in the screen SAPMV45A 4002", screen does not have GVS_TC_DATA-REC-PARTNER(8) field.
It is obvious that your recording has this field but not the current screen.
Look at the screen and recording, if possible do a re-recording.
This is a general problem with BDCs. Configuration / screen fields and screen order should be similar with the recording screen order and screen field.
One of the possible reason may be your functional team might have changed the screen number or they might have hide this field.
Hope this helps..
Mubeen -
Bdc upload file data into internal table problem with gui_upload fm
Hello experts,
my coding is like this ..
data : begin of itab occurs 0 .
field1 like mara-matnr,
field2......
etc,
end of itab.
data: file1 type string.
parameter :file like rlgrap-filename.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR file.
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
EXPORTING
static = 'X'
mask = space
field_name = 'FILE'
CHANGING
file_name = file.
START-OF-SELECTION.
FILE1 = FILE . "HERE I AM PASSING INTO STRING
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = FILE1
FILETYPE = 'ASC'
has_field_separator = 'X'
TABLES
data_tab = itab. " here the data is not populating from the file , it is giving the error like speified table not found.
HERE i am getting the message like "specified table name not recgonised" . the data is not populating into the itab from the file.
file structure is same as the internal table.
I stored the file as .txt( ie in notepad).
my file is like this..
10000 200 323 sunndarrr.......
i had a problem with this bdc , i am getting like "specified table name not recgonised" in the fm gui_upload while debugging.
when i am using the ws_upload it is working fine.
please guide me where i have done the mistake.
thank you so much for all the replies.Hi,
Have a look on the following code.
TABLES: kna1.
DATA: BEGIN OF itab1 OCCURS 0,
str(255),
END OF itab1.
DATA: itab2 TYPE kna1 OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
filename = 'D:\ABAP EVE\ffile1.txt'
filetype = 'ASC'
TABLES
data_tab = itab1
EXCEPTIONS
conversion_error = 1
file_open_error = 2
file_read_error = 3
invalid_type = 4
no_batch = 5
unknown_error = 6
invalid_table_width = 7
gui_refuse_filetransfer = 8
customer_error = 9
no_authority = 10
OTHERS = 11.
IF sy-subrc <> 0.
WRITE:/ 'sorry'.
ELSE.
LOOP AT itab1.
SPLIT itab1-str AT ',' INTO itab2-kunnr itab2-name1.
APPEND itab2.
ENDLOOP.
IF sy-subrc = 0.
LOOP AT itab2.
WRITE:/ itab2-kunnr,itab2-name1.
INSERT INTO kna1 VALUES itab2.
ENDLOOP.
IF sy-subrc = 0.
WRITE:/ 'inserted'.
ELSE.
WRITE:/ 'not inserted'.
ENDIF.
ELSE.
WRITE:/ 'fail'.
ENDIF.
ENDIF.
Flat file:
10001,Sadney
10003,Yogesh
20005,Madan
1.U need to define internal table with one field of max size
2.upload the flat file data into that internal table
3.split that internal table data into another internal table(having fields)
<REMOVED BY MODERATOR>
thanks,
Chandu
Edited by: Alvaro Tejada Galindo on Apr 30, 2008 12:17 PM -
Problem in BDC with ( MM01-Dynamic views )
HI
I am working with BDC on material Mater(mm01).
Now while Creating Material,there is option of selecting different views based on MaterialType.
But while recording a BDC i can record it for a particular Material Type.and can select view associated to that particular Material Type.
Is there any solution to create a bdc progarm which can accept a new material based on
any material type and having views on user's choice that are given by user in Input file.
FOr that i think i need to create dynamic views and screen elements for input associated to those views.
After scanning some sites and forums for this particular problem,i got some help on this:-----
<b>SELECTION_VIEWS_FIND</b> should be very useful in this case.
There are three FModules totally involved:
a) <b>T130M_SINGLE_READ</b>
Pass TCODE = MM01, and get T130M values
b) <b>BILDSEQUENZ_IDENTIFY</b>
Pass KZRFB = 'X',TCODE_REF=T130M-TRREF and get
BILDSEQUENZ values
c) <b>SELECTION_VIEWS_FIND</b>
Pass BILDSEQUENZ and T130M-PSTAT
Now, this function module holds the values of all the views and the next screen numbers
But i am unable to interpret the solution..Can somebody Elaborate on this.or provide me some other solution for this.
Thanks in Advance
Help Will be appreciated.Yes, I agree with Christian. You are gonna want to use the BAPI or the underlying function module. It works good and isn't really that complex. Here is sample program. Here the function module is being used to change data, it can also be used to create, you will have to change the Tcode from MM02 to MM01.
report zrich_0001.
data: i_mara type table of mara_ueb with header line.
data: i_marc type table of marc_ueb with header line.
data: i_marcx type table of marc with header line.
parameters: p_matnr type mara-matnr,
p_plifz type marc-plifz.
start-of-selection.
* Get all plants for that material
select * into corresponding fields of table i_marcx
from marc where matnr = p_matnr.
* Now maintain data for each plant
loop at i_marcx.
* Reset I_Mara to new material number
clear i_mara. refresh i_mara.
select * into corresponding fields of table i_mara
from mara where matnr = p_matnr.
read table i_mara index 1.
i_mara-tcode = 'MM02'.
i_mara-tranc = '0000000001'.
modify i_mara index 1.
* Get Plant Data
clear i_marc. refresh i_marc.
select * into corresponding fields of table i_marc
from marc where matnr = i_marcx-matnr
and werks = i_marcx-werks.
read table i_marc index 1.
i_marc-plifz = p_plifz. " Plan Del time
i_marc-tranc = '0000000001'.
modify i_marc index 1.
* Maintain material
perform MATERIAL_MAINTAIN_DARK'.
endloop.
* MATERIAL_MAINTAIN_DARK
form MATERIAL_MAINTAIN_DARK.
* Variable for "Maintain_Material_Dark" Function Module
data: numerror like tbist-numerror.
data: last_matnr type mara-matnr.
data: i_delfields type table of mfieldres with header line.
data: i_errors type table of merrdat with header line.
call function 'MATERIAL_MAINTAIN_DARK'
exporting
sperrmodus = ' '
kz_prf = 'W'
max_errors = ' '
p_kz_no_warn = 'X'
kz_verw = 'X'
kz_aend = 'X'
kz_dispo = 'X'
kz_test = ' '
flag_muss_pruefen = ' '
call_mode = 'ACT'
importing
number_errors_transaction = numerror
matnr_last = last_matnr
tables
amara_ueb = i_mara "Basic Data
* amakt_ueb = i_makt "Descriptions
amarc_ueb = i_marc "Plant
* amard_ueb = i_mard "Storage Location
* AMFHM_UEB = I_MFHM "Production Tools
* amarm_ueb = i_marm "Units of Measure
* AMEA1_UEB = I_MEA1 "Internal Mangagement - EANs
* ambew_ueb = i_mbew "Accounting/Costing
* asteu_ueb = i_steu "Tax Data
* astmm_ueb = i_steumm "Tax Data
* AMLGN_UEB = I_MLGN "Warehouse Data
* AMLGT_UEB = I_MLGT "Storage Type Data
* AMPGD_UEB = I_MPGD "Change Documents
* AMPOP_UEB = I_MPOP "Forcast Parameters
* AMVEG_UEB = I_MVEG "Total Consumption Data
* AMVEU_UEB = I_MVEU "Unplanned Consumption Data
* amvke_ueb = i_mvke "Sales Data
* altx1_ueb = i_ltx1 "Sales Text
* AMPRW_UEB = I_MPRW "Forcast Values
amfieldres = i_delfields
amerrdat = i_errors
exceptions
kstatus_empty = 01
tkstatus_empty = 02
t130m_error = 03
internal_error = 04
update_error = 05
too_many_errors = 06.
if sy-subrc <> 0.
rollback work.
call function 'DEQUEUE_ALL'.
else.
commit work and wait.
call function 'DEQUEUE_ALL'.
endif.
clear: i_mara, i_marc.
refresh: i_mara, i_marc.
endform.
Regards,
Rich Heilman -
Hi
BDC with mode 'A' is working correctly but when I make the mode 'N' it gives a dump.
With mode 'A' the record is updated , what may be the cause?
ThanksI am using the tcode 7kE1 for bdc , it works perfectly with mode 'A' , but not with mode 'N', It give error 'Message_Type_Unknown' .
there is no problem with the file as values are going correctly in tcode
Edited by: Puneeta Parnami on Jun 12, 2009 12:57 PM -
Problem with the table control BDC in FV60 transaction
Hi All,
I got the problem with the table control in FV60 transaction.
This is working for 900 line items.After 900 line items it is giving the problem like it is 1000th line item.You can post only 999 line items.
I know we can post only 999 line items,but in my file only 920 line items.
Please give me solution,if anybody come across this situation.
Thanks & regards,
rakesh.Hello Rakesh ,
your file may have only 920 line items , but based on those line items, SAP may create few more new lines ( based on the clearing recon accounts , inter company transaction ...etc )...
regards
Prabhu
Maybe you are looking for
-
Opening a PDF in CS4 Photoshop
When try to open a PDF in CS4 Photoshop, the program shuts down and closes. Any Ideas? I am using Microsoft 7 Windows.
-
Why cant i read PDF email toake copies why is my pdf turned off or stop working
why cant I read PDF email to make copies why is my PDF turned off or stoppd working [email address removed]
-
Hi I am new to the logistics module and have just started learning the PM and CS modules. I was just trying to figure out a query raied by one of the clients regarding a report which will generate the "cost per mile". Actually the client wants to ca
-
Enhancement Req (v4.0): Report Query- Output Format- Derive from Item
Brief Introduction I have 1 major request I would like to make (and 2 lesser ones). The first, I would like to specify custom available output formats for 'Report Query' objects, as well as Reports Regions, Interactive Reports, etc. I believe that th
-
Disable authorization check RH_STRUC_GET
hi, is there a possibility to use FM RH_STRUC_GET and to disable authorization check similar to 'HR_READ_INFOTYPE_AUTHC_DISABLE' for fm HR_READ_INFOTYPE? thanks for help