ABAP in transaction MASS
Hello Everyone,
There is a place in transaction MASS to add a custom formula that requires ABAP. So we need to look into how we could do this with a formula
(Edit -> Enter Formulas).
I don't know how this functionality works, can anyone help me with this?
Thanks!
Arvin
Here is a sample from SAPWIKI
X is the value you must return
form GET_NEW_MAKT_MAKTX using segment structure MAKT changing X.
data: mytext(40) type c,
mylength type i.
mylength = strlen( X ).
if mylength > 38.
replace ' ' with ' ' into X.
endif.
overlay mytext with X.
write 'L' to mytext+39.
X = mytext.
endform.
<a href="http://sapwiki.iwoars.net/index.php/MASS">http://sapwiki.iwoars.net/index.php/MASS</a>
Similar Messages
-
ABAP - BDC transaction not saving changes to records
I am trying to write my first ABAP code using BDC recording. Essentially I would like to flag the "Final Delivery" field (EKPO-EGLKZ) for a range of documents by recording transaction MASS.
The code runs without errors - but the changes are not saved. I have run the code in "Processing Mode: A" (Display all screens) and the program successfully loops through each record & saves the updated fields. When I look at the documents in ME23N the changes have not been saved. Running the MASS transaction manually results in the changes being successfully saved so I can rule out any data validation issues.
Does anyone know why the changes refuse to save when running the code below?
I have considered trying to use BAPI_PO_CHANGE instead of BDC, but I am new to ABAP and I thought the BDC code would be less complex.
report Z_MASS_REMOVE_FDI_DCI
no standard page heading line-size 255.
include bdcrecx1.
TYPES: BEGIN OF ty_tab,
MASSOBJTYP(7),
MASSVARNAM(7),
DOCNO(9),
ITEM(1),
END OF ty_tab.
DATA : it_tab TYPE STANDARD TABLE OF ty_tab.
DATA : wa_tab TYPE ty_tab.
START-OF-SELECTION.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = 'X:\STO.TXT'
* FILETYPE = 'ASC
has_field_separator = 'X'
TABLES
data_tab = it_tab
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.
END-OF-SELECTION.
LOOP AT it_tab INTO wa_tab.
WRITE:/ wa_tab-MASSOBJTYP,
wa_tab-MASSVARNAM,
wa_tab-DOCNO,
wa_tab-ITEM.
PERFORM open_group.
perform bdc_dynpro using 'SAPMMSDL' '0100'.
perform bdc_field using 'BDC_CURSOR'
'MASSSCREEN-OBJECT'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'MASSSCREEN-OBJECT'
wa_tab-MASSOBJTYP.
perform bdc_field using 'MASSSCREEN-VARNAME'
wa_tab-MASSVARNAM.
perform bdc_dynpro using 'SAPMMSDL' '0100'.
perform bdc_field using 'BDC_CURSOR'
'MASSSCREEN-OBJECT'.
perform bdc_field using 'BDC_OKCODE'
'=NEXT'.
perform bdc_dynpro using 'SAPLMASS_SEL_DIALOG' '0100'.
perform bdc_field using 'BDC_CURSOR'
'MASSFREESEL-LOW(01)'.
perform bdc_field using 'MASSFREESEL-LOW(01)'
wa_tab-DOCNO.
perform bdc_dynpro using 'SAPLMASS_SEL_DIALOG' '0100'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'BDC_CURSOR'
'MASSFREESEL-LOW(02)'.
perform bdc_field using 'MASSFREESEL-LOW(02)'
wa_tab-ITEM.
perform bdc_dynpro using 'SAPLMASS_SEL_DIALOG' '0100'.
perform bdc_field using 'BDC_OKCODE'
'=CRET'.
perform bdc_field using 'BDC_CURSOR'
'MASSFREESEL-LOW(01)'.
perform bdc_dynpro using 'SAPLMASSINTERFACE' '0200'.
perform bdc_field using 'BDC_OKCODE'
'=FDAE'.
perform bdc_field using 'BDC_CURSOR'
'NR_ITEMS'.
perform bdc_dynpro using 'SAPLMASSINTERFACE' '0200'.
perform bdc_field using 'BDC_OKCODE'
'=SAVE'.
perform bdc_field using 'BDC_CURSOR'
'NR_ITEMS'.
perform bdc_dynpro using 'SAPLMASSMSGLIST' '0300'.
perform bdc_field using 'BDC_CURSOR'
'REOML-MSGTXT(01)'.
perform bdc_field using 'BDC_OKCODE'
'=EXIT'.
perform bdc_transaction using 'MASS'.
ENDLOOP.
PERFORM close_group.Where is BDC_INSERT.
If u use OPEN and CLOSE_group u need to use INSERT_GROUP also to update in database.
A session will be created and u nedd to run the Session in Sm35 in order to update the database.
Edited by: Ranjith Kumar on Sep 18, 2008 6:41 AM -
Create a Business Object and add to transaction MASS
Hi folks, I would like to know if it's possible to create a business object for 2 tables and use this with standard transaction MASS for mass maintenance.
I want to use transaction MASS for mass maintenance on the foreign trade data, 2 table will be available eikp and eipo. I think I will have to create a business object, first it is possible and how will I setup all this,
thanksHi,
Check this link.
http://www.erpgenie.com/abap/bapi/example.htm
aRs -
Delete Variants for Transaction MASS
Is it possible to delete multiple variants for transaction MASS?
I am aware variants can be deleted one by one using Goto... Variants... Delete. However, I would like to delete over 200 variants which are no longer required.
Surely there is a standard function? Deleting hundreds of variants one at a time is not an option. Contracting an ABAP programmer is not an option.
Thanks for your advice.Hi G. Lakshmipathi,
Your suggestion to use BDC recording worked like a charm.
However, I am still surprised that there is no standard function.
Thanks for your help.
Regards,
Nathan -
HOW TO Create variants for transaction MASS on LFA1 object?
hOW TO Create variants for transaction MASS on LFA1 object?
Edited by: cheppalliakr on Nov 10, 2011 1:09 PM
Moderator message: please do more research before asking, show what you have done yourself and provide more information when asking.
Edited by: Thomas Zloch on Nov 10, 2011 3:10 PMHi Oscar ,
You need to create optional date prompt variable in BW which fills your requirement .
Ex : If you require report should always run for 1st of the month to last of month .Then create Optional date variable in BW with interval .write customer exit ,
if from date is left blank it should take 1st of the month and if todate is left blank it should take last of the month .
when creating webi schedules , leave prompts as blank. -
Hello, i'm trying to update req type in sales order item data in transaction MASS (field Bedae). Once I save the doc I get following error messages: sales document was not changed error in VBAPKOM 00010 Requirement type doesn't exist. Also, VBAKKOM has been processed successfully. Please advise Thank you
Hello Saila,
Please let us know how you resolved the issue??
As per what I understand is there were subsequent documents (delivery) created for that particular sales order hence system was unable to update the requirement type in it.
Regards
Naveen K. -
Reason for rejection not changed in transaction MASS
Hi everybody,
I'm trying to update a sales order item with a reason for rejection (field VBAP-ABGRU) in transaction MASS but it doesn't work. I took a look in SAP notes and found similar problems but these notes (specially note 390105) don't apply to our version (4.7 support package 22). Before opening a note in SAP I would like to have someone's opinion about the issue.
Thanks,
PauloPaul, it doesn't work because the field is not updated despite success message issued when the transaction is finished (I tried to change the field content from blank to other value). The field is available in transaction MASS and I have successfully tested it in another system (release 6.00). But now I found a note (regarding to the same problem in another field - MASSSDPOSVBKD-KURRF) that can be helpful. It's note 777746 and it applies to our release. So, I'm waiting for the basis team to implement it to see what happens.
Thank you,
Paulo -
Bex query for BW abap report/ transaction
Hi Experts, Here is a scenario: I developed ABAP program in BW using multiple DSOs for complex logic. Since I cannot use abap program directly in BO reports, I need to develop a query in BW for my abap program. Is it possible to develop a bex query for BW abap report / transaction in BW? I have limited knowledge on BW and BO. Please help me. Thanks in advance Raghu
First of all thanks for your suggestion Matthew..!
As you said, I created virtual info cube based on function module.
In the info cube, I defined (4)dimensions and (1)key figure.
In the fucntion module, appropriate below parameters defined and code written for the data table (e_t_data)
CALL ZFM_XXXXXXX
EXPORTING
i_infoprov = " Name of InfoProvider
i_th_sfc = " rsdri_th_sfc: List of Characteristics
i_th_sfk = " rsdri_th_sfk: List of Key Figures
* i_t_range = " rsdri_t_range: Range List
* i_tx_rangetab = " rsdri_tx_rangetab: Table from Range List
* i_first_call = " rs_bool First Call
* i_packagesize = 100000 " i Package Size
IMPORTING
e_t_data = " standard table: Data Table
e_end_of_data = " rs_bool :End of Data Reached
e_t_msg = " rs_t_msg : BW: Table with Messages
Test:
Right click the info cube and choose "displayed data", immediately it triggered above function module.
when I see the import parameters data,
no characteristcs data in i_th_sfc. But, key figures has data (1 record) in i_th_sfk.
Not sure, Did I missed anything? Please help me.
Thanks in advance -
Calling ABAP Program / Transaction in WAD
Hello Experts,
We have requirement to call ABAP program/transaction in WAD. Can you please help us with your valuable inputs. We are using BI 7.0 !
Thanks and Regards,
Prawin KumarHi Praveen,
you can try calling the ABAP class/transaction using a custom extension as described here:
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/47/99bd42b407114be10000000a421937/content.htm
Brgds,
Marcel -
Needed insight into transaction MASS
Hi Experts,
I needed to learn about the transaction MASS in detail. I have gone through the threads but they answer very specific questions and scenarios.
I would be grateful if you could share some documentation on the transaction.
Warm Regards,
SomilThe name of this TCode itself is self explanatory.
When you want to update any data in bulk, you can do so via MASS. Fore more information, check this link
[Mass Maintenance processing - tcode MASS |http://www.sap123.com/showthread.php?t=158]
thanks
G. Lakshmipathi -
Hello everyone
Recently I found the transaction MASS, I will use it to update the pricing date of several Sales orders, I made a test on a Test environment, but the final log shows me several messages like this:
Sales document 10190721 was not changed
Error in VBAPKOM 000010
The material in item 000010 cannot be changed
Does anyone know the prerequisites or which sales order could be updated and which other not?
Thank you in advance
Regards.hi,
i have tested the same MASS t.code.
by selecting header data and tried to change the same pricing date. it has said
0000000001 : VBAKKOM has been processed successfully
but when i went to the sales order the date is not changed in the Pricing date of sales order header.
here in MASS there are three options :
Sales order header data
Sales Order Item Data
SD document: Business item data
which one have you selected and processed
regards,
balajia -
Web Dynpro ABAP call transaction in the foreground
In Screen Painter/SAP ALV, we can create a screen where for example if you double click on a sales order field it can take you a VA03 transaction by :
call transaction VA03 ... and skip first screen.
I am creating Web Dynpro ABAP application that needs to do the same thing where if we click on the field, it will take to VA03 transaction or other transactions.
Has anyone done this in Web Dynpro ABAP? I have done some research and determine that we cannot call transaction in the foreground? I hope I am wrong. Any help/insights will be greatly appreciated.Hi Phong,
WDA is generic client to Netweaver connection based on HTTP/S.
At this stage on a few clients are supported. WEB dynpro client and Browsers...
SAPGUI connects to SAP using a different protocol.
No SAPGUI connection is implied by a WDA client connection.
Therefore abap statements that invoke screens and otherwise assume SAPGUI
is connected are not supported in WDA. eg call screen, call transaction
You can either
a) build your own WDC to front end calls to BAPIs to get the Sales order data.
b) open/ exit to the new WDC for Sales Orders in ERP2005
see LORD_MAINTAIN_COMP
c) exit to the INTERNAL ITS URL for transaction VA03
eg http://<host>:<port>/sap/bc/gui/sap/its/webgui?~Transaction=VA03
but getting the skip first screen may require you to call custom tran ZVA03
which calls VA03 to skip first screen setting the PID appropriately.
Hopefully you opt for option a) or b).
c) can work... I have used it from BSPs but it not pretty.
regards
Phil -
Execute an OS/400-command (CL-programm) by an ABAP (Z-transaction)
Hello all!
we are searching for possibility to execute an OS/400-command (CL-programm) by an ABAP-programm (Z-transaction).
Actual (not working) example:
REPORT Z_WRKOUTQ_STOP.
Data: p_command(250) value 'KMXHOM6/QSYS.LIB/SKOLIB6.LIB/SKC001.PGM'.
DATA: BEGIN OF tabl OCCURS 10,
filler(1000),
END OF tabl.
CALL 'SYSTEM' ID 'COMMAND' FIELD p_command
ID 'TAB' FIELD tabl-sys.
Thanks for an answer.
Regards,
BerndHi,
post your query in ABAP Forum.
you can do this using Function Module SXPG_COMMAND_EXECUTE
This function allows a programmer to run a command from within an ABAP program.
regards,
kaushal -
Difference between AFS transaction J4AM and transaction MASS
hi,
i have heard abt MASS..but never tried it.
but i have worked with /AFS/MDC...
any idea what is the difference between the two and when is MASS actually used ?
thnks
Edited by: sdnuser1 sdnsurname on Feb 8, 2010 10:05 PMHI
both the transactions are the same which is for the mass maintenance or mass data change of sales documents, the report program for both of these tarnsactions are the same which is /AFS/RVMDCD.
REGARDS
VIGNESH. -
DB-LUW in ABAP-OO (Transaction-concept)
Hi Experts,
how can i use the transactionconcept in ABAP Object?
In normal abap we use for example :
CALL FUNCTION update_function1 IN UPDATE TASK
CALL FUNCTION update_function2 IN UPDATE TASK
commit work.
Are there any possibilities to use such concept in ABAP OO?
I have created some save-methods, which contains "insert" or "update" .
I call this save methods one after another, in following form
r_object->save_method1() .
r_object->save_method2() .
r_object->save_method3() .
How can I realize the LUW concept here?
Thanks in advance
CetomanHello Naimesh,
Methods don't support Update Module, RFC module
Having said that, can we not wrap the method call inside an Update Module
Cheers,
Suhas
Maybe you are looking for
-
How do I disable my old apple ID where I have 1) forgotten the password, 2) the email is no longer valid (so they can't send me my password) and 3) it has my incorrect birthday (so I can't answer the security question to have them send me a new passw
-
Automatic creation of thumbnail image in BC4J App
I have created a BC4J application using the default wizards that displays the content of the following table: CREATE TABLE EMPLOYEE_PHOTO ( ID NUMBER (3) NOT NULL, DESCRIPTION VARCHAR2 (20), PIC ORDIMAGE, THUMB ORDIMAGE, EMPLOYEE_NAME VARCHAR2 (50))
-
Can't sync my Photos due to windows error
Everytime I try to sync my photos on itunes 7, I get this message from windows "Tunes has encountered a problem and needs to close. We are sorry for the inconvenience". Does anybody have any idea how to correct this problem?
-
Conversion of XML Idoc to File Idoc
Hi, My query is: I have an XI (PI 7.0) in between an SAP system and a file system. An idoc comes into XI. It needs to be conerted to a file idoc, ie, each segment needs to be separated by a new line. How can I achieve this? 1. Do I have to create a j
-
Can we insert main step in between the existing main steps in GAF apps?
Hi, I just wondered when I have to place an all new view between the steps already existing in the GAF Application, and I was unable to find any button for insert new step or copy a step or to move a step. I have 5 steps in GAF App and wanted to add