‎2009 Feb 27 5:04 PM
Hi Gurus,
I need ABAP Programme which will replace '-' with '.' for profit center where company code equal to { PTUS, HQUS, CTCA} . I dont want to replace other profit centers.
I need to update in Extract Structure. Details
Structure Name : BWEC_MD_PROFIT_CTR.
Table Name : CEPC_BUKRS.
In the structure I have profit center and I need to look up CEPC_BUKRS table to check company code condition.
Please some one provide me the code.
Thanks
Ganesh Reddy.
‎2009 Feb 27 5:07 PM
if CEPC_BUKRS-bukrs <> 'companycodeA' or 'companycodeB' etc .
replace '-' with '.'
endif.
Will this not suffuice or may be I havent understood your issue correctly.
Cheers Vick
‎2009 Feb 27 5:07 PM
if CEPC_BUKRS-bukrs <> 'companycodeA' or 'companycodeB' etc .
replace '-' with '.'
endif.
Will this not suffuice or may be I havent understood your issue correctly.
Cheers Vick
‎2009 Feb 27 5:13 PM
Hi Vick,
Yes you are give me proper code. I am not a techical, please if you could just give me how to bring values into internal table, filter, replace and modify to structure.
If you help me that will be great.
Sidharth, thanks for quick reply. Just give me with company code condition. There is no company code in BWEC_MD_PROFIT_CTR. Company code exist in CEPC_BUKRS table.
Thanks
Ganesh Reddy.
Edited by: Ganesh Reddy on Feb 27, 2009 6:14 PM
Edited by: Ganesh Reddy on Feb 27, 2009 6:16 PM
‎2009 Feb 27 5:20 PM
Hi,
data : wa type CEPC_BUKRS,
itab type table of CEPC_BUKRS.
loop at itab into wa.
case wa-bukrs.
when 'PTUS' or 'HQUS' or 'CTCA'.
replace all occurences of '-' in wa with '.'.
modify itab from wa index sy-tabix.
endcase.
endloop.Regards,
Siddarth
‎2009 Feb 27 5:20 PM
I guess Sid has provided u with the solution ...
Plzz dont make any changes to a production program if you do not have programming background.
Cheers
Vick
Edited by: vick vennav on Feb 27, 2009 6:23 PM
‎2009 Feb 27 5:50 PM
Thanks Sidharth/Vick,
I am testing this in R/3 Development. Any way this is for extract structure changes which is related to BW. As for my knowledge I dont think it impacts to any data base tables.
Sidharth, before I close this forum I want to modify to extract structure (BWEC_MD_PROFIT_CTR) but not to the table (CEPC_BUKRS). Please could you tell me do I need to change any thing in your code.
Thanks
Ganesh Reddy.
‎2009 Feb 27 5:59 PM
Hi,
Please check if this works
you need to equate wa to extract and then use the statement
modify extract index sy-tabix.
Regards,
Siddarth
‎2009 Feb 27 9:27 PM
‎2009 Feb 27 5:08 PM
We don't work for free, we don't do your job. If you have a specific query, feel free to ask, as we all learn from it, but don't ask for full pieces of code.
‎2009 Feb 27 5:10 PM
Hi,
loop at CEPC_BUKRS into BWEC_MD_PROFIT_CTR.
replace '-' in BWEC_MD_PROFIT_CTR-PTUS with '.'.
replace '-' in BWEC_MD_PROFIT_CTR-HQUS with '.'.
replace '-' in BWEC_MD_PROFIT_CTR-CTCA with '.'.
endloop.Regards,
Siddarth