String to CRC32 as 4 bytes and LZMA1 conversion in ABAP












0















I need to for QR code payBySquare in Slovak republic convert Array to string and make CRC32 HASH. Afther that I need comprime HASH by LZMA1 . I hope my code is ok to CRC32 But I cannot find how to make comprimation by LZMA1.



  method GENERATE_QR_STRING_FOR_SR.
DATA: lw_string TYPE STRING,
lw_wrbtr_s TYPE STRING,
lo_crc TYPE REF TO IF_SCV_CRC_SERVICES,
lo_crc_hash TYPE REF TO IF_SCV_CRC32.



LW_WRBTR_S = me->WRBTR.

CONCATENATE 'true'
LW_WRBTR_S "
me->WAERS "Currency
'20170101' "'Date'
me->VAR_SYMB "Variabile Symbol
me->CON_SYMB "Constant Symbol
me->SPE_SYMB "Specific Symbol
''
me->INF_FOR_BE "Information for benef..
'1'
me->IBAN "Iban
me->SWIFT "SWIFT
'0'
'0'
INTO lw_string SEPARATED BY ' '.

CONCATENATE '' '1' lw_string INTO lw_string SEPARATED BY ' '.

DATA:
ld_CONTENT TYPE XSTRING ,
ld_CRC32 TYPE I.

" ld_CONTENT = "<Populate with value>

CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
EXPORTING
TEXT = LW_STRING
* MIMETYPE = ' '
* ENCODING =
IMPORTING
BUFFER = LD_CONTENT
* EXCEPTIONS
* FAILED = 1
* OTHERS = 2
.
IF SY-SUBRC <> 0.
* Implement suitable error handling here
ENDIF.

CALL METHOD CL_UJF_ZIP=>CRC32( EXPORTING CONTENT = ld_CONTENT RECEIVING CRC32 = ld_CRC32 ).

"ld_CRC32 = CL_RSBPCF_ZIP=>CRC32( EXPORTING CONTENT = ld_CONTENT ).









share|improve this question

























  • The ABAP server provides very few compression algorithms. Probably you will have to find a LZMA1 program and install it on your application server, and call it from your ABAP program.

    – Sandra Rossi
    Nov 21 '18 at 17:06
















0















I need to for QR code payBySquare in Slovak republic convert Array to string and make CRC32 HASH. Afther that I need comprime HASH by LZMA1 . I hope my code is ok to CRC32 But I cannot find how to make comprimation by LZMA1.



  method GENERATE_QR_STRING_FOR_SR.
DATA: lw_string TYPE STRING,
lw_wrbtr_s TYPE STRING,
lo_crc TYPE REF TO IF_SCV_CRC_SERVICES,
lo_crc_hash TYPE REF TO IF_SCV_CRC32.



LW_WRBTR_S = me->WRBTR.

CONCATENATE 'true'
LW_WRBTR_S "
me->WAERS "Currency
'20170101' "'Date'
me->VAR_SYMB "Variabile Symbol
me->CON_SYMB "Constant Symbol
me->SPE_SYMB "Specific Symbol
''
me->INF_FOR_BE "Information for benef..
'1'
me->IBAN "Iban
me->SWIFT "SWIFT
'0'
'0'
INTO lw_string SEPARATED BY ' '.

CONCATENATE '' '1' lw_string INTO lw_string SEPARATED BY ' '.

DATA:
ld_CONTENT TYPE XSTRING ,
ld_CRC32 TYPE I.

" ld_CONTENT = "<Populate with value>

CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
EXPORTING
TEXT = LW_STRING
* MIMETYPE = ' '
* ENCODING =
IMPORTING
BUFFER = LD_CONTENT
* EXCEPTIONS
* FAILED = 1
* OTHERS = 2
.
IF SY-SUBRC <> 0.
* Implement suitable error handling here
ENDIF.

CALL METHOD CL_UJF_ZIP=>CRC32( EXPORTING CONTENT = ld_CONTENT RECEIVING CRC32 = ld_CRC32 ).

"ld_CRC32 = CL_RSBPCF_ZIP=>CRC32( EXPORTING CONTENT = ld_CONTENT ).









share|improve this question

























  • The ABAP server provides very few compression algorithms. Probably you will have to find a LZMA1 program and install it on your application server, and call it from your ABAP program.

    – Sandra Rossi
    Nov 21 '18 at 17:06














0












0








0








I need to for QR code payBySquare in Slovak republic convert Array to string and make CRC32 HASH. Afther that I need comprime HASH by LZMA1 . I hope my code is ok to CRC32 But I cannot find how to make comprimation by LZMA1.



  method GENERATE_QR_STRING_FOR_SR.
DATA: lw_string TYPE STRING,
lw_wrbtr_s TYPE STRING,
lo_crc TYPE REF TO IF_SCV_CRC_SERVICES,
lo_crc_hash TYPE REF TO IF_SCV_CRC32.



LW_WRBTR_S = me->WRBTR.

CONCATENATE 'true'
LW_WRBTR_S "
me->WAERS "Currency
'20170101' "'Date'
me->VAR_SYMB "Variabile Symbol
me->CON_SYMB "Constant Symbol
me->SPE_SYMB "Specific Symbol
''
me->INF_FOR_BE "Information for benef..
'1'
me->IBAN "Iban
me->SWIFT "SWIFT
'0'
'0'
INTO lw_string SEPARATED BY ' '.

CONCATENATE '' '1' lw_string INTO lw_string SEPARATED BY ' '.

DATA:
ld_CONTENT TYPE XSTRING ,
ld_CRC32 TYPE I.

" ld_CONTENT = "<Populate with value>

CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
EXPORTING
TEXT = LW_STRING
* MIMETYPE = ' '
* ENCODING =
IMPORTING
BUFFER = LD_CONTENT
* EXCEPTIONS
* FAILED = 1
* OTHERS = 2
.
IF SY-SUBRC <> 0.
* Implement suitable error handling here
ENDIF.

CALL METHOD CL_UJF_ZIP=>CRC32( EXPORTING CONTENT = ld_CONTENT RECEIVING CRC32 = ld_CRC32 ).

"ld_CRC32 = CL_RSBPCF_ZIP=>CRC32( EXPORTING CONTENT = ld_CONTENT ).









share|improve this question
















I need to for QR code payBySquare in Slovak republic convert Array to string and make CRC32 HASH. Afther that I need comprime HASH by LZMA1 . I hope my code is ok to CRC32 But I cannot find how to make comprimation by LZMA1.



  method GENERATE_QR_STRING_FOR_SR.
DATA: lw_string TYPE STRING,
lw_wrbtr_s TYPE STRING,
lo_crc TYPE REF TO IF_SCV_CRC_SERVICES,
lo_crc_hash TYPE REF TO IF_SCV_CRC32.



LW_WRBTR_S = me->WRBTR.

CONCATENATE 'true'
LW_WRBTR_S "
me->WAERS "Currency
'20170101' "'Date'
me->VAR_SYMB "Variabile Symbol
me->CON_SYMB "Constant Symbol
me->SPE_SYMB "Specific Symbol
''
me->INF_FOR_BE "Information for benef..
'1'
me->IBAN "Iban
me->SWIFT "SWIFT
'0'
'0'
INTO lw_string SEPARATED BY ' '.

CONCATENATE '' '1' lw_string INTO lw_string SEPARATED BY ' '.

DATA:
ld_CONTENT TYPE XSTRING ,
ld_CRC32 TYPE I.

" ld_CONTENT = "<Populate with value>

CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
EXPORTING
TEXT = LW_STRING
* MIMETYPE = ' '
* ENCODING =
IMPORTING
BUFFER = LD_CONTENT
* EXCEPTIONS
* FAILED = 1
* OTHERS = 2
.
IF SY-SUBRC <> 0.
* Implement suitable error handling here
ENDIF.

CALL METHOD CL_UJF_ZIP=>CRC32( EXPORTING CONTENT = ld_CONTENT RECEIVING CRC32 = ld_CRC32 ).

"ld_CRC32 = CL_RSBPCF_ZIP=>CRC32( EXPORTING CONTENT = ld_CONTENT ).






abap






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 21 '18 at 17:01









Sandra Rossi

2,4431416




2,4431416










asked Nov 21 '18 at 13:00









Eddy_ScreamerEddy_Screamer

188630




188630













  • The ABAP server provides very few compression algorithms. Probably you will have to find a LZMA1 program and install it on your application server, and call it from your ABAP program.

    – Sandra Rossi
    Nov 21 '18 at 17:06



















  • The ABAP server provides very few compression algorithms. Probably you will have to find a LZMA1 program and install it on your application server, and call it from your ABAP program.

    – Sandra Rossi
    Nov 21 '18 at 17:06

















The ABAP server provides very few compression algorithms. Probably you will have to find a LZMA1 program and install it on your application server, and call it from your ABAP program.

– Sandra Rossi
Nov 21 '18 at 17:06





The ABAP server provides very few compression algorithms. Probably you will have to find a LZMA1 program and install it on your application server, and call it from your ABAP program.

– Sandra Rossi
Nov 21 '18 at 17:06












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53412610%2fstring-to-crc32-as-4-bytes-and-lzma1-conversion-in-abap%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53412610%2fstring-to-crc32-as-4-bytes-and-lzma1-conversion-in-abap%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Create new schema in PostgreSQL using DBeaver

Deepest pit of an array with Javascript: test on Codility

Costa Masnaga