Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Split a string

Hi All,

I have a requirement where there is a string suppose

$self.qty = ( ( 3.1429 * dpcc_c * dpcc_c ) / 4 ) * hpcc_c if V_PCC = 'V_PCC_CIRC' , $self.qty = lpcc_r * bpcc_r * hpcc_r * n if v_PCC = 'V_PCC_RECT' , $self.qty = ( lpcc_t * bpcc_t * hpcc_t * n ) + ( h1pcc_t / 2 * ( lpcc_T + l1pcc_t )

In this string i want to divide it according to the ' ' marks so that the both starting and ending codes should be in the same line, and the maximum length of the line is 72 char, so need to divide is first on the basis of ' if no quotes found then split at 72 char.

need to check both the conditions single quotes and length in one line 72 and append in a table like the output in the table sholuld be like this.

$self.qty = ( ( 3.1429 * dpcc_c * dpcc_c ) / 4 ) * hpcc_c if V_PCC =

'V_PCC_CIRC' , $self.qty = lpcc_r * bpcc_r * hpcc_r * n if v_PCC =

'V_PCC_RECT' , $self.qty = ( lpcc_t * bpcc_t * hpcc_t * n )+ ( h1pcc_t

/ 2 * ( lpcc_T + l1pcc_t ).

Please suggest some solution.

Thanks

Mona

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question