2010 May 15 8:16 AM
Hi All,
Is there a way to modify data present in internal table of one program from a BADI.
For example in program 'SAPMV13A', include 'MV13AF0K' contains function module for BADI method 'SD_CONDITION_SAVE_EXIT'. I want to change internal table data (time_vake_db) present in include'MV13AF0K' from BADI method.
Is there a way out to change?
Thanks.
2010 May 15 8:28 AM
You can only change the following internal in the badi mentioned
CT_TIME
CT_KONH_NEW
CT_KONH_OLD
CT_KONPDB_NEW
CT_KONPDB_OLD
CT_SCALE_NEW
CT_SCALE_OLD
CT_KONDAT_NEW
CT_KONDAT_OLD
CT_VAKE
a®
Hi All,
Is there a way to modify data present in internal table of one program from a BADI.
For example in program 'SAPMV13A', include 'MV13AF0K' contains function module for BADI method 'SD_CONDITION_SAVE_EXIT'. I want to change internal table data (time_vake_db) present in include'MV13AF0K' from BADI method.
Is there a way out to change?
Thanks.
2010 May 15 8:28 AM
You can only change the following internal in the badi mentioned
CT_TIME
CT_KONH_NEW
CT_KONH_OLD
CT_KONPDB_NEW
CT_KONPDB_OLD
CT_SCALE_NEW
CT_SCALE_OLD
CT_KONDAT_NEW
CT_KONDAT_OLD
CT_VAKE
a®
2010 May 15 8:45 AM
Hi Thanks for your reply. Actually my problem is this:
I have using a method 'CONDITION_SAVE_EXIT' in BADI 'SD_CONDI_SAVE_A' for VK11 & VK12 transaction, where when customer enters start date as any past/current date the BADI should automatically update the start date to current date. The problem in BADi is the data that is being transferred into function module ('SD_CONDITION_SAVE_EXIT') is being copied into internal tanle and this copied table data is available for me while programming. Now the problem is as data is being copied into internal table when I update this data (the start date) the data is not being reflected in main program and condition is being stroed with user entered date itself.
I came to that the main internal data can be changed using update statement on internal table (sAPLV13A)db_xkondat[].
If so can anybody please specify the coding for this staement, when I code with the statement
MODIFY (sAPLV13A)db_xkondat[] from wa_kondat_new INDEX l_line.
it's giving error messgae AFTER "(SAPLV13A)", THERE MUST BE A SPACE OR EQUIVALENT CHARACTER (";", "," ".").
Thanks
2010 May 15 10:45 AM
Hi,
Declare a
FIELD-SYMBOLS: <fs_xkondt> TYPE ANY TABLE.
ASSIGN '(SAPLV13A)DB_XKONDAT[]' TO <fs_xkondt>.
Declare an other internal table with the structure of VKONDAT.
pass <fs_xkondt> to internal table and modify the data in the internal table.
Now pass the modified internal table data to DB_XKONDAT[].
Now also the record in DB_XKONDAT will be modified.
Check this will help you,
Regards
Dillip
2010 May 15 11:38 AM
Hi Dilip,
Thanks for your reply.
When I declare field-symbol that you specified it is giving an error "' (SAPLV13A)DB_XKONDAT[]' is not type-compatible with field-symbol '<fs_xkondt>'". Even if declared as ASSIGN (SAPLV13A)DB_XKONDAT[] TO <fs_xkondt>. (w/o quotes) its giving error "After "(SAPLV13A)", there must be a space or equivalent character (";", ",", ".")."
Please let me know at the earliest if you can unscrew this error.
Thanks in Advance.
2010 May 15 12:07 PM
Hi,
Try with this
DATA: IT_VKONDAT TYPE TABLE OF VKONDAT,
WA_VKONDAT TYPE VKONDAT.
DATA: LW_VAR(40) TYPE C.
FIELD-SYMBOLS: <FS_XKONDT> TYPE ANY TABLE.
LW_VAR = '(SAPLV13A)DB_XKONDAT[]'.
ASSIGN (LW_VAR) TO <FS_XKONDT>.
IF SY-SUBRC = 0.
IT_VKONDAT[] = <FS_XKONDT>.
ENDIF.
LOOP AT IT_VKONDAT INTO WA_VKONDAT.
WA_VKONDAT-DATAB = SY-DATUM.
WA_VKONDAT-KZ = 'U'. " UPDATE INDICATOR
MODIFY IT_VKONDAT FROM WA_VKONDAT INDEX SY-TABIX.
ENDLOOP.
DB_XKONDAT[] = IT_VKONDAT[].
I have used in the same maner and it worked for me.
Hope this will help U.
Regards
Dillip
2010 May 15 12:30 PM
Hi Dilip,
Amazing!!!!!! It answered my request. Thanks a lot.
Thanks.
2010 Aug 04 6:12 PM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |