Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

PHP + SAP

Former Member
0 Likes
590

Hi...

I'm using php to connect SAP, and I can do this... My system can get many

informations from SAP, but, when they found some money value, execution is

stoped...

I'm from brazil, and here, values is like this:

1.564,00

I think about this, and maybe the problem is ","...

I'm using examples from PHP SAPRFC...

Sorry for my poor english, but I'm from brazil, and don't know speak

english very well...

Thanxx..

1 ACCEPTED SOLUTION
Read only

rodrigo_paisante3
Active Contributor
0 Likes
532

Ok Glauber, iam from Minas Gerais.

Welcome to SDN!

Maybe you are right about the "," or the problem could be the "." in the number.

Did you try to remove the symbol?

If any error message appear, put this here.

Regards.

4 REPLIES 4
Read only

rodrigo_paisante3
Active Contributor
0 Likes
533

Ok Glauber, iam from Minas Gerais.

Welcome to SDN!

Maybe you are right about the "," or the problem could be the "." in the number.

Did you try to remove the symbol?

If any error message appear, put this here.

Regards.

Read only

0 Likes
532

Bom... ainda bem que achei um brasileiro, pq meu inglês tá enferrujado...

O problema é que eu consigo trazer os dados do SAP, até o ponto onde ele encontra valores referentes à dinheiro, onde a casa decimal é separada por vírgula... por isso, eu acredito que este seja o problema...

Só que como eu não consigo tratar no PHP estas informações, pq o valor não consegue ser tratado, não sei exatamente o que fazer...

Existe como fazer com que o SAP mande os valores com outro tipo de formatação? (sem nenhum separador, por exemplo)?

Enfim... se tiveres alguma idéia, fico no aguardo...

valeu!

Read only

0 Likes
532

I will answer you in english too, maybe an expert could help you in this thread better than me.

The currency value have a different format in Brazil. How did you geting the data from sap system? Are you using only PHP functions and codes?

Try to get the monetary field and populate it in a character field, then and try to convert it to your format needs.

Talk to me your results!

Regards.

Vou fazer o seguinte, vou responder em ingles e portugues, assim, se alguem da comunidade souber, pode te ajudar tambem.

Realmente, a forma como é tratado valor monetário, difere o ponto e a virgula. Mas como voce esta realizando essa busca de dados? Só com o PHP e funções do PHP?

Se for o caso, tente colocar em um campo caracter, só pra ver como vai chegar pra voce. Talvez fique mais facil realizar uma conversão depois.

Tenta e me fala se deu certo!

Abraços.

Read only

0 Likes
532

Então, na verdade, o php só está recebendo as informações que a função envia... e tratando elas.

Só que como ele recebe um tipo de dado que não consegue identificar (ele mostra como sendo do formato P), ele para a execução.

Mas vamos lá... vou continuar tentando...

Valeu!